Jai_Spicer | 2020-06-05 13:33:34 UTC | #1
Hi. I am trying to use a custom oauth action to access an API. The auth action returns successfully with what I expect and the token works on the endpoint in Postman. The response looks like this.
{ "accesstoken": "<REDACTED STRING(1310)>", "extexpiresin": "<REDACTED NUMBER>", "tokentype": "<REDACTED STRING(6)>", "expires_in": "<REDACTED NUMBER>" }
I am then attempting to set the authorization as defined here However when running the test i get the following error.
{ "message": "There was an issue validating the credentials.", "code": "invalid.credentials", "status": 400, "entityName": "basicAuth", "messageParams": {}, "contextId": "aecb85ce-bde4-4826-bc41-ae03c8dd87ae", "details": [ { "errorCode": "ACTION.AUTHENTICATION" } ], "errors": [ { "message": "REST call for action execute failed. Message:Request to backend service failed. To see error details, use test mode to execute the action, or execute request in Postman or other REST tools. [aecb85ce-bde4-4826-bc41-ae03c8dd87ae]", "code": "INVALID_CREDENTIALS", "status": 404, "messageParams": {}, "details": [], "errors": [] } ] }
Thanks for the help in advance.
Jason_Mathison | 2020-06-04 13:42:48 UTC | #2
Hi Jai Spicer,
Here are a couple of things to try. First: https://help.mypurecloud.com/articles/custom-action-fails-for-unexpected-reason/
Second, we have seen at least one vendor that returned a tokentype that they wouldn't accept due to a casing issue. You could try hard coding the tokentype if what they return doesn't match the value that they document accepting.
If that doesn't resolve it then please open a ticket with customer care to investigate.
--Jason
Jai_Spicer | 2020-06-04 22:18:37 UTC | #3
Hi Jason_Mathison,
I have tried what you recommended with no luck. I do find it strange that is failing here It looks like its failing on the user defined OAuth call because even when I hard code the token with one i generate in Postman it gets stuck at the same point. Its also making reference to Basic auth in the error which I have confirmed it is indeed using OAuth.
Jason_Mathison | 2020-06-05 12:38:29 UTC | #4
Hello again,
Re-reading this thread, are you saying that if you run the auth action in test mode that it works, but when you test a different action in this integration you are getting a step 4 authentication error? If so, please open up a customer care ticket ASAP so we can dig into this.
--Jason
system | 2020-07-06 12:38:31 UTC | #5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 7961