Get a JWT for an organization through API - Trying to link with ReTool

Hi there,
Relatively new to all of this so pardon if I just haven’t come across the solution just yet.

I am trying to build an app in ReTool that uses an organization’s Bearer Token to interact with our internal API. Right now, I am just copy pasting the token into ReTool and it’s working fine for one off runs. However, I’m trying now to build some workflows that will run daily, and this has an impact once the JWT token expires.

Any tips/walkthroughs on how I can generate a new token within my workflow each time the workflow runs? Thanks!

Hey @james21 welcome to the community!

Can you elaborate on where you are getting this token from specifically? I am not totally sure I understand what you mean by an Organization’s bearer token. The more details you can provide the better, thanks!

Hi tyf!

I am getting it under the graphql details in the chrome developer tools panel

1 Like

Thanks for clarifying!

Is this a management API access token?

We have a single page application set up in Auth0, and organizations set up for our customers/users. Upon login they are redirected to a subdomain for their account.

I have access to management API keys and secret, but I need to get an org specific authorization token

Good to know!

I may be misunderstanding your use case here, but as far as I’m aware the only “org specific” access tokens are issued as a result of a user authenticating through an organization.

Are you trying to achieve this without user involvement? Like I said, org specific access tokens are issued as a result of a user-involved flow so doing this on behalf of users doesn’t really make sense. It might help if you can clarify what you mean by an Organization’s bearer token.

i have login details I can use if that makes a difference. Sorry for all the beginner questions!

No worries! I just want to make sure I understand your use case fully :slight_smile:

It depends on the login flow you have configured for your application/connection in Auth0, when a user goes to login through an organization via Universal Login (most common) an authorize request is constructed which includes the org_id:

If you have the login in details and are able to go through the login flow for a user, then kicking off an auth flow using the aforementioned authorize request + org_id should do the trick. Unfortunately, this will most likely be difficult to automate unless using a “password” grant type.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.