# Server-to-Server OAuth returns 400 when requesting access token - Powershell

**URL:** <https://devforum.zoom.us/t/server-to-server-oauth-returns-400-when-requesting-access-token-powershell/76999>\
**Category:** API and Webhooks\
**Tags:** oauth, api\
**Created:** [October 5, 2022, 11:47pm UTC](https://devforum.zoom.us/t/server-to-server-oauth-returns-400-when-requesting-access-token-powershell/76999 "2022-10-05T23:47:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [October 6, 2022, 12:15am UTC](https://devforum.zoom.us/t/server-to-server-oauth-returns-400-when-requesting-access-token-powershell/76999/2 "2022-10-06T00:15:54Z")

</div>

Hi, @zoom123,

Thank you for posting in the Developer Forum – I am happy to help. Sorry to hear that you getting 400 bad request. Can you try to make the request with the following curl command :

```auto
curl --location --request POST 'https://zoom.us/oauth/token?grant_type=account_credentials&account_id={accountId}' \
--header 'Authorization: Basic Base64Encoder(clientId:clientSecret)' \
--data-raw ''

```

Also, there is a helpful utility script to generate a Zoom Server-to-Server Oauth Token and copy it to the clipboard on our GitHub as well:

> **[GitHub - zoom/Server-to-Server-Oauth-Token: Utility script to generate a Zoom...](https://github.com/zoom/Server-to-Server-Oauth-Token)**
>
> Utility script to generate a Zoom Server-to-Server Oauth Token and copy to clipboard - GitHub - zoom/Server-to-Server-Oauth-Token: Utility script to generate a Zoom Server-to-Server Oauth Token and...

---

_[View the full topic](https://devforum.zoom.us/t/server-to-server-oauth-returns-400-when-requesting-access-token-powershell/76999)._
