mawt | 2021-07-28 01:10:14 UTC | #1
I'm looking to get the count of voicemails that are currently in each user's inbox, but I can't seem to find anything that fits the bill for this.
Analytics API has tVoicemail, but this only covers the time spend in voicemail so the associated count is no good. I couldn't find anything in the Users API either.
Is there something that I've overlooked?
Thanks
Jerome.Saint-Marc | 2021-07-28 14:12:55 UTC | #2
Hello,
Unfortunately, I don't think there is an appropriate answer for your need - assuming you are trying to do this from a single account/OAuth client to check all users voicemail boxes.
Assuming you are interesting in ACD voicemails, making an an Analytics Query for Conversation Details could allow you to know that a voicemail has been left for a user (segment filters - purpose=voicemail and userId exists). But it won't tell you if the user has "read" the voicemail or if he deleted it.
The method to search for voicemails and to know if it is read or unread would be: POST /api/v2/voicemail/search using a body like this (as an example - for unread user voicemails):
{ "pageSize": 100, "pageNumber": 1, "query": [ { "fields": ["read"], "type": "EXACT", "value": "false" }, { "fields":["deleted"], "type":"EXACT", "value":"false" }, { "fields": ["owner"], "type": "EXACT", "value": "USER" } ] }
But unfortunately, this API endpoint requires a user context (Implicit Grant, Authorization Code Grant, SAML) and does not support Client Credentials Grant. Moreover, in case of voicemails transferred to a specific user (compared to Queue or to Group), I think that you will only see your voicemails (I mean the voicemails of the user whose user context/credentials are used). With Group, you should see them (if the user is part of the group).
Regards,
mawt | 2021-07-29 00:49:41 UTC | #3
I was trying to use a single OAuth client to check all users, so I might need to rethink our approach.
Thanks for the response!
system | 2021-08-29 00:49:45 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 11598