# 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:** 6

<div class="post-metadata">

**Author:** ![MultiplayerSession](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/multiplayersession/32/66446_2.png) [@MultiplayerSession](https://devforum.zoom.us/u/MultiplayerSession)\
**Post date:** [October 6, 2022, 3:12pm UTC](https://devforum.zoom.us/t/server-to-server-oauth-returns-400-when-requesting-access-token-powershell/76999/6 "2022-10-06T15:12:51Z")

</div>

Some potential areas you may want to check:

- Use a single-byte encoding like ASCII or UTF-8.
- ~~Encode using base64url encoding, which replaces certain characters and discards padding.~~ Actually, my current Server-to-Server OAuth implementation is using base64 encoding; it was JWT that used base64url encoding.

~~A .NET Framework / PowerShell compatible implementation for both of the above might be available via [Microsoft.IdentityModel.Tokens.Base64UrlEncoder.Encode](https://learn.microsoft.com/en-us/dotnet/api/microsoft.identitymodel.tokens.base64urlencoder.encode).~~

---

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