# Getting Invalid "Access Token!" on fresh created app

**URL:** <https://devforum.zoom.us/t/getting-invalid-access-token-on-fresh-created-app/48610>\
**Category:** API and Webhooks\
**Created:** [April 22, 2021, 1:25pm UTC](https://devforum.zoom.us/t/getting-invalid-access-token-on-fresh-created-app/48610 "2021-04-22T13:25:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mladen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mladen/32/2754_2.png) [@mladen](https://devforum.zoom.us/u/mladen)\
**Post date:** [April 22, 2021, 1:25pm UTC](https://devforum.zoom.us/t/getting-invalid-access-token-on-fresh-created-app/48610/1 "2021-04-22T13:25:44Z")

</div>

**Description**  
Today i started to get this Invalid Token error when try to create a meeting.

**Error**  
{  
“reason”: “Invalid Token!”,  
“error”: “invalid\_request”  
}

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

**Which Endpoint/s?**  
oauth/token?refresh\_token

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

`curl -X POST -H "Content-Type:application/x-www-form-urlencoded" \ --user {client-id}:{client-secret} \ --data 'grant\_type=refresh\_token&refresh\_token={refresh-token}' \ https://zoom.us/oauth/token`

1. See error

**Screenshots (If applicable)**

 ![RefreshTokenError](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/5/a55194e12b46ae501b60bacc40b5771650e79deb.jpeg)

The local account is pairing without issues. The problem happens only when i try to authenticate by token. App name is Test2 if this matters.

---

<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:** [April 22, 2021, 1:55pm UTC](https://devforum.zoom.us/t/getting-invalid-access-token-on-fresh-created-app/48610/2 "2021-04-22T13:55:15Z")

</div>

Hi, @mladen,  
Thank you for posting in the Developer Forum. Are you able to confirm you are always using the newest refresh\_token that is returned with every [refresh request] ?

I’ve linked a similar Developer Forum post that may be a useful point of reference :

> [@"Invalid Token!" error message when trying to refresh oauth token](https://devforum.zoom.us/t/invalid-token-error-message-when-trying-to-refresh-oauth-token/13363/24):
>
> Hi @tommy, Is there a way we can connect over Zoom. I can screen share and show you our logs, so you can test and check what’s going wrong and why the latest refresh token is showing as revoked without being revoked by our app or the user?

Please let me know if this helps.

Kindly,  
Donte

---

<div class="post-metadata">

**Author:** ![mladen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mladen/32/2754_2.png) [@mladen](https://devforum.zoom.us/u/mladen)\
**Post date:** [April 22, 2021, 2:23pm UTC](https://devforum.zoom.us/t/getting-invalid-access-token-on-fresh-created-app/48610/3 "2021-04-22T14:23:56Z")

</div>

Hi @donte.zoom Thanks for the quick response. No i don’t use two accounts, also i don’t use the scenarios from the tread you are referring. My postman gives me the error on newly created refresh token (as you can see from the screenshots).

I tried different ways to pass app key and secret with same result.

Please advice.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [April 23, 2021, 12:04am UTC](https://devforum.zoom.us/t/getting-invalid-access-token-on-fresh-created-app/48610/4 "2021-04-23T00:04:47Z")

</div>

Hey @mladen,

Please make sure that you are using a `Content-Type` header of `application/json`. Further, instead of using the `--data` argument to send POST body data to the endpoint, you’ll want to set the values as query parameters instead.

Here’s an example of how the cURL command would look:

```auto
curl -X POST -H "Content-Type: application/json" \
--user {client-id}:{client-secret} \ 
https://zoom.us/oauth/token?grant_type=refresh_token&refresh_token={refresh-token}

```

I hope that helps!

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![mladen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mladen/32/2754_2.png) [@mladen](https://devforum.zoom.us/u/mladen)\
**Post date:** [April 23, 2021, 7:17am UTC](https://devforum.zoom.us/t/getting-invalid-access-token-on-fresh-created-app/48610/5 "2021-04-23T07:17:39Z")

</div>

It seems to work now. I didn’t change anything in the code as in similar tread before.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [April 24, 2021, 12:54am UTC](https://devforum.zoom.us/t/getting-invalid-access-token-on-fresh-created-app/48610/6 "2021-04-24T00:54:36Z")

</div>

Hey @mladen,

Great! I’m glad to hear that it’s working now. I’ll go ahead and close this topic now but feel free to open a new topic if you encounter any further issues or questions.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [April 24, 2021, 12:54am UTC](https://devforum.zoom.us/t/getting-invalid-access-token-on-fresh-created-app/48610/7 "2021-04-24T00:54:42Z")

</div>

Closed on April 24, 2021, 12:54am UTC


