I am trying Password Flow...I'm adapting the code to Coldfusion but I am getting the Invalid Cilent error.
1) My app is setup for Password Flow.
2) I am using username in format of: +15559991212
3) Password was reset and changed successfully to confirm that's correct.
4) Client Id is copied right out of the Credentials in my Developer Account and encoded in Base64.
5) Secret key is copied right out of Credentials in my Developer Account.
My Code:
<cfset authorization = client_id_base64 & ":" & client_secret />
<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#</cfoutput>
<cfabort>