The Consult Transfer method is only supported when using a user context (token obtained via Implicit Grant, Authorization Code Grant or SAML grant) and if the user is an active participant of the call.
Like most of conversation control method, Consult Transfer is not supported when using a Client Credentials grant/token or if the user requesting the consult transfer is not a participant in the call (ex: sending chat messages on behalf of a user, ...).
The "blind transfer" is somehow an exception to this as it works with Client Credentials.
Thanks for the reply! We are integrating with the PEF.
The PEF UI is able to make the call to make a consult transfer, however the API call we make with the token we've take from the API loaded into the PEF doesn't work?
This is how we get the token from the API that the PEF loaded into memory
I think it is possibly because you are not using the correct participantId (just tried it with Genesys Desktop and API Explorer in Dev Tools).
Interestingly, with consult transfer, the participantId to use in the request seems to be the one corresponding to the customer/external participant.
I mean not using the participantId corresponding to the Contact Center Agent (like for Blind Transfer).
Don't ask me why I just checked what Genesys Desktop was doing and tried via API Explorer to use the agent's participantId (error - not.a.participant) and the customer/external's participantId (consult transfer worked).
As a side note, with PEF, I think you are not obliged to go through the getAuthToken and the Platform API request for Consult Transfer.
I haven't practiced PEF heavily but you have an available action to trigger a consultTransfer: Interaction.updateState with action=consultTransfer.
The advantage is that you won't have to get the conversation context/details to find the participantId (I assume that's what you are currently doing with a GET /api/v2/analytics/conversations/{conversationId}/details or with a GET /api/v2/conversations/{conversationId}). You just need to specify the ID of the interaction and the consult transfer target and type.