Help to use an API to create a new call

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?

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.

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

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.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.