"code":124,"message":"Access token is required." error with zoom room API


#1

I tried to test zoom api to schedule a meeting. But keep got error like this “code”:124,“message”:“Access token is required.”

Here is the command i tried before. Each time have the same error as upper shows.

 

 

curl -X POST “https://api.zoom.us/v2/rooms/<userID>/meetings” -H  “accept: application/json” -H  “Content-Type: application/json” -d "{  “jsonrpc”: “2.0”,  “method”: “schedule”,  “params”: {    “password”: “Aa123”,    “callback_url”: “https://api.test.zoom.us/callback?token=<TOKEN>",    “meeting_info”: {      “topic”: “my meeting”,      “start_time”: “2017-11-25T12:00:00”,      “timezone”: “America/Los_Angeles”,      “duration”: “10”,      “settings”: {        “join_before_host”: false      }    }  }}”

 

curl -X POST “https://api.zoom.us/v2/rooms/<roomID>/meetings?token=ACCESS_TOKEN_HERE” -H  “accept: application/json” -H  “Content-Type: application/json” -d "{  “jsonrpc”: “2.0”,  “method”: “schedule”,  “params”: {    “password”: “Aa123”,    “callback_url”: “https://api.test.zoom.us/callback?token=<TOKEN>",    “meeting_info”: {      “topic”: “my meeting”,      “start_time”: “2017-11-25T12:00:00”,      “timezone”: “America/Los_Angeles”,      “duration”: “10”,      “settings”: {        “join_before_host”: false      }    }  }}”

 

Also i tried to send token via

–header “Authorization:token WDuI3tPXNdvd0d7QsfpqVmlnsMrjVk4HG2kE”

still not work

 


#2

Hi Felix,

https://zoom.github.io/api/#authentication

header = “Authorization: Bearer <token>”

ex “Authorization: Bearer WDuI3tPXNdvd0d7QsfpqVmlnsMrjVk4HG2kE…”


#3

Still the same error Can you help to check my command is correct or not :

 

curl --header “Authorization: Bearer WDuI3tPXNdvd0d7QsfpqVmlnsMrjVk4HG2kE” -X POST “https://api.zoom.us/v2/users/wreobGxqTyCa6hHso8HP9g/meetings” -H “accept: application/json” -H “Content-Type: application/json” -d “{ “jsonrpc”: “2.0”, “method”: “schedule”, “params”: { “password”: “Aa123”, “meeting_info”: { “topic”: “my meeting”, “start_time”: “2017-11-25T12:00:00”, “timezone”: “America/Los_Angeles”, “duration”: “10”, “settings”: { “join_before_host”: false } } }}”


#4

Doesn’t look like a valid JWT, where are you getting token from?


#5

Hi Felix,

    1) JWT is in the form Header.Payload.Signature. Your token is in wrong format. See https://developer.zoom.us/blog/api-authentication-frameworks/

  1. I think your are picking access token from https://developer.zoom.us/me/#api, which is completly wrong.

  2. If zoom is giving error “Access token is required”, it means zoom is not recognising that you have passed any token. If your access token is in wrong format then it will return “Invalid access token”, which means zoom recognises access token but its not in correct format. 

Try this -:

curl -H "Authorization: Bearer <ACCESS_TOKEN>"

Thanks

Priyank


#6

I am also getting the same error. I am using this with Rails. I am still not able to get this error done. Can anyone help with this?


#7

Karan,

Do you have any samples we can help debug?


#8

Here is an example in PHP https://gist.github.com/joshuawoodward/929e1743036a9512692c1c02c606d04d


#9

Hi Joshua,

I am able to resolve the error…it seems I am creating wrong JWT token.

Thanks.