Andy, this looks accurate. Your code should not need the OAuth > All permissions in the OAuth role. Unless your code is creating/managing/requesting OAuth client details. To do that you would need to have the /API/oauth URI in your code. They may have suggested that so that you can create and manage OAuth client accounts, that you will use in your code.
Original Message:
Sent: 10-26-2023 11:02
From: Andy Forbes
Subject: Using API to get voice transcriptions - Issue with OAuth access / role permssions
Hi there,
Thanks. I think I'm getting my head round how this works. We aren't downloading the voice recording, just the transcript so I think a slimmer set of permissions might be possible:
So we are using:
Conversation API - get conversation (conversationId) - permissions required - conversation:communication:view?
Speech and Text Analytics API - get speechandtextanalyicsconversation (conversatonId) - permissions required - recording:recording:view?
Speech and Text Analytics API - get SpeechandtextanalyticsConversationCommunicationTranscripturl(conversationId, communicationId) - permissions required - recording:recording:view?
We have been advised to also have:
Permissions - OAuth:All permissions (which is broad), but not sure if we need this at all?
------------------------------
Andy Forbes
Domestic & General Services Limited
Original Message:
Sent: 10-26-2023 09:51
From: Jose Carlos Albor
Subject: Using API to get voice transcriptions - Issue with OAuth access / role permssions
The below image shows the permissions that we assigned to an oAuth account to successfully poll the following API Endpoints to download recordings and transcripts...
- /api/v2/analytics/conversations/details/query
- /api/v2/speechandtextanalytics/conversations/$($Object.conversationId)
- /api/v2/speechandtextanalytics/conversations/$($Object."Conversation ID")/communications/$($Object."Session ID")/transcripturl
- /api/v2/conversations/$($Object."Conversation ID")/recordings/$($Object."Session ID")?formatId=WAV&emailFormatId=NONE&chatFormatId=NONE&messageFormatId=NONE&download=true&fileName=$($($Object."Session ID").Replace("-","_"))&locale=$($recordingPath)
- Note: Conversation communicationId is the same as Conversation sessionId.
My script is built in Microsoft PowerShell ISE. All variables are preceded with a $ character.
------------------------------
Carlos Albor
Senior Principal PS Consultant
Original Message:
Sent: 10-23-2023 11:44
From: Andy Forbes
Subject: Using API to get voice transcriptions - Issue with OAuth access / role permssions
Hi,
We are trying to use APIs (new to Genesys Cloud) to achieve the below / link to Genesys
Tutorial walks through the steps to get the sentiment score and voice transcript of voice interactions using the Speech and Text Analytics API.
Voice Transcription (genesys.cloud)
We have a new OAuth client (Client Credentials) set up and can get the OAuth token ok, but get error messages when trying to do the API calls as follows:
{
message: 'You are not authorized to perform the requested action.',
code: 'not.authorized',
status: 403,
contextId: '23303c3c-da25-42ac-856c-3bedeba810a5',
details: [],
errors: []
}
The OAuth has a role with the permissions:
Analytics>Conversation Details>View, and
Speech and Text Analytics>Data>View
We added the Conversation details one, but get the same error. Are more Permissions required for the Role for this OAuth?
#Integrations
------------------------------
Andy Forbes
Domestic & General Services Limited
------------------------------