Skip to content
RingCentral Java SDK
Java Kotlin JavaScript
Branch: master
Clone or download
Latest commit e5ad3d4 Aug 13, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode SetOkHttpClient Oct 8, 2018
code-generator MMS working Jun 18, 2019
gradle/wrapper Update gradle Jun 1, 2019
src Add requestRaw method Aug 12, 2019
.ackrc Move PubNub to separate project Jun 4, 2019
.editorconfig Add meta files May 8, 2017
.gitignore Add code generator Jun 1, 2019
.travis.yml Mute javadoc errors Jun 1, 2019
README.md Minor change to doc Jun 9, 2019
build.gradle Add sugar authorize method Jun 24, 2019
dev-notes.md SetOkHttpClient Oct 8, 2018
gradlew Update gradle Jun 1, 2019
gradlew.bat Update gradle Jun 1, 2019
samples.md MMS working Jun 18, 2019
settings.gradle Add meta files May 8, 2017

README.md

RingCentral SDK for Java

Build Status Coverage Status Download Chat Community Twitter

RingCentral Developers is a cloud communications platform which can be accessed via more than 70 APIs. The platform's main capabilities include technologies that enable: Voice, SMS/MMS, Fax, Glip Team Messaging, Data and Configurations.

API Reference and APIs Explorer.

Installation

Gradle

repositories {
  jcenter()
}

dependencies {
  compile 'com.ringcentral:ringcentral:[version]'
}

Don't forget to replace [version] with expected version.

Maven

<repositories>
  <repository>
    <id>jcenter</id>
    <url>https://jcenter.bintray.com/</url>
  </repository>
</repositories>

<dependency>
  <groupId>com.ringcentral</groupId>
  <artifactId>ringcentral</artifactId>
  <version>[version]</version>
</dependency>

Don't forget to replace [version] with expected version.

Manually

Download jar here and save it into your java classpath.

Usage

Intialization & Authorization

RestClient rc = new RestClient(clientId, clientSecret, server);
rc.authorize(username, extension, password);

// do something with `rc`

rc.revoke();

For the server parameter, there are two static final string variables in RestClient:

public static final String SANDBOX_SERVER = "https://platform.devtest.ringcentral.com";
public static final String PRODUCTION_SERVER = "https://platform.ringcentral.com";

Token refresh

Since 1.0 version, the SDK by default does NOT do auto token refresh. This is because most of the time it's better to manage token lifecycle manually: rc.refresh().

For simple apps, token auto refresh could be beneficial. So we provide a sugar method: rc.autoRefresh(). This method will start a background timer to refresh token for you every 30 minutes. You can customize the refresh period, for example, change it to every 50 minutes: rc.autoRefresh(1000 * 60 * 50).

Code samples

You can find sample code for all the endpoints.

There is also lots of useful code for your reference in our test cases.

PubNub subscriptions & notificatioins

Please refer to the RingCentral PubNub SDK for Java project.

You can’t perform that action at this time.