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

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’]);
$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.

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 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

1 Like

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

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

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.

@GCLUB thanks for your nice information. Now my all confusion is gone.

Glad they could help you @mubeenjahanzeb942 ! :slight_smile:

@casino Utan spellicens Thanks for sharing a piece of good knowledge. I really appreciate your attempt.

Thanks for helping out! :slight_smile:

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