Dilip Kunder avatar image
Dilip Kunder asked Anirban answered

Removing refresh_token from response


I am new to ringCentral and started to explore it.

What I can see that the apis like fax, messages are secured with oauth authentication. The oauth response contains access_token as well as the refresh_token something like this:

{    "access_token": "<access token>",    "token_type": "bearer",    "expires_in": 3600,    "refresh_token": "<refresh_token>",    "refresh_token_expires_in": 604800,    "scope": "<scope>",    "owner_id": "****",    "endpoint_id": "****"}

Now in our api we don't actually require the refresh_token and it is just junk huge value in the response and want to eliminate it from the response.

I have seen that can be done in other authentication apis. But not sure if I really can disable them in ringCentral.

What is the best way I can remove those from the response? Also if not can modify the expiration time of refres_token in ringCentral?

getting started
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Anirban avatar image
Anirban answered

This is quite easy. You can easily disable it by setting the TTL which is also called time to live for the refresh_token_ttl to 0

example: username=<your username>&password=<your password>&extension=101&grant_type=password&refresh_token_ttl=0

Just use refresh_token_ttl=0 in the OAuth request along with your other parameters like grant_type, extension etc.

Now in your response you will never see refresh_token as it will expired before it generate

You can also set the value to -1 i.e refresh_token_ttl=-1

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys