Oauth/token server 400 error

  • 1
  • Problem
  • Updated 2 weeks ago
Hi,

I have to many errors when I look at analytics tab - endpoints. Most of them are oauth/token post,

Application type is Server-Only.
I am using c# client and code is below.

 rc = new RestClient(AppKey, AppSecretKey, Server);         
await rc.Authorize(Username, Extension, Password);
var account = rc.Restapi().Account();
var extension = account.Extension();
var response = await extension.MessageStore().List();

The error I've got is:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.209.29.78:443


Flurl.Http.FlurlHttpException: Call failed. An error occurred while sending the request. GET https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.209.29.78:443
Photo of zgrada zgrada

zgrada zgrada

  • 160 Points 100 badge 2x thumb

Posted 2 weeks ago

  • 1
Photo of zgrada zgrada

zgrada zgrada

  • 160 Points 100 badge 2x thumb
Anyone?
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,492 Points 5k badge 2x thumb
The error is just network connection error.  Could you please please try from a different network?

And can you open this page in browser? https://platform.devtest.ringcentral.com/restapi/v1.0
Photo of zgrada zgrada

zgrada zgrada

  • 160 Points 100 badge 2x thumb
Yes, I can open that page. Button Apply for Production is disabled and we cannot promote our application to production. The reason is that we have >5% 4xx errors. As you can see from screenshot below  the only error is related with oauth/token.




Photo of Tyler Long

Tyler Long, Official Rep

  • 8,492 Points 5k badge 2x thumb
The oauth/token error might be caused by https://github.com/ringcentral/ringcentral-csharp-client#auto-refresh. Please disable auto refresh.


You need to troubleshoot why are there so many 4xx errors