Authorization per Environment

Hi, I have a number of Environments with different username/passwords for login.
Can I configure an Authorization per Environment?

Hi @desmond.kirrane,

Welcome to the community! :clap:

If the type of authorization is the same between environments, you can use environment variables in the authorization tab in order to change your authorization credentials per environment. Assuming Basic Authorization, Simply make a username and password variable in each environment and they’ll get filled in appropriately.

If they are not the same type of authorization (bearer token, hawk, etc) then you can’t do so via the method I explained above. But you can store credentials in your environment with no problem and you can make it work by calling your authorization appropriately.

Just be weary of using sensitive credentials in a environment shared by a team, unless they are shared credentials :wink:.

Hope this helps!

Regards,
Orest

Hi Orest,

sorry to barge into this thread. what if the creds are api key id and secret that is on the body of the first post, say login post. then the asc_ssession_id is generated on the response header.

how can i use the value of the header if the succeeding api calls need the value but with a different header, say asc_xsrf_token?

thanks,
knychtell

Hi @knychtell,

Not a problem! I think I understand what you are asking, though I am not 100% certain.

For succeeding requests using that asc_session_id, you would just place the variable value where its supposed to go. That shouldnt be a problem. First you would save that asc_session_id as a variable when handling the callback response, and then use it wherever.

As for the asc_xsrf_token, that depends on what your web server expects, but if its just a normal XSRF type token, you should be able to generate one client side with no problem. I believe you can just make it some random string of characters. Then you would just place that in your header.

I hope this answers your question!

Best,
Orest