News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Implementing the reauthentication flow
Tags: authentication
Dec 12, 2016 at 5:32pm   •   2 replies  •  0 likes
shauna-minning

We are trying to implement the reauthentication flow.



I am attempting to use the Refresh Token Flow documented here - https://developer.ringcentral.com/api-docs/latest/index.html#!#RefRefreshTokenFlow


I am hitting the following endpoint to refresh my access token - POST /restapi/oauth/token HTTP/1.1



My headers are the following - headers={"User-Agent"=>"Faraday v0.9.2", "Content-Type"=>"application/x-www-form-urlencoded", "Authorization"=>"Basic { {API_KEYS_HIDDEN_FOR_SECURITY_CONCERNS}}", "Application"=>"application/json"}



My body is the following -body={:client_id=>"{ {CLIENT_ID_HIDDEN_FOR_SECURITY_CONCERNS}}", :client_secret=>"{ {CLIENT_SECRET_HIDDEN_FOR_SECURITY_CONCERNS}}", :grant_type=>"refresh_token", :refresh_token=>"{ {REFRESH_TOKEN_HIDDEN_FOR_SECURITY_CONCERNS}}"}

However when I make a request I receive the following error -


API Error: invalid_client: Invalid client: { "error" : "invalid_client", "errors" : [ { "errorCode" : "OAU-153", "message" : "Invalid client: ", "parameters" : [ { "parameterName" : "client_id", "parameterValue" : "" } ] } ], "error_description" : "Invalid client: "}



Can you please advise as to what the error code "OAU-153" means and what the issue might be? The client_id is not blank, and the headers appear to be correct per the documentation linked to above.

2 Answers
answered on Dec 13, 2016 at 11:00am  
Ah, thank you Benjamin. We tried those solutions previously but will give it another shot and reply if we get stuck again.

 0
answered on Dec 13, 2016 at 10:16am  
Looking at the documentation and your request information, it appears your request is malformed, the request body must contain the following x-www-form-urlencoded properties and values:

refresh_token: "{{YOUR_PREVIOUS_REFRESH_TOKEN}}"
grant_type: "refresh_token"
endpoint_id: "{{UNIQUE_CLIENT_ID}}" /** NOTE: Defaults to previously specified or auto-generated value if not provided **/

Make sure the Authorization: Basic {{BASE_64_ENCODED_API_KEYS_SEPARATED_BY_COLON}}

Try the above and see if this resolves your issues.

 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

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us