Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Build and Graduate Your App in RingCentral

DZone 's Guide to

Build and Graduate Your App in RingCentral

In this tutorial, see how to build and graduate your app in RingCentral.

Free Resource

A developer journey starts with building the app, testing it, maintaining it, and then moving it into production.

RingCentral deals with different kinds of APIs that offer reliable VoIP calling, web meetings, fax, and more features over cloud communication with reliability, security, and quality.

We need to log into our RingCentral developer account to start building our APIs: https://developers.ringcentral.com.

Once there, we need to log into the developers account with our email id and password. For a new user, we need to create a new developer account.

Once that's done, we can now see the dashboard of the developer's platform. All we need to do now is create a new application by hitting the CreateApp button at the top right, and the following dialog box will show:

  • Application Name: The name of your app.
  • Organization Name: The name of your organization.
  • Description: Any text describing your app which is needed for app graduation only and will not be displayed to your app users. It should contain a minimum of 20 characters.

We need to choose the app type out of the following two options:

  • Private — if you are developing an app for your own RingCentral account use
  • Public — if you are developing an app for many RingCentral accounts

We have chosen Desktop (Mac/Windows/Other) — installable desktop apps including Windows, Mac, and others. This includes Chrome apps.

We get Authorization Code as OAuth grant_type.

Each API Permission in the RingCentral API (such as SMS, Fax) is associated with one or more API resources. I have selected SMS, as I want my app to send an SMS, as shown below:

We also need to give a callback URI that will be redirected to get the code. It can be any local URL. During calling the OAuth API, we need to give exactly the same URL as redirect_uri.

Once the API created, we can see the details like client id, client secret, etc. in the dashboard:

RingCentral provides you with Sandbox and Production environments to develop and test your app. Once we have created a new application, a Sandbox account is generated as the default. The production environment will be available upon application approval.

Apply for Production

We need to ready our app to work in production, and for that, we need to follow the RingCentral app graduation process. The process is designed to ensure that our RingCentral integration works properly in SandBox and will not cause any bad experiences for RingCentral users.

We will be able to click the ‘Apply for production‘ button once our app fulfills the following graduation requirements, which cover the last two days (UTC timezone) — yesterday and today.

  • 5+ successful API calls per each endpoint used (20+ in total): Our app is required to send 5 or more successful API requests to each endpoint it uses, but the total number of successful API requests should be 20 or more.

    Each API Permission in the RingCentral API (such as SMS, Fax) is associated with one or more API resources. This means that for each API Permission we have assigned for our application, we must make at least 5 requests. In cases where we use only a single API permission/resource (SMS in my case), we must make at least 20 requests to that particular API.

  • Less than 5% of API calls result in 4xx errors: We need to make sure that we receive 4xx errors (400, 404, 429, etc.) in response to less than 5% of your API requests during the last two days.

  • The only permission for our current app is SMS: Since our app is only using SMS, we need to execute at least 20 successful SMS requests to this endpoint and have less than 5% of those requests be a 4xx error response (1 error per 20 requests = 5%...means less than 5% needed of our requests ).

Testing our app

In Postman, first we need to select Authorization and then select OAuth 2.0 as follows:

Then we will configure the OAuth 2.0 in the Authorization header as follows:

As we are configuring the parameters, we are providing exactly the same callback URI that we created during our app creation along with details like client id and secret. Once we click Request Token, we will be redirected to login pages, as follows, where we need to fill in the details:

We need to click Sign In, as shown above. Finally, the page will appear that asks us to Authorize our app:

Once done, we will get the access_token for our SMS API:

We will use this access_token for our SMS API as follows:

We will continue to hit this API and test this while making sure we execute at least 20 successful SMS requests to this endpoint and have less than 5% of those requests be a 4xx error response.

Once we pass all the criteria, we can apply for the graduation process and the app will officially be submitted for review:

Publish Your App

Once our app has graduated for production and passed the review, we can publish it. Please open the ‘Publish‘ tab on your app page and fill in the App Info form and publish it to production:

Once you fill the form and click the publish button, you will raise a request for moving the application to production. The RingCentral backend dev support team will review your request, and finally, your application will be moved to production and will run there.

Thank you!

Topics:
ringcentral ,ringcentral apis ,api ,integration ,ringcentral tutorial ,tutorial

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}