Part 2: Generate Bearer token using clientId, clientSecret & JWT to access RingCentral’s REST API.

Vinay S
2 min readApr 17, 2023

--

In our previous story, we saw how to create an RC developer account and create apps & credentials to get started with accessing RC’s REST API. If you haven't seen Part 1 — Please have a look & continue with Part 2

# Part 2: Generate Bearer token using clientId, clientSecret & JWT to access RC’s REST API.

In order to access REST API, First we need to convert our clientId, and clientSecret to base64 encoded string.

Let’s say clientId: XadlsZALRfK , clientSecret: M07Oj2TrQ1ywY4J

Navigate to https://www.base64encode.org/ enter clientId:clientSecret -> click encode -> you get the encoded base64 string. Please note between clientId and clientSecret there should be “:” delimiter.

Now let's open PostMan & generate Bearer token inorder to access RC’s REST API

Endpoint:

https://platform.devtest.ringcentral.com/restapi/oauth/token [POST]

Headers:

Authorization -> Basic <base64 token>

Content-type -> application/x-www-form-urlencoded

Body:

grant_type -> urn:ietf:params:oauth:grant-type:jwt-bearer

assertion -> JWT token generated in Part 1

Thats it. If you hit “Send” you will get the response below with Bearer token -> to make use of it for further API calls.

In our next post, we will look for how to create/update Teams using RC’s Public API with JWT Token.

Thanks!

Additional Contributor: @Lohit A

Build a communication app with RingCentral API [REST]

4 stories

--

--