Git Product home page Git Product logo

ringcentral-java's Introduction

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.

ringcentral-java's People

Contributors

tylerlong avatar pacovu avatar pblanchardie avatar pcrane70 avatar mend-for-github-com[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.