Cannot Authenticate my Server to Server app and get my first token

Hello everybody,

API Endpoint(s): https://zoom.us/oauth/token
Description : After registering my Server to Server app, I am trying to get my first OAuth token.
I am using cURL language as follows:

  • -X -H “Content-Type: application/x-www-form-urlencoded” -H “Authorization: Basic Base64Encoded(clientId:clientSecret)” -d “grant_type=account_credentials” -d “account_id={accountID}” -D $header --trace $trace

Comment: I obviously compute and replace the proper Base64Encoded(clientId:clientSecret) et {accountID}

Error?
405 Method Not Allowed

I am the owner and only user of the Zoom account and I have a Pro license.
I checked the role-based access permissions but given I am owner I cannot change anything.
Are my full credentials passed on the Server to Server app?

Thank you in advance

Hi @thierry ,

I believe the error lies here:

No content-type needed. Please see Postman workspace template for S2S token generation and code samples:

https://www.postman.com/zoom-developer/workspace/zoom-public-workspace/request/22097587-875f65b4-d88f-4082-80af-7605303a5abc?ctx=code

1 Like

Hi @gianni.zoom,

I just tried and unfortunately it is still not working (same error) even though you are right.
I checked again the Server-to-Server OAuth page and I mistakenly followed the code as if I were using PowerShell.
Next step is to follow your lead at Postman and I can already see that it is different from API doc.
I’ll post the solution once I find it.
Thank you again for your help.

Hi @thierry ,

Ahh, try referring to this thread:

cURL:

Powershell:

1 Like

@Gianni,
I am still working to understand what is going on because :

  • Following your lead, I was able to generate a token with postman (had to make a branch in my workspace that’s all)

  • Usually I am pretty good (I have about 15 API under my belt) at translating Postman cURL for my environment (I am integrating Zoom in FileMaker database) but so far no luck.

  • It is a syntax problem, my base64 encoding is correct because I have same result as Postman and Postam was successful at getting a token.

As mentioned, I’ll keep the forum updated once I find the solution.

Thanks again

Hi @gianni.zoom,

I finally found the problem, it was syntax. Base64 has several format so in my case I must use:
"Basic " & Base64EncodeRFC ( 3548 ; ( $Client_ID & “:” & $Client_Secret ) )
RFC 3548 means “No line breaks added”
When using Base64Encode in my application an invisible pilcrow was added.
Thank you very much for your help…

1 Like

Hi @thierry , thanks for updating us and sharing your solution!