Environment variable not working in header

I have built a custom auth flow that stores a token to a variable called AUTHORIZATION_TOKEN

I know that the variable is being set correctly because I added another JavaScript step that console logged the value.

When I add the variable to the headers, however, it is not being converted and is simply being sent as "AUTHORIZATION_TOKEN". So that I could see what was being sent, I've added an extra debug header

Do the environment variables work when using OpenAPI?

This appears to be a bug that the Retool team is investigating

Any news regarding this bug? or any workaround?

No, sorry, it has only just been officially recognised as a bug, but so far, Retool has been highly responsive, so I feel like it is being taken seriously

1 Like

Hey folks, thanks for flagging this! it looks like the engineering team has been working on it and is aiming to ship a fix with the 3.5.0 release.

Amazing @Kabirdas, thanks for that. Could you also provide us with the 3.5.0 release date?

At the moment releases come on a weekly cadence, usually on Wednesdays. The tentative date is July 19th - it may be pushed back to help ensure the quality of the release but I would keep an eye out for it starting then!

1 Like

I guess it was pushed back, I still have the same issue:

Same here, I'm afraid.

I tried making changes to the Resource incase it updates on save, and also reauthorized the query.

Has this been fixed?

It looks like the fix is gated behind a feature flag. @Bruno_de_Queiroz and @HashNotAdam I've turned it on for your orgs - can you check again and let me know if you're still seeing the behavior with your OpenAPI resources?

Hi @Kabirdas, We are facing the same issue within our org. Any chance you can turn this on for our org too?

Much better, thank you :pray:

Worked like a charm! thank you @Kabirdas :smiley:

@Kabirdas I'm also running into this issue. My org self-hosts Retool, is there an environment variable we can set or something like that to enable this behavior?

Hey @danr-remitly! What version of Retool are you currently on? This should be supported without a flag on version 3.8 and above!