# Code: 124, message: 'Invalid access token.' Error

**URL:** <https://devforum.zoom.us/t/code-124-message-invalid-access-token-error/73893>\
**Category:** Web\
**Created:** [August 9, 2022, 8:39am UTC](https://devforum.zoom.us/t/code-124-message-invalid-access-token-error/73893 "2022-08-09T08:39:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![manalg](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@manalg](https://devforum.zoom.us/u/manalg)\
**Post date:** [August 9, 2022, 8:39am UTC](https://devforum.zoom.us/t/code-124-message-invalid-access-token-error/73893/1 "2022-08-09T08:39:56Z")

</div>

Scoured through the devforum but couldn’t solve my issue.

* * *

**Meeting SDK Type and Version**  
Web Meeting SDK, JWT App, Account-level app.

**Description**  
I’m developing a simple app to create a meeting using the zoom api  
const url = “[https://api.zoom.us/v2/users/{userid}/meetings](https://api.zoom.us/v2/users/%7Buserid%7D/meetings)”. I have passed in the body and header as follows:

const data = {  
“agenda”: “My Meeting”,  
“default\_password”: false,  
“duration”: 60,  
“password”: “123456”,  
“pre\_schedule”: false  
}

```
        const params = {
            uri: url,
            method: 'POST',
            mode: 'cors',
            header: {
                'Content-Type': 'application/json',
                'authorization': 'Bearer xxx'
            },
            body: JSON.stringify(data)
        }

        fetch(url, params)
            .then(res => res.json())
            .then(result => console.log(result))
            .catch(err => console.log(err))
    })

```

This api works in Postman well with the above body and header, but returns 124, invalid access token in my browser. I have disabled cors check on my browser since this is only a internal app. I have also tried using the me/meetings path, but doesn’t work.

**Error?**  
{code: 124, message: ‘Invalid access token.’}

code: 124  
message: “Invalid access token.”  
[[Prototype]]: Object

```
constructor: ƒ Object()
hasOwnProperty: ƒ hasOwnProperty()
isPrototypeOf: ƒ isPrototypeOf()
 propertyIsEnumerable: ƒ propertyIsEnumerable()
 toLocaleString: ƒ toLocaleString()
 toString: ƒ toString()
 valueOf: ƒ valueOf()
 __defineGetter__ : ƒ __defineGetter__ ()
 __defineSetter__ : ƒ __defineSetter__ ()
 __lookupGetter__ : ƒ __lookupGetter__ ()
 __lookupSetter__ : ƒ __lookupSetter__ ()
 __proto__ : (...)
 get __proto__ : ƒ __proto__ ()
set __proto__ : ƒ __proto__ ()

```

**Troubleshooting Routes**  
Tried everything from sample app to all suggestions by others on the forum, but nothing works.

**How To Reproduce**  
_Steps to reproduce the behavior including:_  
Authentication method: JWT token, App type: JWT app

Thanks.

---

<div class="post-metadata">

**Author:** ![j.schoenemeyer](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@j.schoenemeyer](https://devforum.zoom.us/u/j.schoenemeyer)\
**Post date:** [August 9, 2022, 6:02pm UTC](https://devforum.zoom.us/t/code-124-message-invalid-access-token-error/73893/2 "2022-08-09T18:02:21Z")

</div>

which API you using (incl version)?

you use the deprecated JWT app?

where is the sample app from, which version?

all zoom examples that I know from March 2022 and newer are using the SDK JWT (not compatible with the JWT app)

Jürgen

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [August 10, 2022, 12:49am UTC](https://devforum.zoom.us/t/code-124-message-invalid-access-token-error/73893/3 "2022-08-10T00:49:21Z")

</div>

Welcome, @manalg ,

Thank you for posting! That behavior sounds strange. You mentioned that the API works in Postman, have you tried to manually add the working Bearer access token when making the fetch API request?

---

<div class="post-metadata">

**Author:** ![manalg](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@manalg](https://devforum.zoom.us/u/manalg)\
**Post date:** [August 10, 2022, 8:02am UTC](https://devforum.zoom.us/t/code-124-message-invalid-access-token-error/73893/4 "2022-08-10T08:02:10Z")

</div>

api: [https://api.zoom.us/v2/users/{userid}/meetings](https://api.zoom.us/v2/users/%7Buserid%7D/meetings)

JWT app has not been deprecated, it will be deprecated in June 2023, as per its documents. I think I forgot to mention it, I am just developing a simple demo of zoom client, so I am not that worried about the deprecation next year right now.

I got the sample app from the github of zoom - [GitHub - zoom/meetingsdk-web-sample: Zoom Meeting SDK Web Sample App](https://github.com/zoom/meetingsdk-web-sample)

---

<div class="post-metadata">

**Author:** ![manalg](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@manalg](https://devforum.zoom.us/u/manalg)\
**Post date:** [August 10, 2022, 8:04am UTC](https://devforum.zoom.us/t/code-124-message-invalid-access-token-error/73893/5 "2022-08-10T08:04:43Z")

</div>

Yes, I tried that as well, it didn’t work.  
But in the end, I took the code snippet from postman and edited it in my app as suited to my needs, and it worked. Probably the issue was that I was adding mode: ‘cors’ in my header, because that is the only difference from my code to the postman’s code snippet.  
Anyway, thank you for the time!  
Manal.

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [August 10, 2022, 11:07am UTC](https://devforum.zoom.us/t/code-124-message-invalid-access-token-error/73893/6 "2022-08-10T11:07:32Z")

</div>

@manalg,

Glad to hear you were able to get it working. I suspect the cors headers were the culprit as well. Should you have any additional questions, please let us know.

---

<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:** [September 9, 2022, 9:07pm UTC](https://devforum.zoom.us/t/code-124-message-invalid-access-token-error/73893/7 "2022-09-09T21:07:44Z")

</div>

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