Invalid Token Error Making API Call


#1

Hello,

I have created a new test application in the marketplace and have created a new set of credentials that I have create a JWT token with. All of the calls I have tried making to the API have resulted in the below error message:

{
“code”: 124,
“message”: “Invalid access token.”
}

I cannot access the API logs to see if there is something wrong with the signature or if its a permissions issue. Do I need to be an admin in Zoom to make API calls? How do I access the API call logs?

Thanks


#2

Hi @wbarnes,

You need to have a developer account to see the API call logs. Have you taken a look at our docs to see if you’re generating the JWT correctly? https://marketplace.zoom.us/docs/guides/authorization/jwt/generating-jwt

Thanks


#3

HI Michael,

I moved to using an OAuth flow instead of JWT and that seems to have helped. I can also now see the logs as my admin made me a developer. I will keep tinkering. One side note, in Github there is a PHP app that says it is deprecated and that a new one will be available soon, any idea when that new version is coming?


#4

Hi @wbarnes,

Glad that you’re able to get it resolved. For the PHP app, within the next few months we’ll determine if there is more demand to update the app, if so then we’ll update it tentatively around Q3 of 2019.


#5

Hi There,

I have made progress on obtaining a token from the API but I am now stumped on why I cannot call the recordings API with my token after I have defined scope in my original token request. This is sample response I got for my token request:

Request URI: https://zoom.us/oauth/token?grant_type=authorization_code&client_id={my_id}&client_secret={mysecret}&redirect_uri=https://localhost/callback.php&scope=recording:read:admin&code={myauthcode}

{
“access_token”: “{token}”,
“token_type”: “bearer”,
“refresh_token”: “refresh_token}”,
“expires_in”: 1304,
“scope”: “recording:read:admin
}

When I call the this API: https://api.zoom.us/v2/users/{myuserId}/recordings?access_token={myaccesstoken} I get the following error:

{“code”:124,“message”:“Invalid access token, does not contain scopes: [recording:write:admin]”}

Is the scope for that API call recording:write:admin or recording:read:admin or both?

Thanks,

Wes


#6

Hi @wbarnes,

Which API are you trying to call? With that error message you will need to choose the scope recording:write:admin within your app.

Thanks


#7

It looks like @wbarnes is trying to use https://marketplace.zoom.us/docs/api-reference/zoom-api/cloud-recording/recordingslist which should be a “read” scope, just like the documentation describes.