# Oauth 2.0 token received but 400 Bad Request from GET

**URL:** <https://devforum.zoom.us/t/oauth-2-0-token-received-but-400-bad-request-from-get/76281>\
**Category:** Meetings\
**Created:** [September 20, 2022, 9:40pm UTC](https://devforum.zoom.us/t/oauth-2-0-token-received-but-400-bad-request-from-get/76281 "2022-09-20T21:40:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![noel.miller](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/noel.miller/32/41598_2.png) [@noel.miller](https://devforum.zoom.us/u/noel.miller)\
**Post date:** [September 20, 2022, 9:40pm UTC](https://devforum.zoom.us/t/oauth-2-0-token-received-but-400-bad-request-from-get/76281/1 "2022-09-20T21:40:26Z")

</div>

**Description**  
What is wrong with the request?

- Able to do `grant_type=client_credentials` and [zoom.us](http://zoom.us) oauth/token endpoint returns temp token
- Error is: 400 Bad Request from GET `https://api.zoom.us/v2/users/{USERID}/meetings`

**Troubleshooting steps**

- Tested this endpoint with a temp admin generated JWT token and it worked.
- Tried regenerating keys, tokens, etc.
- Scoped admin privileges everything because we don’t know what is wrong.

We have the “Business Plan” so API should be available. Note: this is “server-to-server or two-legged OAuth” running with Java spring-boot.

What makes me think the token response works?

- It wouldn’t return a token if that part of our code was broken
- if I put a bogus token in the Bearer Auth it has a different error: 401 Unauthorized from GET  
Here’s what is returned:

```auto
{"access_token":"{TOKEN}","scope":"account:read:admin account:write:admin contact:read:admin dashboard_crc:read:admin dashboard_home:read:admin dashboard_im:read:admin dashboard_meetings:read:admin dashboard_webinars:read:admin dashboard_zr:read:admin group:read:admin group:write:admin h323:read:admin h323:write:admin imchat:bot meeting:read:admin meeting:write:admin meeting_token:read:admin:live_streaming meeting_token:read:admin:local_archiving meeting_token:read:admin:local_recording recording:read:admin recording:write:admin user:read:admin user:write:admin webinar:read:admin webinar:write:admin webinar_token:read:admin:live_streaming webinar_token:read:admin:local_archiving webinar_token:read:admin:local_recording","token_type":"bearer","expires_in":3600}

```

**Note: Zoom Developer Documentation clearly states that:**  
“The Client Credentials grant is used to get an access token for APIs that require only a service’s permission. This grant does not require a user’s permission. For Zoom APIs, use the Client Credentials grant to get an access token from Zoom for the Server-to-Server OAuth app type or to get an access token from the Chatbot service in order to use the Send Chatbot Messages API.”  
_client\_credentials_ is not limited to chat bots as [this](https://devforum.zoom.us/t/access-token-provided-after-client-credentials-is-not-working/21257) post suggests.

Thanks for any help you can provide.  
Noel

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [September 20, 2022, 11:16pm UTC](https://devforum.zoom.us/t/oauth-2-0-token-received-but-400-bad-request-from-get/76281/2 "2022-09-20T23:16:49Z")

</div>

Hi @noel.miller  
Thanks for reaching out to the Zoom Developer Forum, I am happy to help here!  
My question is, are you using a Server-to-Server OAuth app?  
If you, you should be passing account\_credentials as your grant\_type and the account\_id in your query params.

So your request should look something like this:

[https://zoom.us/oauth/token?grant\_type=account\_credentials&account\_id={accountID}](https://zoom.us/oauth/token?grant_type=account_credentials&account_id=%7BaccountID%7D)

Also, here is a link to our Docs: [Create a Server-to-Server OAuth app](https://marketplace.zoom.us/docs/guides/build/server-to-server-oauth-app/#use-account-credentials-to-get-an-access-token)

Hope this helps,  
Elisa

---

<div class="post-metadata">

**Author:** ![noel.miller](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/noel.miller/32/41598_2.png) [@noel.miller](https://devforum.zoom.us/u/noel.miller)\
**Post date:** [September 20, 2022, 11:25pm UTC](https://devforum.zoom.us/t/oauth-2-0-token-received-but-400-bad-request-from-get/76281/3 "2022-09-20T23:25:36Z")

</div>

Thank you so much. Worked like a charm!

Noel

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [September 21, 2022, 11:29am UTC](https://devforum.zoom.us/t/oauth-2-0-token-received-but-400-bad-request-from-get/76281/4 "2022-09-21T11:29:47Z")

</div>

Glad that helped!  
Cheers,  
Elisa
