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

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”: “”,    “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”

still not work

 

Hi Felix,

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

header = “Authorization: Bearer <token>”

ex “Authorization: Bearer…”

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

 

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

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

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

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?

Karan,

Do you have any samples we can help debug?

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

Hi Joshua,

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

Thanks.