FlavioVezonoFilho | 2024-08-08 13:28:05 UTC | #1
I am trying to use
POST /api/v2/conversations/{conversationId}/participants/{participantId}/secureivrsessions
to transger a caller into a diferrent flow. I am get the sourceParticipantId, participantId and userData using
GET /api/v2/analytics/conversations/details?id={conversationId}
and my request is like this:
await axios.post(
`https://api.mypurecloud.com/api/v2/conversations/${callUUID}/participants/${this.participantId}/secureivrsessions`,
{
participantId: this.participantId,
sourceParticipantId: this.sourceParticipantId,
flowId: this.flowId,
userData: this.queueId,
disconnect: true,
},
{
headers: {
Authorization: `Bearer ${this.token}`,
"Content-Type": "application/json",
},
}
);
I get the following error:
This request requires a user context. Client credentials cannot be used for requests to this resource
Jerome.Saint-Marc | 2024-08-12 17:16:36 UTC | #2
Hello,
I am not sure what the question is. The error describes what the issue is - you cannot use a token obtained via an OAuth Client Credentials Grant flow to invoke this API Endpoint. You need to use an auth/bearer token, related to a user context (the user connected to this call) using an OAuth Implicit Grant flow, or an Authorization Code/PKCE Code/Saml2Bearer grant flow.
Regards,
system | 2024-09-11 17:17:12 UTC | #3
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: 27783