Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

bashovski's avatar

Gather Bearer token from deployed webapp

Hello, I am having problem regarding gathering authorization token which should be in format of: 'Bearer [token]'. Unfortunately, I can't access it by calling API requests from my HTTP client (Insomnia in this case) since I don't have any keys to access the database and I don't really know if there is a way to generate these essential keys and tokens remotely. Also, I don't use Forge to manage deployed app. I hope you can share a way of gathering these tokens/keys with me, I would be very grateful. Thanks in advance, best regards!

0 likes
2 replies
bashovski's avatar

Thank you. I've resolved that problem, but in fact, I am experiencing another one after the POST/GET request has been called to an API endpoint. The response is always: { "message": "Server Error" } in JSON format, of course.

Same code with right tokens works normally on local environment, but this occurs only in deployed app.

EDIT: I've changed APP_DEBUG to true to display errors, this one shows up:

Key path "file:///app/storage/oauth-private.key" does not exist or is not readable

Sorry for being annoying.

Please or to participate in this conversation.