Description
I am trying to list the auto receptionists in my account.
Error?
When calling this API endpoint using a token generated from a Server-to-Server Oauth App, I get the response: {‘code’: 101, ‘message’: ‘AccessControl for this API is not set.’}. If I use that same token for other API endpoints it works. I do have the phone:read:admin scope set in the app as indicated in the API documentation.
However, when using a JWT token from a JWT app (which will be deprecated soon) this works fine. It only does not work with Server-to-Server Oauth as far as I can tell.
How To Reproduce
To reproduce this, make a Server-to-Server Oauth app with the scope phone:read:admin and try to list auto receptionists with a GET call to the https://api.zoom.us/v2/phone/auto_receptionists/ endpoint.
Yes I do have the permissions enabled in my account to use Server-to-Server OAuth. I am able to successfully use it for multiple other API endpoints but am running into this issue with this endpoint specifically. I did also ensure that the phone:read:admin scope is set in the app.
Hi Elisa, I found out that the issue here is the trailing “/” in the URL. Apparently that does not affect anything when using JWT authentication but it causes it to fail when using Server-to-Server Oauth. This topic can be closed. Thank you.
Hi @kevter.tgt
Thanks for reaching out to us, are you able to double encode the site ID when making this request?
is this happening everytime you call the endpoint or just with specifit site IDs?
Can you provide the syntax for what that should look like? Using 1234abcde as an example site ID.
Now I’m getting something different, all the site IDs return the response below (got site IDs from here - https://api.zoom.us/v2/phone/sites?page_size=30). Same results regardless if there is a slash at the end or not.
{
“code”: 300,
“message”: “Validation Failed.”,
“errors”: [
{
“field”: “locationId”,
“message”: “Location does not exist: 1234abcde.”
}
]
}
Again, the site IDs are returned when doing the phone sites call.