Illegal base64 character 28

Description
Details on your question or the problem you’re trying to solve.
I’m trying to get access token according to this guide: Create a Server-to-Server OAuth App
I’m using server-to-server app, that is activated, I have replaced clientId, clientSecret and accountId with according strings. I also tried to encode it to base64 (as in toBase64('clientId:clientSecret'), replaced ofc). Tried without encoding too.

Error?

I keep getting {"status":false,"errorCode":-1,"errorMessage":"Illegal base64 character 28","result":null}
The full error message or issue you are running into, where applicable.

API Endpoint/s?
Share the API endpoint/s you’re working with to help give context.
oauth/token?grant_type=account_credential&account_id={accountId}

How To Reproduce
The easiest via node js:
import fetch from “node-fetch”
;(async () => {
const res = await fetch(
https://zoom.us/oauth/token?grant_type=account_credentials&account_id=A”,
{
headers: {
Authorization: Basic Base64Encoder(${btoa( "B:C" )}),
},
method: “POST”,
}
)
console.log(await res.text())
})()

Steps to reproduce the behavior:
1. Request URL / Headers (without credentials) / Body
2. Authentication method or app type
3. Any errors

Additional context
Add any other context about the problem here.

Hi,

I got ‘Illegal base64 character 28’ error, too.

Can someone help?

Hi @kowalski.k and @regit
Are you still experiencing this issue?
Please refer to the following guide to make sure you are setting up your app correctly:

Cheers,
Elisa

For me the Curl command to encode the clientID and secret wasn’t working and giving the same error. So instead I just encoded them in a different command, copied that value into the Curl request and it worked.

echo -n clientId:clientSecret | base64

Printed:
encodedCharacters

curl -X POST -H "Authorization: Basic encodedCharacters" "https://zoom.us/oauth/token?grant_type=account_credentials&account_id={accountId}"

1 Like

Thanks for sharing this with the community @joey.grover
I appreciate it