matheusscharf | 2023-10-23 18:33:02 UTC | #1
I'm trying to use a API to create a call to a determined agent but I'm getting the below error:
REST call for action execute failed. Message: Request to backend service failed. Response from web service: {"message":"This request requires a user context. Client credentials cannot be used for requests to this resource.","code":"not.a.user","status":400,"contextId":"b1abb69a-2122-4a20-ba43-8ad838de3adf","details":[],"errors":[]} [19a4e43a-ba0f-4446-8064-aab18c578b20]
Seems I just use the API in the context of the user.
Is there a way to create a call to a determined agent using API externally?
tim.smith | 2023-10-23 19:20:03 UTC | #2
You will need to implement any of the supported grant types that aren't client credentials; every other type is user-based. See here for documentation: https://developer.genesys.cloud/authorization/platform-auth/
If you're asking if you can have a user context without a user ever interacting to complete an auth flow, like a data action or a headless service on a server somewhere in your data center that has no UI, you cannot do that.
matheusscharf | 2023-10-24 00:06:46 UTC | #3
So, there isn't a way to create a new call to an specific agent using an outside request?
Thank you for your help @tim.smith
tim.smith | 2023-10-24 13:34:05 UTC | #4
If by "outside request" you mean one from outside Genesys' cloud servers, yes. That is the purpose of the Genesys Cloud Platform API. Just authorize with any of the aforementioned user-based oauth flows and your outside app can make use of the API to make user-based requests.
system | 2023-11-23 13:34:17 UTC | #5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 22698