I need another set of eyes on this; hoping it is just something stupid simple I am not thinking of. I have to pull data from a 3rd party source through their API. This is a multi-step process following the path below:
- Obtain Access Token
- Obtain Location URL
- Obtain requested data
First, I obtain the access token, pretty standard.
I then have to send a request for the specific patient info (medical procedure). The parameters are things like patient.FirstName, patient.LastName, startDate, endDate, DOB.
The return headers from this second call includes a Location field formatted in a URL with a session ID. It looks similar to this: https://api.company.com/company/v2/service-reviews?sessionId=1234567890987654321
That Location is the source of the third call, and returns the required data about the patient.
I have set this up in PostMan, passing the access_token from the first call to the second and third, and passing the Location from the second to the third. It also works if I do it through PowerShell. But I cannot seem to get it to work in a bot. I first set up the POST to obtain the access_token:
I can confirm the access_token comes back as I would expect. I then set up a GET for the second call:
As with the first step, I get the Location response just as I would expect. But the third call always generates an error:
What I cannot understand is, the same calls outside of AA work just fine (same parameters, same headers, etc.). In fact, If I run the first and second steps of the bot, and copy the access_token and Location into PostMan, it goes through. Likewise if I go the other way, generate the access_token and Location in PostMan and then copy into the bot, running just the third step works. It just makes no sense why A360 is not properly making the call.