21 Nov 2022
02:37 PM
- last edited on
22 Nov 2022
03:20 PM
by
MaciejNeumann
I have stored a token in credentail store. The credentail store ID is CREDENTIALS_VAULT-6166A12B9558E871 and credentail name is accesskey. How can I access this value in a variable. I tried below but I see NaN as a value
request.addHeader("Content-Type", "application/json");
request.addHeader("Authorization", "Bearer " + api.getValue("bearerToken"));
var access_key = api.getCredential("CREDENTIALS_VAULT-6166A12B9558E871", "token");
api.setValue("key", access_key);
request.addHeader("Key", + api.getValue("key"));
Solved! Go to Solution.
Hi @ashafqat2 , good day.
Try this instead:
var access_key = api.getCredential("CREDENTIALS_VAULT-6166A12B9558E871", "token");
api.setValue("key", access_key);
request.addHeader("Key",api.getValue("key"));
The '+' is crashing your token value.
Regards