News & Announcements User Community Developer Community

Welcome to the RingCentral Community

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

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
Access code invalidates - fails with BadRequest
Tags: authentication
Sep 18, 2020 at 8:52am   •   2 replies  •  0 likes
Paul Fleming


We are getting BadRequest error when trying to generate an access token from refresh token.

To give a bit more context to it we have a .net application that integrates with RC to retrieve the calls. For this, we have a background job hosted in azure. As part of this job, we make HTTP request to generate the access token sending the request to /restapi/oauth/token . We generate a new access token every 10 mins.

What we are seeing is that this job seems to run for days and then for no reason it starts to fail with bad request error. Once it starts failing it never picks up and eventually the access token expires and once the access token is expired there is no way to get the job to run successfully and we have to get back to the customer to authorise again.

We have seen this happen a couple of times now and not sure what would be causing this kind of behaviour.

Any help would be greatly appreciated.


2 Answers
answered on Sep 22, 2020 at 12:57am  

Thanks for your response.

We are using 3-legged authorization flow and are using our own code for all RingCentral request.

Unfortunately, we are not capturing error response and the only info we have is 400-BadRequest.

However, we are adding more logging to this process and deploying it today so that we get more information when it fails next.

answered on Sep 21, 2020 at 7:23am  

A few questions for you.

1/ Are you using the .Net SDK or your own code? For the part you generate the access token and the also the part your app call other APIs.

2/ What type of app, password flow or 3-legged authorization flow?

3/ Can you print the error message or more from the response/header


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

Developer Platform
Integrated Apps
App Gallery
Developer support
Games and rewards

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