I have an API that I’m testing that requires that a bearer token be generated on each run as it has a short expiration. I am able to successfully use one web service request to generate the token and have it written to a variable, but I can’t seem to then use that string in the next API request I do. Currently I’m using the following line, but the second request isn’t receiving the token and responds with an error.
dev apiSecRes = WS.sendrequest(findTestObject('apiObjs/Health_Chk', [('Authorization') : "Bearer ${apiToken}"]))
I also have the variable name set in the Web Request object in my Object Repository. What am I missing?