Hey everyone! I am super excited about exploring the Genesys Cloud audio and transcription APIs! We want to do some really advanced external NLP and biometrics analysis on our digital messaging channels as well as voice. We set up an AWS EventBridge integration to stream the Web Messaging transcripts into our external system. It works great for text, but we noticed that when a customer attaches an audio file (like a voice note) in WhatsApp or Web Messaging, the transcript event only gives us a secure URL, not the actual audio! How do we extract the actual audio file for external biometric processing?
Oh, this is an awesome use case! I build MuleSoft and Kafka pipelines for Genesys Cloud all the time! You are completely right, the event stream only passes the secure URL for media attachments! To get the actual audio file, your backend system has to make a subsequent API call using the GET /api/v2/conversations/messages/{conversationId}/attachments/{attachmentId} endpoint! You can easily set up a Kafka worker that listens for attachment URLs in the event stream, downloads the audio file asynchronously using the API, and then pushes the binary data into your biometrics engine! It is super scalable!
Hello! I am transitioning from PureConnect to Genesys Cloud, and I want to add one very important detail to the excellent architecture described above! In PureConnect, attachments were often stored locally on a server, but in Genesys Cloud, the URLs provided in the event stream are highly secure and time-sensitive! The attachment URLs expire very quickly to protect customer privacy! If your external Kafka worker or backend system does not download the audio file within the expiration window, the URL will return a 403 Forbidden error! Make sure your system processes those attachment events immediately!
S do not read the documentation regarding authentication. The URL provided in the event stream is not a public URL. You cannot simply pass it to an external system and execute an unauthenticated HTTP GET request.
The system attempting to download the media attachment must pass a valid Genesys Cloud OAuth Bearer token in the authorization header. Furthermore, the OAuth client you create for this purpose must have the specific conversation:message:view permission or the download will fail.
The security model is strict and unforgiving.