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

**URL:** <https://community.auth0.com/t/get-a-jwt-for-an-organization-through-api-trying-to-link-with-retool/124202>\
**Category:** Get Help\
**Tags:** keys, management-api\
**Created:** [January 4, 2024, 10:23pm UTC](https://community.auth0.com/t/get-a-jwt-for-an-organization-through-api-trying-to-link-with-retool/124202 "2024-01-04T22:23:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![james21](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james21/32/49408_2.png) [@james21](https://community.auth0.com/u/james21)\
**Post date:** [January 4, 2024, 10:23pm UTC](https://community.auth0.com/t/get-a-jwt-for-an-organization-through-api-trying-to-link-with-retool/124202/1 "2024-01-04T22:23:41Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [January 5, 2024, 12:06am UTC](https://community.auth0.com/t/get-a-jwt-for-an-organization-through-api-trying-to-link-with-retool/124202/3 "2024-01-05T00:06:46Z")

</div>

Hey @james21 welcome to the community!

> [@james21](#):
>
> 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.

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!

---

<div class="post-metadata">

**Author:** ![james21](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james21/32/49408_2.png) [@james21](https://community.auth0.com/u/james21)\
**Post date:** [January 5, 2024, 1:10am UTC](https://community.auth0.com/t/get-a-jwt-for-an-organization-through-api-trying-to-link-with-retool/124202/4 "2024-01-05T01:10:15Z")

</div>

Hi tyf!

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

 ![image](https://global.discourse-cdn.com/auth0/original/3X/6/5/656d71e4fe6f822a49231a004c81d57306c9e1b0.png)

 ![image](https://global.discourse-cdn.com/auth0/original/3X/1/a/1a2eb7990ba1fbed55dbd92a09d171e3efc30865.jpeg)

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [January 5, 2024, 1:40am UTC](https://community.auth0.com/t/get-a-jwt-for-an-organization-through-api-trying-to-link-with-retool/124202/5 "2024-01-05T01:40:03Z")

</div>

Thanks for clarifying!

Is this a [management API access token](https://auth0.com/docs/secure/tokens/access-tokens/management-api-access-tokens)?

---

<div class="post-metadata">

**Author:** ![james21](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james21/32/49408_2.png) [@james21](https://community.auth0.com/u/james21)\
**Post date:** [January 5, 2024, 4:05pm UTC](https://community.auth0.com/t/get-a-jwt-for-an-organization-through-api-trying-to-link-with-retool/124202/6 "2024-01-05T16:05:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [January 5, 2024, 9:27pm UTC](https://community.auth0.com/t/get-a-jwt-for-an-organization-through-api-trying-to-link-with-retool/124202/7 "2024-01-05T21:27:40Z")

</div>

> [@james21](#):
>
> 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.

Good to know!

> [@james21](#):
>
> I have access to management API keys and secret, but I need to get an org specific authorization token

I may be misunderstanding your use case here, but as far as I’m aware the only [“org specific” access tokens](https://auth0.com/docs/manage-users/organizations/using-tokens#access-token) are issued as a result of a user authenticating through an organization.

> [@james21](#):
>
> However, I’m trying now to build some workflows that will run daily, and this has an impact once the JWT token expires.

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.

---

<div class="post-metadata">

**Author:** ![james21](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james21/32/49408_2.png) [@james21](https://community.auth0.com/u/james21)\
**Post date:** [January 5, 2024, 9:58pm UTC](https://community.auth0.com/t/get-a-jwt-for-an-organization-through-api-trying-to-link-with-retool/124202/8 "2024-01-05T21:58:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [January 5, 2024, 11:43pm UTC](https://community.auth0.com/t/get-a-jwt-for-an-organization-through-api-trying-to-link-with-retool/124202/9 "2024-01-05T23:43:54Z")

</div>

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

> [@james21](#):
>
> i have login details I can use if that makes a difference.

It depends on the [login flow](https://auth0.com/docs/get-started/authentication-and-authorization-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`:

[https://community.auth0.com/t/authenticating-users-through-a-specific-organization/84679](https://community.auth0.com/t/authenticating-users-through-a-specific-organization/84679)

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](https://auth0.com/docs/get-started/authentication-and-authorization-flow#resource-owner-password-flow).

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 19, 2024, 11:44pm UTC](https://community.auth0.com/t/get-a-jwt-for-an-organization-through-api-trying-to-link-with-retool/124202/10 "2024-01-19T23:44:43Z")

</div>

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