Update Conversation Attributes from Salesforce

We have a scenario where a caller has been transferred to a user who is using Salesforce, and the user needs to transfer the call back into a Call Flow. We are trying to pass information that was collected by the user in Salesforce, and send it to a Call Flow. We have identified an API to update conversation Attributes: /api/v2/conversations/calls/{conversationId}/participants/{participantId}/attributes
and this works while testing it out in the Developer Tools, however when we try to test this out through Postman to see if we can do this within Salesforce we are getting the following error message:
{"message":"This request requires a user context. Client credentials cannot be used for requests to this resource.","code":"not.a.user","status":400}

Doing some research I keep seeing comments that we can't call Conversation... APIs as they need a user context, so I'm trying to determine if it is possible to call this API from Salesforce to update attributes or if there is another solution that we can use to pass data from Salesforce to PureCloud when doing transfers.

Hi Garrett,

Thanks for posting. The participant's API does not accept tokens from credential grants. It can only accept an OAuth token with a user context. If you want to test this in postman you can go to the Authorization window in postman and set up either an implicit credential or an authorization code authorization to receive an OAuth token with a user context.

Attached to the post is a screenshot of the form you use in postman.

Here is further information on how to set up and use Postman with our API.

https://developer.mypurecloud.com/api/rest/postman/index.html

Thanks,
John Carnell

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