Add user to call queue voicemail access list

API Endpoint(s) and/or Zoom API Event(s)
Phone/call_queues/$callQueueId/policies/voice_mail

Description
I am trying to add users to the user access list for a call queue’s Voicemail. I have run into an issue where I cannot get the method to validate because I cannot provide a shared_id. I am not sure how to get past this since it seems the shared_id is randomly generated when adding the user to the voicemail access list in the web GUI.

Error?
Passing a null, or empty value for shared_id results in a failure.

How To Reproduce
Steps to reproduce the behavior:
*1. Below is my invoke command (powershell)
invoke-restmethod -uri “https://api.zoom.us/v2/phone/call_queues/$callQueueId/policies/voice_mail” -Method Patch -Headers $headers -Body $jsonVoicemailSettings

Variables:
$headers = @{
Authorization = “Bearer $accessToken”
‘Content-Type’ = ‘application/json’
}

$jsonVoicemailSettings
{
“voicemail_access_members”: [
{
“allow_delete”: true,
“access_user_id”: “DL0B7yjWTk6uyCTP5R2B9w”,
“allow_sharing”: true,
“shared_id”: null,
“allow_download”: true
}
]
}
2. Access type - Server to Server app token
3. Errors :invoke-restmethod : {“code”:300,“message”:“Validation Failed.”,“errors”:[{“field”:“access_user_id”,“field_value”:“DL0B7yjWTk6uyCTP5R2B9w”,“message”:“Shared voicemail not found for (DL0B7yjWTk6uyCTP5R2B9w).”}]}
At line:1 char:1

  • invoke-restmethod -uri "https://api.zoom.us/v2/phone/call_queues/$cal
  •   + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
      + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

At the risk of oversimplifying, I briefly ran into this the other week before realizing I was trying to Patch in new data rather than using the explicit Add endpoint for voicemail users (Add a policy setting to a call queue Zoom Phone API). I think the issue for me was just a bit of weirdness in the API documentation, at least how I read it, but it made sense. Hopefully this helps!

Thanks for the input Joe. This is exactly what was going on and the change from PATCH to POST got the changes to succeed.

1 Like

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