Get transcript JSON from URL using a data action?

Hi all,
We are trying to provide voice interaction transcripts from a conversation, to an agent's screen using agent scripts. While we are able to do this using external scripting, we are trying to accomplish it fully within genesys.
Using a few custom data actions, we can use the following API:
/api/v2/speechandtextanalytics/conversations/{conversationId}/communications/{communicationId}/transcripturl
To get the amazon AWS URL of the transcript. This is where our roadblock lies. Is there any way of GET-ing the transcript from this URL via a data action? I'm thinking JSONPath can be used to easily get text phrases from the "response" afterwards.
So far i've tried creating a custom web services data action with the URL as an input variable, but have had no success in getting it to work

If anyone has any ideas, they would be greatly appreciated.
Regards,

Hi Nebojsa,

Just to make sure I understand, are you saying that the speechandtextanalytics API is returning you an AWS URL, but you are unable to do a GET on that URL? Is that URL expected to be publicly accessible, like can you open that URL in a web browser without having to authenticate?

--Jason

Hi, yes, i am able to open up that URL in a browser directly without any additional authentication.
And yes, i am unable to GET this URL, this is the response i get:

{
"message": "The server encountered an unexpected condition which prevented it from fulfilling the request.",
"code": "internal.server.error",
"status": 500,
"messageParams": {},
"contextId": "3aaf3d99-dda7-4ce4-81c3-d6d942fec910",
"details": [
{
"errorCode": "ACTION.REMOTE_ENDPOINT"
}
],
"errors": [
{
"message": "REST call for action execute failed. Message:Unable to send message after 2 attempts, due to: SSLPeerUnverifiedException: Certificate for <prod-us-east-1-transcript.s3.amazonaws.com> doesn't match any of the subject alternative names: [*.s3.amazonaws.com, s3.amazonaws.com] [3aaf3d99-dda7-4ce4-81c3-d6d942fec910]",
"code": "INTERNAL_SERVER_ERROR",
"status": 500,
"messageParams": {},
"details": [],
"errors": []
}
]
}

We have run into some problems like this before with AWS us-east-1 URLs. Try formatting the URL like this:
prod-us-east-1-transcript.s3.us-east-1.amazonaws.com and see if that works better.

Tried it and now i got a different error response:
{
"message": "You are not authorized to perform the requested action.",
"code": "not.authorized",
"status": 403,
"messageParams": {},
"contextId": "0d959918-6298-4c37-a2cc-bcb3e9a72743",
"details": [
{
"errorCode": "ACTION.REMOTE_ENDPOINT"
}
],
"errors": [
{
"message": "REST call for action execute failed. Message:Request to backend service failed. Response from web service: <?xml version=\"1.0\" encoding=\"UTF-8\"?>\nSignatureDoesNotMatchThe request signature we calculated does not match the signature you provided. Check your key and signing method.
}

If you are attempting to use a signed link this could be some sort of URL encoding problem. I would suggest opening up a case with support so that we can see exactly what you are trying to do and troubleshoot from there. I don't want your authentication information on a public forum.

Another option to consider is to create an AWS lambda to get and process this data and use a lambda data action instead of a custom web service data action.

--Jason

Thank you, i opened a ticket to check this further

Ps. the ticket number is 0002952637

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