question

Paul Fleming avatar image
Paul Fleming asked ·

Access code invalidates - fails with BadRequest

Hi,

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.

Thanks

authorizationrefresh access tokenauth token
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered ·

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

1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Paul Fleming avatar image
Paul Fleming answered ·

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.


1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Work together.
From anywhere.

Team messaging, video meetings
and phone - all in one app.


Get the new RingCentral app