05/26/2022 11:30 PM - edited 05/26/2022 11:31 PM
Hi Team,
We have a requirement to onboard a REST app which has below:
1) OAuth Token endpoint that will generate access token to be used in other API Calls. We have mapped the access token received accordingly so it will be accessible by the variable ${access_token}
2) To access any other API endpoint, in-addition to the access token, we need to send the basic auth credential for the API call to be successful. Token endpoint also expects this basic credential to be sent to get the accesstoken.
So, in subsequent calls in other blocks we pass ${access_token} but the basic auth creds to access the endpoint is sent in clear text which we don't want. Is there a way to store the basic creds in a variable inside connection json and access it in other block's API calls?
Thanks in advance!
-Siva
Solved! Go to Solution.
06/01/2022 01:38 AM - edited 06/01/2022 01:38 AM
Hello,
You can define the credentials inside the connectionjson as key value pair and fetch it in the import json as below :
${connection.plainusername}
where 'plainusername' and its value is defined as a key value pair inside the connectionjson.
06/22/2022 12:21 PM - edited 06/27/2022 04:53 AM
Thanks @sahajranajee! I will validate and will keep you posted. In the meanwhile, do we have more constant variables like ${connection.plainusername} or is this the only one available?
There are cases where we have to hide multiple authorization params. Please confirm on the other constant variables available which can be used.
-Siva
07/27/2022 07:19 AM
Hi @Sivagami ,
You can define any parameters in the Connection JSON and fetch them as ${connection.<userdefinedparametername>}