News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Removing refresh_token from response
Tags: getting started
Nov 10, 2019 at 2:14am   •   1 replies  •  0 likes
Dilip Kunder

Hi,

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?

1 Answer
answered on Nov 10, 2019 at 2:43am  

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


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us