I’m working with an API that requires a Bearer token for authentication. The token expires every 20 minutes, so I need to:
1. Request a new token from the authentication endpoint
2. Use that token in the Authorization header for subsequent API calls
3. Refresh the token automatically before it expires
From what I can tell, Retool doesn’t seem to support this natively as part of the standard REST API resource setup.
• Is there a built-in way in Retool to handle token generation and refresh for short-lived Bearer tokens?
• If not, what is the recommended approach for implementing this workflow in Retool?
• Should I use a JS query to request and store the token, then inject it into my API queries, or is there a better method?
Just wanted to check in if you are still having this issue. Also wanted to echo Miguel to see if you could share more details on what you tried so we can better assist!