I have OAuth client application and I want to subscribe it to notification topic and get data from WebSocket.
v2.users.{userId}.workforcemanagement.historicaladherencequery
But I cant do it, because my OAuth client application has not userId.
Could someone please help me?
What should I do to get this data?
Secondly, I created WebSocket channel via POST
https://{API URL by region}/api/v2/notifications/channels
And got connectUri and id from that
Thirdly, I POST
/api/v2/notifications/channels/{channelId}/subscriptions
Where channelId == id of channel from previous step
And put in json body
{"id":"v2.users.{client_id}.workforcemanagement.historicaladherencequery"}
with
Oh my god, it finally subscribed. I thought I didn`t need to use [ ] for one value.
Remains to understand why I do not receive messages in WebSocket messages after to api/v2/workforcemanagement/managementunits/{id}/historicaladherencequery
except WSMessage(type=<WSMsgType.TEXT: 1>, data='{"topicName": "channel.metadata", "eventBody": {"message": "WebSocket Heartbeat"}}', extra='')