How to obtain a bearer token for a third party client

I want to try and write a simple mobile app. As a "hello world" it could just fetch the data model for a given workspace. This requires a bearer token - not an API key. Is there currently a way to achieve this? A way for the app to hit the server and become authorized?
10 Replies
martmull
martmull4w ago
Api Keys are bearer token technically
martmull
martmull4w ago
you can create api keys here /settings/developers after toggling the Advance toggle
No description
JarWarren
JarWarrenOP4w ago
Sorry, I know API keys are accepted, but there are parts of the API that require a real bearer token - like identifying the current user
martmull
martmull4w ago
ohh, I see, what part of the API are you thinking about?
JarWarren
JarWarrenOP4w ago
Well, current user is one lol. Basically, I want to be able to do the login flow from a mobile app and potentially show all the same info as the web app
martmull
martmull4w ago
Yes, indeed, I was thinking about REST Api which does not exposes the currentUser endpoint. But the grahqlApi does @Félix what do you think? What prevents you from getting a bearer token using the login flow and then use that to request currentUser?
JarWarren
JarWarrenOP4w ago
Oh I'm just not sure how to go about it. I wasn't able to find the relevant endpoint(s)
martmull
martmull4w ago
You can look for for challenge and verify endpoints (additionally, you can check what calls are made when login with the web app in the developer console)
JarWarren
JarWarrenOP4w ago
Ok I'll give it a shot
Unknown User
Unknown User4w ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server