Skip to main content
The First Step
March 3, 2018
Question

Parameter [prompt] value is invalid

I am attempting integrate a program with Authorization Code Flow using cURL; I use Coldfusion, so I have adapted my code based the documentation, but you should be able to understand the URL variables that I am passing:


<cfhttp


method="get"

url="https://platform.devtest.ringcentral.com/restapi/oauth/authorize";

resolveurl="yes"

getasbinary="never"


>


<cfhttpparam type="header" name="content-type" value="application/x-www-form-urlencoded">


<cfhttpparam type="url" name="response_type" value="code">

<cfhttpparam type="url" name="client_id" value="#client_id#">

<cfhttpparam type="url" name="redirect_uri" value="#redirect_uri#">

<cfhttpparam type="url" name="state" value="#state#">

<cfhttpparam type="url" name="prompt" value="login">


</cfhttp>


When I execute the code, it processes and displays code that can only execute if the redirect_uri is executed, therefore, the Ringcentral server is forwarding to the redirect_uri.


Here's what my server finds the following variables on dumping variables off of the redirect_uri page:


error: invalid_request

error_description: Parameter [prompt] value is invalid

state : ydcm2ud3d2edvLde911nvev9zwvhLiLztzkhh4qmyc6beg44se


1) The only variable that is passed to my redirect_uri page is "state"


2) The error does not make sense. The prompt variable value is correct. The documentation says use "login".


I am trying to a response so I can get access token and refresh tokens so I can interact with the API calls.


Please advise....




    13 replies

    jason4335The First StepAuthor
    The First Step
    March 11, 2018
    It's been a week.  I appreciate the help from some of you on this forum, however, Ringcentral's lack of response from the Developer team is disappointing.

    I have used this code with Google's API and it works, so I know my authorization flow works with them...


    jason4335The First StepAuthor
    The First Step
    March 12, 2018
    I will add something else....Tyler's favorite answer to everyone is to point people to your code examples...why not spend a little time and let's get a working CF example for folks...believe me...there are a lot of applications out there that use CF.
    Employee
    March 12, 2018
    Jason, regarding your questions:

    1) Yes, your URL is correct

    2) Here is the call I made and traced for your reference. So you can see that our server returns full URL in the path.

    GET https://platform.devtest.ringcentral.com/restapi/oauth/authorize?    client_id=...&redirect_uri=...&response_type=code&state=... HTTP/1.1  Accept-Encoding: gzip,deflate  Host: platform.devtest.ringcentral.com  Connection: Keep-Alive  User-Agent: Apache-HttpClient/4.1.1 (java 1.5)     
    HTTP/1.1 302 Found Server: nginx/1.10.2 Date: Mon, 12 Mar 2018 20:02:45 GMT Content-Length: 0 Connection: keep-alive X-Application-Context: application:8080 Location: https://service.devtest.ringcentral.com/mobile/loginDispatcher? responseType=code&clientId=...&brandId=1210&state=...&localeId=en_US& endpointId=&session=-2915783893910517926&display=page& prompt=login%20consent%20sso&scope=& appUrlScheme=...&ui_options=&hideNavigationBar=true
    I pointed you earlier to this post: http://www.codersrevolution.com/blog/CFHTTP-doesnt-resolve-URLs-properly-on-redirect. So maybe you need to check with ColdFusion support.