# OAuth returning code 124 Invalid Access Token. How to diagnose? Need more info

**URL:** <https://devforum.zoom.us/t/oauth-returning-code-124-invalid-access-token-how-to-diagnose-need-more-info/54583>\
**Category:** API and Webhooks\
**Created:** [July 22, 2021, 9:03pm UTC](https://devforum.zoom.us/t/oauth-returning-code-124-invalid-access-token-how-to-diagnose-need-more-info/54583 "2021-07-22T21:03:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![usmtech](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/usmtech/32/10933_2.png) [@usmtech](https://devforum.zoom.us/u/usmtech)\
**Post date:** [July 22, 2021, 9:03pm UTC](https://devforum.zoom.us/t/oauth-returning-code-124-invalid-access-token-how-to-diagnose-need-more-info/54583/1 "2021-07-22T21:03:29Z")

</div>

## Using this template helps us debug your issues more effectively 🙂

**Description**  
I used the API to get my authorization code. My refresh token seems to be working. I can get a new access token every hour. However, when I make a call to the API, I get a 401 back with the content {“code”:124,“message”:“Invalid access token.”}

My app’s scope is report:read:admin

Is there any way to get more information? Is the token invalid due to a parse error? scope error? authorization error?

**Error**  
{“code”:124,“message”:“Invalid access token.”}

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

**Which Endpoint/s?**  
/metrics/meetings

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:

1. Request URL / Headers (without credentials) / Body

GET [https://api.zoom.us/v2/metrics/meetings?type=active&from=2021-07-01&to=2021-07-21](https://api.zoom.us/v2/metrics/meetings?type=active&from=2021-07-01&to=2021-07-21)  
Authorization: “bearer eyXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.eyXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.yXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”

1. See error

status: 401  
content: {“code”:124,“message”:“Invalid access token.”}  
string: HTTP/1.1 401 Unauthorized  
Cache-Control: no-cache, no-store, must-revalidate, no-transform  
Connection: close  
Date: Thu, 22 Jul 2021 17:55:04 GMT  
Pragma: no-cache  
Content-Type: application/json;charset=UTF-8  
Expires: Thu, 01 Jan 1970 00:00:00 GMT  
Client-Date: Thu, 22 Jul 2021 17:55:04 GMT  
Client-Peer: XX.XXX.XX.XXX:443  
Client-Response-Num: 1  
Client-SSL-Cert-Issuer: /C=US/O=DigiCert Inc/CN=DigiCert SHA2 Secure Server CA  
Client-SSL-Cert-Subject: /C=US/ST=California/L=San Jose/O=Zoom Video Communications, Inc./CN=\*.zoom.us  
Client-SSL-Cipher: ECDHE-RSA-AES256-GCM-SHA384  
Client-SSL-Socket-Class: IO::Socket::SSL  
Client-Transfer-Encoding: chunked  
Client-Warning: Missing Authenticate header  
Set-Cookie: zm\_aid=“”; [Domain=.zoom.us](http://Domain=.zoom.us); Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly  
Set-Cookie: zm\_haid=“”; [Domain=.zoom.us](http://Domain=.zoom.us); Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly  
Set-Cookie: web\_zak=“”; [Domain=.zoom.us](http://Domain=.zoom.us); Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly  
Set-Cookie: cred=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX; Path=/; Secure; HttpOnly  
Set-Cookie: \_zm\_ctaid=XXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX; [Domain=.zoom.us](http://Domain=.zoom.us); Expires=Thu, 22-Jul-2021 19:55:04 GMT; Path=/; Secure; HttpOnly  
Set-Cookie: \_zm\_chtaid=XXX; [Domain=.zoom.us](http://Domain=.zoom.us); Expires=Thu, 22-Jul-2021 19:55:04 GMT; Path=/; Secure; HttpOnly  
X-Content-Type-Options: nosniff  
X-Zm-Trackingid: v=2.0;clid=aw1;rid=WEB\_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

**Screenshots (If applicable)**  
N/A

**Additional context**  
I’m using Perl, if that matters.

---

<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:** [July 23, 2021, 3:08pm UTC](https://devforum.zoom.us/t/oauth-returning-code-124-invalid-access-token-how-to-diagnose-need-more-info/54583/2 "2021-07-23T15:08:29Z")

</div>

Hi @usmtech,

It looks like you’re calling our Dashboard endpoint (/metrics) but are trying to use a Report scope. In your OAuth App, please add the Dashboard read/admin scope and reauthorize the app.

Let me know if it resolves the error, thanks!  
Will

---

<div class="post-metadata">

**Author:** ![usmtech](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/usmtech/32/10933_2.png) [@usmtech](https://devforum.zoom.us/u/usmtech)\
**Post date:** [July 23, 2021, 4:40pm UTC](https://devforum.zoom.us/t/oauth-returning-code-124-invalid-access-token-how-to-diagnose-need-more-info/54583/3 "2021-07-23T16:40:51Z")

</div>

Thanks for that information. I had been attempting to get /report/users, and tried a different endpoint out of desperation without updating the scope. The wrong URL ended up in the ticket. My apologies. I know that’s not helpful. Added the new scope, then realized I needed to switch the endpoint back. Still no joy, though. Attempting either endpoint yields the same result.

Replacing scope =\> ‘report:read:admin’ with ‘dashboard\_meetings:read:admin report:read:admin’

===  
GET [https://api.zoom.us/v2/report/users?type=active&from=2021-07-01&to=2021-07-21](https://api.zoom.us/v2/report/users?type=active&from=2021-07-01&to=2021-07-21)  
Authorization: "bearer ey… "

status: 401  
content: {“code”:124,“message”:“Invalid access token.”}  
string: HTTP/1.1 401 Unauthorized  
Cache-Control: no-cache, no-store, must-revalidate, no-transform  
Connection: close  
Date: Fri, 23 Jul 2021 16:34:52 GMT  
Pragma: no-cache  
Content-Type: application/json;charset=UTF-8  
Expires: Thu, 01 Jan 1970 00:00:00 GMT  
Client-Date: Fri, 23 Jul 2021 16:34:52 GMT  
Client-Peer: 52.202.62.237:443  
Client-Response-Num: 1  
Client-SSL-Cert-Issuer: /C=US/O=DigiCert Inc/CN=DigiCert SHA2 Secure Server CA  
Client-SSL-Cert-Subject: /C=US/ST=California/L=San Jose/O=Zoom Video Communications, Inc./CN=\*.zoom.us  
Client-SSL-Cipher: ECDHE-RSA-AES256-GCM-SHA384  
Client-SSL-Socket-Class: IO::Socket::SSL  
Client-Transfer-Encoding: chunked  
Client-Warning: Missing Authenticate header  
[… cookies …]  
X-Content-Type-Options: nosniff  
X-Zm-Trackingid: v=2.0;clid=aw1;rid=WEB\_…

---

<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:** [July 26, 2021, 9:25pm UTC](https://devforum.zoom.us/t/oauth-returning-code-124-invalid-access-token-how-to-diagnose-need-more-info/54583/4 "2021-07-26T21:25:01Z")

</div>

Hi @usmtech,

I see, thank you for clarifying. Can you also make sure that you meet the prerequisites for these endpoints? Do you have a Pro or higher license for accessing the /report endpoints, or a Business or higher plan for accessing /metrics?

Let me know—thanks!  
Will

---

<div class="post-metadata">

**Author:** ![usmtech](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/usmtech/32/10933_2.png) [@usmtech](https://devforum.zoom.us/u/usmtech)\
**Post date:** [July 27, 2021, 6:39am UTC](https://devforum.zoom.us/t/oauth-returning-code-124-invalid-access-token-how-to-diagnose-need-more-info/54583/5 "2021-07-27T06:39:33Z")

</div>

I’m an admin on an EDU account. I’m assuming that’s equivalent to Pro at least?

---

<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:** [July 28, 2021, 1:46pm UTC](https://devforum.zoom.us/t/oauth-returning-code-124-invalid-access-token-how-to-diagnose-need-more-info/54583/6 "2021-07-28T13:46:18Z")

</div>

Hi @usmtech,

Yes, that should be sufficient access. I’d like to take a closer look at this for you—can you please send an email to [developersupport@zoom.us](mailto:developersupport@zoom.us) with the following details:

- Your OAuth App’s Client ID
- Latest request you’ve tested with and the error details

Thank you,  
Will

---

<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:** [August 27, 2021, 11:46pm UTC](https://devforum.zoom.us/t/oauth-returning-code-124-invalid-access-token-how-to-diagnose-need-more-info/54583/7 "2021-08-27T23:46:20Z")

</div>

Closed on August 27, 2021, 11:46pm UTC

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