Skip to main content

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.

Your third request contains authentication mode as ‘Control Room User Token’ which seems incorrect, Use ‘No Authentication’ instead.


Yes, I should have mentioned in the post, not sure how I set it that way when posting the screenshot, but it is set to No Auth throughout all three steps.


@JLogan3o13  : 400 is the mistake from the API call which means something is not written properly in the command. Can you change to No Authentication for 3rd call ?


@Chaitukvs as mentioned above, this was already done. The behavior is the same.


Just an addendum, I worked with support for several hours yesterday. They were unable to figure out why the failure through the CR, but here are the scenarios we tested:

 

Scenario 1 (success):
Get access_token from AA
Use AA-generated token in Postman to get Location
Use Location from Postman to pull info

Scenario 2 (fail):
Get access_token from AA
Use AA-generated token to get Location in AA
Use Location in Postman to pull info
(edited)

Scenario 3 (fail):
Get access_token from AA
Use AA-generated token to get Location in AA
Use Location in AA to pull info

Scenario 4 (fail):
Get access_token from Postman
Use Postman-generated token in AA to generate Location
Use Location in AA to pull info

Scenario 5 (success):
Get access_token from Postman
Use Postman-generated token in Postman to generate Location
Use Location in AA to pull info

Scenario 6 (success):
Get access_token from Postman
Use Postman-generated token in Postman to generate Location
Use Location in Postman to pull info


Reply