-
Goal: I want to automatically refresh the bearer token in the Retool REST API resource when the current bearer token expires.
-
Steps taken: I have added a REST API resource that uses a bearer token for authentication. However, our current server implementation does not support a refresh token mechanism. To get a new token, we have to manually:
- Detect when the token expires (this throws a session error).
- Request a new access token from our server endpoint.
- Update the bearer token in the resource with the new token.
-
Details: In the current setup, obtaining a new bearer token requires manual intervention, which involves:
- Identifying that the token has expired due to a session error.
- Making a request to our server endpoint to retrieve a new access token.
- Updating the bearer token in the Retool resource with the new token.
Is there a way to automate this process so that the bearer token refreshes automatically upon expiration? Like we get the new token, and retool auto adds it as a bearer to the REST resource?
- Screenshots: