question

Chad Corey avatar image
Chad Corey asked Phong Vu commented

.NET C# Authorization

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

rest api
1 |3000

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

To run the code above, you need to setup an app as follows:

  1. Login or create an account if you have not done so already.
  2. Go to Console/Apps and click 'Create App' button.
  3. Select "API App for RingCentral Office" under "What type of app are you creating?"
  4. Select "Other Non-UI" under "Where will you be calling the API from?"
  5. Select "Only members of my organization/company" under "Who will be authorized to access your app?"
  6. On the second page of the create app wizard, enter your app's name and description. Then select the permissions you need.


After creating the app, click the app credentials and copy the app client is and client secret then use it with the code above.

1 |3000

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 Phong Vu commented

this is not anything to do with this. I've already done this.

What I am asking about is not having to use a login/password to authenticate an app like this. Can you use just ID and Secret to get a token?

1 comment
1 |3000

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 ♦♦ commented ·

No, access token is issued for a user and requires user's login credentials. You can either implement password flow authentication as mentioned above. Or implement 3-legged authorization flow.

0 Likes 0 ·

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