Using the Platform API via API Explorer, I'm able to make a call. I need this functionality in an agent script (button that calls Genesys Cloud Data Action). However, when I test the action, I get an error that it isn't in the user context (but when I test it from API Explorer it is). I assume it is because of the OAuth client.
How do I make this Data Action use the user's context/authorization, since it is only the user that will invoke it?
Error messages below:
"message": "The request could not be understood by the server due to malformed syntax.",
"code": "bad.request",
"status": 400,
"message": "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,\"