I have followed the instructions for the Password Flow. Instead of receiving a token, I am receiving error OAU-123 "Client authentication is required."
I am using VBScript so I cannot use any of the provided libraries or examples.
I created a new application in the ringCentral console with the type of Server-only (No UI) and permissions of Read Accounts, SMS, and Webhook.
I have concatenated the app's client ID+":"+client secret, then encapsulated the entire string to base64.
authString=base64Encode(clientId+":"+clientSecret)
I am testing with the sandbox url "https://platform.devtest.ringcentral.com".
My endpoint is "/restapi/oauth/token".
I open an async POST to the url and endpoint.
objHttp.open |POST|, url+endpoint, async
I then set the following request headers.
objHttp.setRequestHeader "Accept", "application/json"
objHttp.setRequestHeader "Authorization", "Basic "+authString
objHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded;charset=UTF-8"
I post the following data:
"grant_type=password&username="+userName+"&extension=101&password="+password
I get the following response:
{
"error" : "invalid_client",
"errors" : [ {
"errorCode" : "OAU-123",
"message" : "Client authentication is required"
} ],
"error_description" : "Client authentication is required"
}
I have verified that I am using the correct sandbox Client ID and Client Secret. I have tried resetting the user password. I have tried the user email address as the username, and the phone number with and without the leading "+", url encoded and clear. I always receive the same error.
Google searches for this exact wording have returned no results. Nor is this error listed in the RingCentral errors documentation. (https://ringcentral-faq.readthedocs.io/en/latest/errors/).
Any help would be appreciated.