question

Matthew T avatar image
Matthew T asked ·

Authenticate Error (OAU-140), C#

After walking through the setup process to setup a sandbox account and creating a sample application using API examples provided I am unable to get past the authentication. Have tried both sandbox and production account credentials along with multiple password resets on both accounts. Code below;

string RINGCENTRAL_CLIENTID = "myClientID<used copy/paste>";
string RINGCENTRAL_CLIENTSECRET = "myClientSecrete<used copy/paste>";

string RINGCENTRAL_USERNAME = @"sandbox/prod phone #<used copy/paste>";
string RINGCENTRAL_PASSWORD = "getyourownpassword<used copy/paste>";
string RINGCENTRAL_EXTENSION = "101";
bool RINGCENTRAL_PRODUCTION = false;
RestClient restClient;
restClient = new RestClient(RINGCENTRAL_CLIENTID, RINGCENTRAL_CLIENTSECRET, RINGCENTRAL_PRODUCTION);
Task.Run(async () => await restClient.Authorize(RINGCENTRAL_USERNAME, RINGCENTRAL_EXTENSION, RINGCENTRAL_PASSWORD)).Wait();

I suspect the issue might be in my configuration within the app or site settings, but after having spent enough time digging, I am at a loss.

c#authenticationoau-140
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 ·

I cannot think of other reasons than somehow you provided wrong login credentials. To make sure if you can login your app with your sandbox credentials, first check if you can login this site https://service.devtest.ringcentral.com. Then use the exact credentials to login your app.

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.

Matthew T avatar image
Matthew T answered ·

Indeed I am able to login with the same credentials into your linked site. Again, I am only using copy paste to make sure there isn't a single typo just as I did for the login. Could there be a service on ringcentral's part? or the faulty API?

2 comments 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.

When you logged in the service web, did you login with or without the extension id? Do you have more than 1 extension? Just to make sure if the credentials does not belong to the extension.

If everything is correct and you still face the problem, give me your app client id.

0 Likes 0 · ·
Matthew T avatar image Matthew T Phong Vu ♦♦ ·

ClientID "7_ANM_W1R2G0un6mjNg55A"

0 Likes 0 · ·
Matthew T avatar image
Matthew T answered ·

Logged in without the extension to the web portal, but specified the extension with the API call as per my code in my original post.

3 comments 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.

Then try w/o specifying the extension number when login your app.

0 Likes 0 · ·

Why did you change your extension number to 777, and you login your app with 101? That is why you cannot login.

1 Like 1 · ·
Matthew T avatar image Matthew T Phong Vu ♦♦ ·

Thank you. For some reason I thought I was configuring my extension to forward to for testing the ringout feature. Thank you for your assistance.

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.