Adding subscription "v2.users.{id}.conversations.{id}.recordings" throws an exception

I am trying to get the recordings notifications based on user id and conversation id, however adding the subscription triggers the following response

                PureCloudPlatform.Client.V2.Client.ApiException: Error calling PostNotificationsChannelSubscriptions: {"message":"Subscriptions to topic [v2.users.84eeeae1-5a94-4cee-89fd-f1bfb5365c0f.conversations.2050bea7-3f6f-4619-a76e-6a05bc702ee3.recordings] are restricted to the target user only","code":"forbidden","status":403,"contextId":"c4ef29fc-2223-48f9-8872-66e9939929ce","details":[],"errors":[]}
                    at PureCloudPlatform.Client.V2.Api.NotificationsApi.PostNotificationsChannelSubscriptionsWithHttpInfo(String channelId, List`1 body)
                    at PureCloudPlatform.Client.V2.Api.NotificationsApi.PostNotificationsChannelSubscriptions(String channelId, List`1 body)

The list of available topics at https://developer.genesys.cloud/notificationsalerts/notifications/available-topics
mentions that this particular subscription requires current user. On the other hand the available topics web page shows a red warning dot next to Required Permissions text. When placing the mouse pointer above the warning dot, a message pops up saying "Active account lacks required permission".

Any help / hint will be highly appreciated

P.S.
A similar approach to monitor recordings was referenced in an older thread

but the error described above was not mentioned there

P.P.S.
We are using WebSocket transport layer

This is saying that the auth token used to make the request is not for user 84eeeae1-5a94-4cee-89fd-f1bfb5365c0f, because only that user can subscribe to that topic. Use the user ID from GET /api/v2/users/me to subscribe to that topic.

Do I get it right that this is the same user id that my application uses to connect to the cloud? If so, using it resolved the problem with the exception, However I don't seem to receive the notifications of desired type.

Well, no matter what I do, I do not receive the notifications in question. Any suggestions how to address this problem?

Also, I am getting the following error

PureCloudPlatform.Client.V2.Client.ApiException: Error calling PostNotificationsChannelSubscriptions: {"message":"Not allowed to subscribe to topic "v2.analytics.conversation.b00ccfce-150d-43cc-bd40-36f9cb14ba77.metrics" for transport "WEBSOCKET"","code":"bad.request","status":400,"contextId":"85f7df4f-b376-49b6-ab51-16c55ea45b14","details":[],"errors":[]}
at PureCloudPlatform.Client.V2.Api.NotificationsApi.PostNotificationsChannelSubscriptionsWithHttpInfo(String channelId, List1 body) at PureCloudPlatform.Client.V2.Api.NotificationsApi.PostNotificationsChannelSubscriptions(String channelId, List1 body)

where b00ccfce-150d-43cc-bd40-36f9cb14ba77 is a valid conversation id

If you're sure you've subscribed to the correct topic and have caused events that will generate a notification on the subscribed topic, please open a case with Genesys Cloud Care to investigate the missing notification.

I can't see your request or the full error body returned to you, but you should see the error the error code "notification.transport.not.allowed" doesn't appear to be propagated to you. Check the list of available topics and ensure the topic you're attempting to use is available for WebSocket events.

If it's just the v2.analytics.conversation.{id}.metrics topic in the error message, that topic is only available to EventBridge integrations:

The explanation re. EventBridge covers it and I won't pursue this any further. As for the first part of my question, how can I confirm that I really generate a notification on the topic while I don't see it in my application? Also, is it possible to use a wildcard instead of the {conversationId} to ensure that I will receive notifications for all conversations of a particular user?

Addressing the recording notification, how long should I wait for it after the conversation is finished?

It depends on which topic you're talking about. If you mean the one in your original post, v2.users.{id}.conversations.{id}.recordings, it is raised when recording transcription completes and the recording is available for download. This will only be raised when the recording requires transcoding, which only happens for voice recordings that do not have a transcoded recording in the cache already. If you get a 202 response to GET /api/v2/conversations/{conversationId}/recordings/{recordingId}, the recording requires transcoding and the event will be raised when it's ready. If you get a 200, no event will be raised because the file is already available for download.

The only answer to this is "a reasonable amount of time". There are no specific SLAs around asynchronous operations like this. The duration depends on the media itself as well as overall processing capacity. I would suggest measuring the duration for your data and finding a baseline average. If you believe that the delay is unacceptable, that investigation will require specific examples and have to take place via a case with Care.

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