using /api/v2/conversations/{conversationId}/participants/{participantId} with
{
"held": "True"
}
works fine in the developers tools but fails when testing a custom action.
in Integrations/Actions
seems that the developer tool runs in the context of a user while custom actions do not. Does this mean I have hit a brick wall ? any workarounds?
That's correct. The developer tools leverage your own credentials (context of a user).
The Genesys Cloud Data Action currently relies on an OAuth Client Credentials grant (server/non-user context).
Acting on a conversation/call requires a user context (the user also needs to be an active participant of the conversation) for most of the call controls (hold, dtmf, ...).
In the meantime, the only way I can think of (with client side integration) would be to leverage a Client Application integration, with some custom code that leverages the Platform API to achieve what you need.
The webapp code can trigger an Implicit Grant Authorization flow and can leverage user's credentials/context.
The Interaction Widget integration can be a good fit for this as the webapp is then exposed via a custom tab within the conversation area.
With Interaction Widget integration, the conversationId is available via URL interpolation.
See here for some more details.