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
Persist Access Token Life Time
Tags: sdk
Jul 17, 2017 at 11:23pm   •   4 replies  •  0 likes
hardik-joshi

I want to persist access token life time remain same once i got after login.is there any way to do it ?. other thing is can i get access token from back end without opening RingCentral Popup or login page ?


we are having C# and JavaScript base application.

4 Answers
answered on Jul 6, 2019 at 11:55am  

Since the Access token has expiration time of 60 minutes , one of the easy and better way would be use Cache and storing it into Cache for 30 mins rather than persisting it into a database.

This will also help in efficient call of API reducing the rate limit issue. Storing in DB will not be a good idea as it will be expiring after 60 mins and so no use of persisting it .

You can also generate the access token from refresh token whose expiration time is longer compared to access token

"other thing is can i get access token from back end without opening RingCentral Popup or login page ? "

For grant type =Authorization code, you will be compulsorily getting login page , but you can you can avoid it if you use grant type =Password



 0
answered on Jun 19, 2018 at 5:20pm  
Also, if the access token and refresh tokens are captured and maintained at the backend (maybe in a db), you can run a script to keep the access token/refresh token pair active and the user's auth will not expire. 

 0
answered on Jul 18, 2017 at 1:29am  
"can i get access token from back end without opening RingCentral Popup or login page"

Please read http://ringcentral-api-docs.readthedocs.io/en/latest/oauth/#authorization-flows . If you use authorization code flow, RingCentral Popup or login page is inevitable. If you use password flow, you don't need RingCentral login page because you can login via code programmatically. However, not every app supports password flow for security reasons.

 0
answered on Jul 18, 2017 at 1:27am  
"persist access token life time" is impossible for security reasons. What you can do is to refresh your access token periodically to make it always non-expired.  Refresh token can live as long as a week, so you can refresh access token once a week to make it non-expired.

 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