# "Invalid api key or secret" error in Server-to-Server OAuth app

**URL:** <https://devforum.zoom.us/t/invalid-api-key-or-secret-error-in-server-to-server-oauth-app/72579>\
**Category:** Authentication\
**Created:** [July 20, 2022, 7:43pm UTC](https://devforum.zoom.us/t/invalid-api-key-or-secret-error-in-server-to-server-oauth-app/72579 "2022-07-20T19:43:15Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![jim](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jim/32/44859_2.png) [@jim](https://devforum.zoom.us/u/jim)\
**Post date:** [January 26, 2023, 10:09pm UTC](https://devforum.zoom.us/t/invalid-api-key-or-secret-error-in-server-to-server-oauth-app/72579/21 "2023-01-26T22:09:34Z")

</div>

I have tried this serveral times, and keeps saying invalid acess token, does not scopes.

---

<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:** [January 26, 2023, 10:32pm UTC](https://devforum.zoom.us/t/invalid-api-key-or-secret-error-in-server-to-server-oauth-app/72579/22 "2023-01-26T22:32:29Z")

</div>

@jim I have sent you a private message and also replied to you in the other thread

---

<div class="post-metadata">

**Author:** ![kyle.kinney](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/kyle.kinney/32/49001_2.png) [@kyle.kinney](https://devforum.zoom.us/u/kyle.kinney)\
**Post date:** [June 27, 2023, 9:31pm UTC](https://devforum.zoom.us/t/invalid-api-key-or-secret-error-in-server-to-server-oauth-app/72579/23 "2023-06-27T21:31:49Z")

</div>

I’m getting the same unsupported\_grant\_type error trying to get the account\_credentials access token, but the solution here isn’t working. There’s no button labelled Role Settings under User Management \> Roles, and if you meant that the role settings for one of the roles needs to be changed, uh, which role? We have three roles that have settings pages that look like the screenshot, but we tried turning it on for all of them, and it’s still failing.

The app is definitely server-to-server oauth, and I tried deactivating and reactivating it, but that didn’t help either.

---

<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:** [July 5, 2023, 5:42pm UTC](https://devforum.zoom.us/t/invalid-api-key-or-secret-error-in-server-to-server-oauth-app/72579/24 "2023-07-05T17:42:45Z")

</div>

Hey @kyle.kinney  
Can you please share the request URL that you are sending when requesting an access token so I can take a look into it and troubleshoot the issue

---

<div class="post-metadata">

**Author:** ![kyle.kinney](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/kyle.kinney/32/49001_2.png) [@kyle.kinney](https://devforum.zoom.us/u/kyle.kinney)\
**Post date:** [July 5, 2023, 8:39pm UTC](https://devforum.zoom.us/t/invalid-api-key-or-secret-error-in-server-to-server-oauth-app/72579/25 "2023-07-05T20:39:44Z")

</div>

All right, I knew it was going to be either something really stupid or something really arcane, and it turns out it was the first one. I went to double check the URL, and noticed that I was building the form arguments but not adding them to the request properly, which apparently results in the same error message. I have it working now.

---

<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:** [July 6, 2023, 4:25pm UTC](https://devforum.zoom.us/t/invalid-api-key-or-secret-error-in-server-to-server-oauth-app/72579/26 "2023-07-06T16:25:25Z")

</div>

Happy to hear you were able to fix this! @kyle.kinney  
Feel free to reach out back to us in the future 🙂

[Previous page](https://devforum.zoom.us/t/invalid-api-key-or-secret-error-in-server-to-server-oauth-app/72579.md?page=1)
