# Server to server oauth - invalid\_client

**URL:** <https://devforum.zoom.us/t/server-to-server-oauth-invalid-client/94641>\
**Category:** Authentication\
**Tags:** api, s2s-oauth\
**Created:** [September 7, 2023, 3:57pm UTC](https://devforum.zoom.us/t/server-to-server-oauth-invalid-client/94641 "2023-09-07T15:57:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![imsclf](https://avatars.discourse-cdn.com/v4/letter/i/77aa72/32.png) [@imsclf](https://devforum.zoom.us/u/imsclf)\
**Post date:** [September 7, 2023, 3:57pm UTC](https://devforum.zoom.us/t/server-to-server-oauth-invalid-client/94641/1 "2023-09-07T15:57:51Z")

</div>

[https://zoom.us/oauth/token?grant\_type=account\_credentials&accountid={accountId}](https://zoom.us/oauth/token?grant_type=account_credentials&accountid=%7BaccountId%7D)

I am trying to generate an access token for a server to server oauth application that I am migrating from JWT and am getting the error:  
{“reason”: “Invalid client\_id or client\_secret”, “error”: “invalid\_client”}.

I’ve double checked that the account id, client id, and client secret match what is shown in the application configuration, and that the app has been activated.

My curl command looks like this:

curl --location ‘[https://zoom.us/oauth/token?grant\_type=account\_credentials&accountId={accountId}](https://zoom.us/oauth/token?grant_type=account_credentials&accountId=%7BaccountId%7D)’   
–header ‘Authorization: Basic {token}’

The token is my base64 encoded clientId:clientSecret and looks like (this is not the actual value):  
VGhpcyBpcyBhIHRlc3Qgc3RyaW5nLg==

---

<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:** [September 7, 2023, 4:47pm UTC](https://devforum.zoom.us/t/server-to-server-oauth-invalid-client/94641/3 "2023-09-07T16:47:54Z")

</div>

Hi @imsclf ,

Can you please try with our postman workspace? [Postman](https://www.postman.com/zoom-developer/workspace/zoom-public-workspace/request/22097587-875f65b4-d88f-4082-80af-7605303a5abc)

> [@imsclf](#):
>
> The token is my base64 encoded clientId:clientSecret and looks like (this is not the actual value):  
> VGhpcyBpcyBhIHRlc3Qgc3RyaW5nLg==

I know this is not the actual value, but it seems to be too short, hmm.

---

<div class="post-metadata">

**Author:** ![imsclf](https://avatars.discourse-cdn.com/v4/letter/i/77aa72/32.png) [@imsclf](https://devforum.zoom.us/u/imsclf)\
**Post date:** [September 7, 2023, 5:46pm UTC](https://devforum.zoom.us/t/server-to-server-oauth-invalid-client/94641/4 "2023-09-07T17:46:18Z")

</div>

@gianni.zoom

Yes, I get the same error using your Postman Workspace. I’m not able to post an image, but here’s the cURL code snippet that Postman generated:

curl --location ‘[https://zoom.us/oauth/token?grant\_type=account\_credentials&accountid={accountid}](https://zoom.us/oauth/token?grant_type=account_credentials&accountid=%7Baccountid%7D)’ \

–header ‘Content-Type: application/x-www-form-urlencoded’ \

–header ‘Authorization: Basic {token}’ \

–header ‘Cookie: {cookie}’

My actual token I referenced in my initial post is 76 characters - yes my example was shorter.

---

<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:** [September 11, 2023, 9:10pm UTC](https://devforum.zoom.us/t/server-to-server-oauth-invalid-client/94641/5 "2023-09-11T21:10:40Z")

</div>

Hi @imsclf

> [@imsclf](#):
>
> curl --location ‘[https://zoom.us/oauth/token?grant\_type=account\_credentials&accountid={accountid}](https://zoom.us/oauth/token?grant_type=account_credentials&accountid=%7Baccountid%7D)’ \
> 
> –header ‘Content-Type: application/x-www-form-urlencoded’ \
> 
> –header ‘Authorization: Basic {token}’ \
> 
> –header ‘Cookie: {cookie}’

Can you please share a screen recording of your workflow in our private message? Thanks!

---

<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:** [September 11, 2023, 9:17pm UTC](https://devforum.zoom.us/t/server-to-server-oauth-invalid-client/94641/6 "2023-09-11T21:17:43Z")

</div>

Developer was able to resolve issue. Client id/client secret was changing with copy/paste.
