Account Credentials for production envrionment

  • 1
  • Question
  • Updated 3 weeks ago
I saw that in production environment, API username is main company phone number, and extension is default "101", can I change it to other extension(account) for API authentication?
Photo of Harry Chen

Harry Chen

  • 110 Points 100 badge 2x thumb

Posted 3 weeks ago

  • 1
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,492 Points 5k badge 2x thumb
Yes, you can authorize using any extension as long as you provide the correct credentials. Be aware that different extension might have different password.
Photo of Harry Chen

Harry Chen

  • 110 Points 100 badge 2x thumb
Thanks.
But I did not find where I can assign a new extension to my app from the console.
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,492 Points 5k badge 2x thumb
What kind of "app" are you talking about? I assume that you are talking about programming. You can authorize with your extension. Please elaborate your use case. Thanks.
Photo of Harry Chen

Harry Chen

  • 110 Points 100 badge 2x thumb
That's the app I created in "Developers" console.
After I created a new app from RingCentral Developers console, it will give me something like clientID/client Credential, and also "User account credential" for Oauth2. But the "User account credential" is always the extension "101", I did not find any way to change it.
Photo of Phong Vu

Phong Vu, Devangelist

  • 3,192 Points 3k badge 2x thumb
Hi Harry,

You are correct that after you created an app, you get the clientID and the client Secret. But you are incorrect that you will get the "User account credentials" for OAuth2. Also you question title was about for production environment.

Let's step back and talk first about the sandbox environment. I will mention about the production environment later.

After you signed up for a RingCentral developer account and the first time you create an app, the system will guide you to create a sandbox environment and assign the first extension 101 to the sandbox account.

That extension has the main company number, the same email address as the one you used to sign up for RC developer account.

During the sandbox creation, you have to set the password for the admin extension 101. At this point, your sandbox account has just one extension.

If you want to create more extensions (Users) under the sandbox account, you have to login the devtest service (use the main company number as the username and the password you just set during the sandbox creation process) then create a new extension and assign phone number to that new extension.

Each extension you create under that account will require a unique email address, a username (phone number) and a password.

When you create an app, it is always created in the sandbox environment.

That means that you get the clientID and client Secret for the sandbox environment.

While creating your app, you select the platform type for the app, that will define the authorization method. More info

If the platform type requires Authorization flows (OAuth2), you must provide ways for your users to login. See this tutorial

If the platform type allows Password flow, you will provide the username and password of the user (extension) who want to login. Be it the 101 or 102 or whichever extension under the sandbox account.

You can always login any extension with the main company number and specify the extension number (101 or 102 etc). But the password must be the password set for that extension!

Production environment

When you graduate the app, the system will generate a new client ID and new client Secret for the production environment.

You need to change the Client ID/Secret in your code, replace the ones for sandbox with the production ones.

You will login the same way as you did for the sandbox account. But with user's credentials for your production account.

Hope this helps.

+ Phong

Photo of Harry Chen

Harry Chen

  • 110 Points 100 badge 2x thumb
thanks for your so detail explanation.

What I am wondering is, I created my sandbox environment by my own extension not that 101 extension (because I even don't know the password of 101). So why the default user account is still 101?
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,492 Points 5k badge 2x thumb
101 is not your account, it is just extension number.  By convention admin user's extension number is 101. As Phong said, during sandbox setup, you have the chance to set password for admin user. If you forget it, there is also link to reset it.
(Edited)
Photo of Harry Chen

Harry Chen

  • 110 Points 100 badge 2x thumb
Thanks.
That's why it's confused. 101 belongs to one of another admin, I can't reset that account's password since the email is linked to that people. So I really had not set or reset 101 password during sandbox creation.
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,492 Points 5k badge 2x thumb
You can either ask the admin for password, or ask him to login https://service.devtest.ringcentral.com to create a new user(with new extension number such as 102) for you.