question

keith-stephens7892 avatar image
keith-stephens7892 asked Anirban answered

C# with RC Api login error

Hello All,

I am trying to create a C# web application using RC API's for C#.

In my page_load method I try to log into RC using their tutorial for C# api, but I cannot get logged in.

I get error Request to https://platform.devtest.ringcentral.com/restapi/oauth/token failed with status code 400 (Bad Request).


I can log into developer.reingcentral.com just fine, but through my web app it will not log in.

I eventually want to log in, and get a list/count of all calls made by all users, so I can report on how many calls each user has made, and put that into a gridview.


Can anyone help and or provide sample code on how to properly setup my Sandbox with the proper platform type, and steps on how I should set up my web app.

Thanks,

KS.

getting started
1 |1500

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

Tyler Liu avatar image
Tyler Liu answered
Please use this SDK to access platform API:  https://github.com/ringcentral/ringcentral-csharp-client

There is sample code in README file. If you have problem doing authorization, please post your code here.
1 |1500

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

Anirban avatar image
Anirban answered

400 (Bad Request means you are not able to provide correct request to the oauth API.

Did you checked by calling the API directly?

Can you prove the code snippet snippet to get the root cause detected?

1 |1500

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

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys