Custom Auth Resource token

I have set up a custom auth resource and I have a variable to store the token value. Custom auth seems to work fine as it generates the token. I am trying to use this resource and make subsequent API calls using the token value. However, I cant seem to reference the variable from the app using the resource.



Hi there,

Happy to help out here and to clarify, you are attempting to access a variable you had set when setting up your API call in a Retool app, correct?

If so, the variable set there is not accessible outside the setup environment. To utilize it, you will want to place it in the above API call.

I hope this helps and let me know if you have any additional questions!

All the best,

Evan

Hi @Prashanth_Saavandi :wave: as Evan mentions, the variables in the resource set up cannot be referenced in the app. That said, you can set the Authorization header equal to auth_token in the resource set up and it will automatically apply to any queries that you create.

  1. Remove the Authorization header from your query in your app.
  2. Go back to the resource page and set the header like this:
  3. Preview the query in your app, go to the API Request tab and see your token was passed in automatically