question

Chad Corey avatar image
Chad Corey asked ·

C# authentication

I think I may have missed something here. Trying to authorize so I can test other API calls. I seem to have to supply a login and password to authorize but I would think the ID and Secret would be enough. What step did I miss here? I'm using the RingCentral NuGet package inside a windows form application for now. End result would be services or console jobs that would automate things.


this is my test code:

string RINGCENTRAL_CLIENTID = RINGCENTRAL_CLIENT_ID;

string RINGCENTRAL_CLIENTSECRET = RINGCENTRAL_CLIENT_SECRET;

string RINGCENTRAL_USERNAME = "USERNAME";

string RINGCENTRAL_PASSWORD = "PASSWORD";

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();

c#.net
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.

Anirban Sen Chowdhary avatar image
Anirban Sen Chowdhary answered ·

Are you getting any authentication errors? Check this reference: https://community.ringcentral.com/questions/10217/authenticate-error-oau-140-c.html

Hope this help

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.

Chad Corey avatar image
Chad Corey answered ·

no this authenticates fine but I swore there is a way to not have to supply a login and password and just get a token using the ID and Secret.

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.

If you question is purely about if and how to get an access token using just the app client id and secret, then you don't need to wrote a long question and provide the code snippet above which distracts your point or cause unnecessary misunderstanding.

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.