# Server-to-Server OAuth: unable to fetch access\_token

**URL:** <https://devforum.zoom.us/t/server-to-server-oauth-unable-to-fetch-access-token/70511>\
**Category:** API and Webhooks\
**Tags:** oauth\
**Created:** [June 14, 2022, 11:57pm UTC](https://devforum.zoom.us/t/server-to-server-oauth-unable-to-fetch-access-token/70511 "2022-06-14T23:57:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbergam](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sbergam/32/38470_2.png) [@sbergam](https://devforum.zoom.us/u/sbergam)\
**Post date:** [June 14, 2022, 11:57pm UTC](https://devforum.zoom.us/t/server-to-server-oauth-unable-to-fetch-access-token/70511/1 "2022-06-14T23:57:17Z")

</div>

**Description**  
I’m having trouble getting my Server-to-Server OAuth app working. The request to get an access token is failing.

**Error?**

```auto
404 {"reason":"The application is disabled","error":"invalid_client"}

```

When I look at my app in the UI it says “Your app is activated on the account”.

**API Endpoint/s?**  
https://\<my\_company\_subdomain\>.zoom.us/oauth/token

**How To Reproduce**  
_Steps to reproduce the behavior:_

Here is the curl command I am using:

```auto
curl -v -X POST -u "<clientId>:<clientSecret>" https://<my_company_subdomain>.zoom.us/oauth/token?grant_type=account_credentials&account_id=<accountNumber>

```

```auto

**Additional context**
* *Incorrect subdomain?* I've tried changing the subdomain to just `zoom.us` and `api.zoom.us` but neither works.
* *Incorrect Account ID?* I got the value for `account_id` from my Admin Profile page where it says "Account Number". Is that correct? The instructions [here](https://marketplace.zoom.us/docs/guides/build/server-to-server-oauth-app/#create-a-server-to-server-oauth-app) say that you can find the Account Id on the same page as the Client ID and Client Secret, but I don't see it there. Hopefully it's the same as "Account Number".
* NOTE: I tried deactivating and reactivating the app, and now the error message is `{"reason":"Internal Error","error":"invalid_request"}`
```

---

<div class="post-metadata">

**Author:** ![rarneson](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rarneson/32/38900_2.png) [@rarneson](https://devforum.zoom.us/u/rarneson)\
**Post date:** [June 28, 2022, 7:48pm UTC](https://devforum.zoom.us/t/server-to-server-oauth-unable-to-fetch-access-token/70511/2 "2022-06-28T19:48:03Z")

</div>

Hey ya,

I was running into this exact same issue just now.

I had been disabling/re-enabling in the “PERSONAL APP MANAGEMENT” area … and that was not working.

What I wound up having to do was go into the “ADMIN APP MANAGEMENT” \> “Apps on Account” area and find my app. Once in my app in that area I then disabled and re-enabled it, and it started working immediately.

Hope that helps

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [June 29, 2022, 3:06am UTC](https://devforum.zoom.us/t/server-to-server-oauth-unable-to-fetch-access-token/70511/3 "2022-06-29T03:06:35Z")

</div>

Thanks for sharing @rarneson . @sbergam , please let us know if that resolves the issue for you.

---

<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:** [July 29, 2022, 1:07pm UTC](https://devforum.zoom.us/t/server-to-server-oauth-unable-to-fetch-access-token/70511/4 "2022-07-29T13:07:15Z")

</div>

Closed on July 29, 2022, 1:07pm UTC

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