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

**URL:** <https://devforum.zoom.us/t/code-124-message-access-token-is-required-error-with-zoom-room-api/450>\
**Category:** API and Webhooks\
**Created:** [November 8, 2017, 11:02pm UTC](https://devforum.zoom.us/t/code-124-message-access-token-is-required-error-with-zoom-room-api/450 "2017-11-08T23:02:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felix\_Liang](https://avatars.discourse-cdn.com/v4/letter/f/b19c9b/32.png) [@Felix\_Liang](https://devforum.zoom.us/u/Felix_Liang)\
**Post date:** [November 8, 2017, 11:02pm UTC](https://devforum.zoom.us/t/code-124-message-access-token-is-required-error-with-zoom-room-api/450/1 "2017-11-08T23:02:19Z")

</div>

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.

&nbsp;

&nbsp;

curl -X POST “[https://api.zoom.us/v2/rooms/\<userID\>/meetings](https://api.zoom.us/v2/rooms/%3CuserID%3E/meetings)” -H&nbsp; “accept: application/json” -H&nbsp; “Content-Type: application/json” -d "{&nbsp; “jsonrpc”: “2.0”,&nbsp; “method”: “schedule”,&nbsp; “params”: {&nbsp;&nbsp;&nbsp; “password”: “Aa123”,&nbsp;&nbsp;&nbsp; “callback\_url”: “[https://api.test.zoom.us/callback?token=\<TOKEN\>",&nbsp;&nbsp;&nbsp;](https://api.test.zoom.us/callback?token=%3CTOKEN%3E%5C%22,%C2%A0%C2%A0%C2%A0) “meeting\_info”: {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; “topic”: “my meeting”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; “start\_time”: “2017-11-25T12:00:00”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; “timezone”: “America/Los\_Angeles”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; “duration”: “10”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; “settings”: {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; “join\_before\_host”: false&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; }&nbsp; }}”

&nbsp;

curl -X POST “[https://api.zoom.us/v2/rooms/\<roomID\>/meetings?token=ACCESS\_TOKEN\_HERE](https://api.zoom.us/v2/rooms/%3CroomID%3E/meetings?token=ACCESS_TOKEN_HERE)” -H&nbsp; “accept: application/json” -H&nbsp; “Content-Type: application/json” -d "{&nbsp; “jsonrpc”: “2.0”,&nbsp; “method”: “schedule”,&nbsp; “params”: {&nbsp;&nbsp;&nbsp; “password”: “”,&nbsp;&nbsp;&nbsp; “callback\_url”: “[https://api.test.zoom.us/callback?token=\<TOKEN\>",&nbsp;&nbsp;&nbsp;](https://api.test.zoom.us/callback?token=%3CTOKEN%3E%5C%22,%C2%A0%C2%A0%C2%A0) “meeting\_info”: {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; “topic”: “my meeting”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; “start\_time”: “2017-11-25T12:00:00”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; “timezone”: “America/Los\_Angeles”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; “duration”: “10”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; “settings”: {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; “join\_before\_host”: false&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; }&nbsp; }}”

&nbsp;

Also i tried to send token via

–header “Authorization:token”

still not work

&nbsp;

---

<div class="post-metadata">

**Author:** ![Joshua\_Woodward1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/joshua_woodward1/32/1480_2.png) [@Joshua\_Woodward1](https://devforum.zoom.us/u/Joshua_Woodward1)\
**Post date:** [November 8, 2017, 11:33pm UTC](https://devforum.zoom.us/t/code-124-message-access-token-is-required-error-with-zoom-room-api/450/2 "2017-11-08T23:33:30Z")

</div>

Hi Felix,

[https://zoom.github.io/api/#authentication](https://zoom.github.io/api/#authentication)

header = “Authorization: Bearer \<token\>”

ex “Authorization: Bearer…”

---

<div class="post-metadata">

**Author:** ![Felix\_Liang](https://avatars.discourse-cdn.com/v4/letter/f/b19c9b/32.png) [@Felix\_Liang](https://devforum.zoom.us/u/Felix_Liang)\
**Post date:** [November 9, 2017, 12:00am UTC](https://devforum.zoom.us/t/code-124-message-access-token-is-required-error-with-zoom-room-api/450/3 "2017-11-09T00:00:57Z")

</div>

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

&nbsp;

curl --header “Authorization: Bearer” -X POST “[https://api.zoom.us/v2/users//meetings](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 } } }}”

---

<div class="post-metadata">

**Author:** ![Joshua\_Woodward1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/joshua_woodward1/32/1480_2.png) [@Joshua\_Woodward1](https://devforum.zoom.us/u/Joshua_Woodward1)\
**Post date:** [November 9, 2017, 1:03am UTC](https://devforum.zoom.us/t/code-124-message-access-token-is-required-error-with-zoom-room-api/450/4 "2017-11-09T01:03:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Priyank\_Kotiyal1](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@Priyank\_Kotiyal1](https://devforum.zoom.us/u/Priyank_Kotiyal1)\
**Post date:** [November 9, 2017, 4:20am UTC](https://devforum.zoom.us/t/code-124-message-access-token-is-required-error-with-zoom-room-api/450/5 "2017-11-09T04:20:14Z")

</div>

Hi Felix,

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

1. I think your are picking access token from&nbsp;[https://developer.zoom.us/me/#api](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.&nbsp;

Try this -:

```
curl -H "Authorization: Bearer <ACCESS_TOKEN>"

```

Thanks

Priyank

---

<div class="post-metadata">

**Author:** ![Karan\_Vyas](https://avatars.discourse-cdn.com/v4/letter/k/41988e/32.png) [@Karan\_Vyas](https://devforum.zoom.us/u/Karan_Vyas)\
**Post date:** [November 9, 2017, 7:40am UTC](https://devforum.zoom.us/t/code-124-message-access-token-is-required-error-with-zoom-room-api/450/6 "2017-11-09T07:40:51Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Joshua\_Woodward1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/joshua_woodward1/32/1480_2.png) [@Joshua\_Woodward1](https://devforum.zoom.us/u/Joshua_Woodward1)\
**Post date:** [November 9, 2017, 6:44pm UTC](https://devforum.zoom.us/t/code-124-message-access-token-is-required-error-with-zoom-room-api/450/7 "2017-11-09T18:44:57Z")

</div>

Karan,

Do you have any samples we can help debug?

---

<div class="post-metadata">

**Author:** ![Joshua\_Woodward1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/joshua_woodward1/32/1480_2.png) [@Joshua\_Woodward1](https://devforum.zoom.us/u/Joshua_Woodward1)\
**Post date:** [November 9, 2017, 7:58pm UTC](https://devforum.zoom.us/t/code-124-message-access-token-is-required-error-with-zoom-room-api/450/8 "2017-11-09T19:58:49Z")

</div>

Here is an example in PHP&nbsp;[https://gist.github.com/joshuawoodward/929e1743036a9512692c1c02c606d04d](https://gist.github.com/joshuawoodward/929e1743036a9512692c1c02c606d04d)

---

<div class="post-metadata">

**Author:** ![Karan\_Vyas](https://avatars.discourse-cdn.com/v4/letter/k/41988e/32.png) [@Karan\_Vyas](https://devforum.zoom.us/u/Karan_Vyas)\
**Post date:** [November 10, 2017, 4:30am UTC](https://devforum.zoom.us/t/code-124-message-access-token-is-required-error-with-zoom-room-api/450/9 "2017-11-10T04:30:21Z")

</div>

Hi Joshua,

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

Thanks.
