Update: I know where the problem is. Client Authentication is sent as a Basic Auth header whereas in the screenshots shared above, you will see I am sending client credentials in the body which is wrong.
Can anyone tell me how I can send Client Auth in request header?
I tried sending them like this
headers: {
'content-type': 'application/x-www-form-urlencoded',
'Authorization': `Basic ${bundle.authData.client_id}:${bundle.authData.client_secret}`
}
cc: @ikbelkirasan
@adilalich - Try this one:
headers: {
"content-type": "application/x-www-form-urlencoded",
Authorization: `Basic ${Buffer.from(
`${bundle.authData.client_id}:${bundle.authData.client_secret}`
).toString("base64")}`,
}
@ikbelkirasan You legend! Thank you brother.
@adilalich You’re very welcome! :)