Forum Discussion

SiKing's avatar
SiKing
Community Expert
7 years ago

OAuth2 with environments

I am just getting into OAuth; docs.

In my case, when I specify the Access Token URL, it needs the same endpoint as the test step. How do I do that?

  • Thank you for posting to our Community Forum. 

     

    You can create a Custom Property for the URL in the environment that changes for each one.

     

    You can then call the Custom Property with the following syntax: ${#Project#PropertyName}

     

    This syntax can be put in the Auth Profile URL Field and the Endpoint field of the Request so that it changes dynamically with the Environment. 

     

    https://support.smartbear.com/readyapi/docs/testing/environments/properties.html

     

    Have a great day! 

2 Replies

  • StevenColon's avatar
    StevenColon
    SmartBear Alumni (Retired)

    Thank you for posting to our Community Forum. 

     

    You can create a Custom Property for the URL in the environment that changes for each one.

     

    You can then call the Custom Property with the following syntax: ${#Project#PropertyName}

     

    This syntax can be put in the Auth Profile URL Field and the Endpoint field of the Request so that it changes dynamically with the Environment. 

     

    https://support.smartbear.com/readyapi/docs/testing/environments/properties.html

     

    Have a great day! 

    • SiKing's avatar
      SiKing
      Community Expert

      Bummer. I was hoping for some ${=currentStep.endpoint} type of solution.

      Single source of truth.