# OAuth 401 Unauthorized response: “code”:124,”message”:”Invalid access token

**URL:** <https://devforum.zoom.us/t/oauth-401-unauthorized-response-code-124-message-invalid-access-token/47260>\
**Category:** API and Webhooks\
**Created:** [April 5, 2021, 1:28pm UTC](https://devforum.zoom.us/t/oauth-401-unauthorized-response-code-124-message-invalid-access-token/47260 "2021-04-05T13:28:02Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![teodora2799](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@teodora2799](https://devforum.zoom.us/u/teodora2799)\
**Post date:** [April 5, 2021, 1:28pm UTC](https://devforum.zoom.us/t/oauth-401-unauthorized-response-code-124-message-invalid-access-token/47260/1 "2021-04-05T13:28:02Z")

</div>

**Description**  
I’m trying to integrate the Meeting API (create a meeting, get a meeting, delete meeting) using PHP 7 and yii2 advanced.  
I’ve registered app on Zoom APP Marketplace, got the credentials and using them I’m requesting access tokens for users on my platform. I believe I’m getting correct access tokens, I store them in DB and then when user wants to create zoom meeting I’m calling this endpoint **/v2/users/me/meetings** and I’m passing user’s token in the Authorization header like this _“headers” =\> [“Authorization” =\> “Bearer $accessToken”]_ but I always get a **401 Unauthorized response: “code”:124,“message”:"Invalid access token.**

**Error**  
401 Unauthorized response: “code”:124,“message”:"Invalid access token.

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
OAuth

**Which Endpoint/s?**  
/v2/users/me/meetings

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:  
$client = new Client([‘base\_uri’ =\> ‘[https://api.zoom.us](https://api.zoom.us)’]);  
$client-\>request(‘POST’, ‘/v2/users/me/meetings’, [  
“headers” =\> [  
“Authorization” =\> “Bearer $accessToken”  
],  
‘json’ =\> [  
“topic” =\> $meeting,  
“type” =\> 2,  
“start\_time” =\> $meetingStartTime,  
“duration” =\> $meetingDuration,  
“password” =\> “”  
],  
]);

**Additional context**  
I’ve checked every similar topic to my issue but still I wasn’t able to resolve it. Thanks.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [April 5, 2021, 3:23pm UTC](https://devforum.zoom.us/t/oauth-401-unauthorized-response-code-124-message-invalid-access-token/47260/2 "2021-04-05T15:23:42Z")

</div>

Hey @teodora2799,

Thanks for reaching out about this. In order to take a closer look and help debug, can you send us an email at [developersupport@zoom.us](mailto:developersupport@zoom.us) with the following details?:

- Full request you’re making, including the values you’re passing for the authorization header
- Email address or user ID associated with the OAuth App you’re using to authenticate your request

Thanks!  
Will

---

<div class="post-metadata">

**Author:** ![mubeenjahanzeb942](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mubeenjahanzeb942/32/20226_2.png) [@mubeenjahanzeb942](https://devforum.zoom.us/u/mubeenjahanzeb942)\
**Post date:** [April 12, 2021, 5:06am UTC](https://devforum.zoom.us/t/oauth-401-unauthorized-response-code-124-message-invalid-access-token/47260/3 "2021-04-12T05:06:51Z")

</div>

Hi! I am facing same trouble right now. Any help would be appreciated.  
Thanks!

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [April 12, 2021, 5:06pm UTC](https://devforum.zoom.us/t/oauth-401-unauthorized-response-code-124-message-invalid-access-token/47260/4 "2021-04-12T17:06:36Z")

</div>

Hi @mubeenjahanzeb942,

Please share the above details with us following the steps above, and this will help us to take a closer look!

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![teodora2799](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@teodora2799](https://devforum.zoom.us/u/teodora2799)\
**Post date:** [April 13, 2021, 7:31am UTC](https://devforum.zoom.us/t/oauth-401-unauthorized-response-code-124-message-invalid-access-token/47260/5 "2021-04-13T07:31:43Z")

</div>

My issue was with the value of the access\_token. I was storing the token in a VARCHAR(255) column which is not enough for its value, so make sure your access\_token column can store a larger number of characters.

---

<div class="post-metadata">

**Author:** ![mubeenjahanzeb942](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mubeenjahanzeb942/32/20226_2.png) [@mubeenjahanzeb942](https://devforum.zoom.us/u/mubeenjahanzeb942)\
**Post date:** [April 14, 2021, 12:38am UTC](https://devforum.zoom.us/t/oauth-401-unauthorized-response-code-124-message-invalid-access-token/47260/6 "2021-04-14T00:38:35Z")

</div>

@[GCLUB](https://gclubdealer.com/) thanks for your nice information. Now my all confusion is gone.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [April 14, 2021, 2:28pm UTC](https://devforum.zoom.us/t/oauth-401-unauthorized-response-code-124-message-invalid-access-token/47260/7 "2021-04-14T14:28:44Z")

</div>

Glad they could help you @mubeenjahanzeb942 ! 🙂

---

<div class="post-metadata">

**Author:** ![mubeenjahanzeb942](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mubeenjahanzeb942/32/20226_2.png) [@mubeenjahanzeb942](https://devforum.zoom.us/u/mubeenjahanzeb942)\
**Post date:** [April 19, 2021, 6:38am UTC](https://devforum.zoom.us/t/oauth-401-unauthorized-response-code-124-message-invalid-access-token/47260/8 "2021-04-19T06:38:47Z")

</div>

@[casino Utan spellicens](https://www.casinoutanlicens.tips/) Thanks for sharing a piece of good knowledge. I really appreciate your attempt.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [April 20, 2021, 4:32pm UTC](https://devforum.zoom.us/t/oauth-401-unauthorized-response-code-124-message-invalid-access-token/47260/9 "2021-04-20T16:32:32Z")

</div>

Thanks for helping out! 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [May 21, 2021, 2:33am UTC](https://devforum.zoom.us/t/oauth-401-unauthorized-response-code-124-message-invalid-access-token/47260/10 "2021-05-21T02:33:13Z")

</div>

Closed on May 21, 2021, 2:33am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
