I am getting a "OAU-153" error relating to invalid parameters. What does it mean?
Mar 11, 2018 at 7:40pm • 6 replies • 0 likes
jason4335
I am trying Password Flow...I'm adapting the code to Coldfusion but I am getting the Invalid Cilent error.
My app is setup for Password Flow.
I am using username in format of: +15559991212
Password was reset and changed successfully to confirm that's correct.
Client Id is copied right out of the Credentials in my Developer Account and encoded in Base64.
Secret key is copied right out of Credentials in my Developer Account.
My Code:
>cfhttp
method="post"
url="https://platform.devtest.ringcentral.com/restapi/oauth/token";
resolveurl="yes"
getasbinary="never">
<cfhttpparam type="header" name="content-type" value="application/x-www-form-urlencoded">
<cfhttpparam type="header" name="accept" value="application/json">
<cfhttpparam type="header" name="authorization" value="#authorization#">
<cfhttpparam type="url" name="username" value="#username#">
<cfhttpparam type="url" name="password" value="#password#">
<cfhttpparam type="url" name="extension" value="#extension#">
<cfhttpparam type="url" name="grant_type" value="password">
</cfhttp>
<cfoutput>#cfhttp.FileContent#
<cfabort>
6 Answers
Ok...I appreciate the direct link to what is right...
To confirm that I did my Authorization Header correctly, here is my code and I will explain it:
<cfset authorization = client_id & ":" & client_secret />
<cfset authorization = "Basic " & ToBase64(authorization) />
The first line in Coldfusion is saying this:
authorization = the base64 of client_id:client_secret
The second line says add the word "Basic" plus a space to the front of the authorization variable above, so if you outputted this variable, it would look like this:
Basic THISISTHEBASE64OFCLIENT_ID:CLIENT_SECRET
Assuming I did that right (which I assume I did since the error changed), I got this:
"errorCode" : "OAU-140", "message" : "Invalid resource owner credentials"
This implies invalid username or password. My username is the Development phone number in my console and my password (which I believe I'm right) but I cannot verify it since it's not readable.
Jason
To confirm that I did my Authorization Header correctly, here is my code and I will explain it:
<cfset authorization = client_id & ":" & client_secret />
<cfset authorization = "Basic " & ToBase64(authorization) />
The first line in Coldfusion is saying this:
authorization = the base64 of client_id:client_secret
The second line says add the word "Basic" plus a space to the front of the authorization variable above, so if you outputted this variable, it would look like this:
Basic THISISTHEBASE64OFCLIENT_ID:CLIENT_SECRET
Assuming I did that right (which I assume I did since the error changed), I got this:
"errorCode" : "OAU-140", "message" : "Invalid resource owner credentials"
This implies invalid username or password. My username is the Development phone number in my console and my password (which I believe I'm right) but I cannot verify it since it's not readable.
Jason
0
Jason, I don't know who told you that and apologize for misunderstanding. But actually this part is explained in multiple places in our documentation (for example here: http://ringcentral-api-docs.readthedocs.io/en/latest/oauth/#client-authentication) as well as in other sources explaining OAuth 2.0 protocol. It is just a standard authorization header format for HTTP Basic authentication.
0
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder