question

Raman Thakur avatar image
Raman Thakur asked ·

Status Code 400(Bad Request)

Hi All,

I am creating a dummy console application using ASP.NET with C# and RingCentral.Client.

After implementing provided sample code, I got below error:

Please suggest what is the step which I missed.

Thanks

apiringcentralc#asp.net
1564391954074.png (27.2 KiB)
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 ·

Hi Raman,

Not sure how you created the auth request. But the first thing I would suggest is to use the new RingCentral .Net SDK. Then follow the sample code to get authenticated.

Example to send a message

Example to make a ring-out call

If you still want to authenticate the way you did before. Post the entire code (don't post your username/password nor client Id/Secret) so I can help.

1 comment Share
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.

Hello Phong,

Below are the steps which I follow

1. I created the app with below settings

2. Created an dummy console project in VS-2015 having below environment

3. Installed RingCentral.Net and Newtonsoft.json from nuget:

4. As suggested in your tutorial, I write the below code on program.cs

5. After running the application I get the below error:

Let me know which step I missed or why not application get authorization as suggetsed.


Thanks,

Raman Thakur

0 Likes 0 · ·
1564466814799.png (77.1 KiB)
1564466989411.png (41.9 KiB)
1564467196664.png (15.9 KiB)
1564467483447.png (77.8 KiB)
1564467670825.png (210.1 KiB)
Anirban Sen Chowdhary avatar image
Anirban Sen Chowdhary 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? It can happen due to various issues.

Until and unless you provide the full exception message and the full details about how you are calling the token url, and details about your input, it will be difficult to judge.

1 comment Share
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.

Below are the steps which I follow

1. I created the app with below settings

2. Created an dummy console project in VS-2015 having below environment

3. Installed RingCentral.Net and Newtonsoft.json from nuget:

4. As suggested in your tutorial, I write the below code on program.cs

5. After running the application I get the below error:

Let me know which step I missed or why not application get authorization as suggetsed.


Thanks,

Raman Thakur

0 Likes 0 · ·

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.