New registered app token active life period is too short | Community
Skip to main content
Answered

New registered app token active life period is too short


Yuriy
Forum|alt.badge.img+1

Why the token of new registered app in Videoask is expiring so soon? Shouldn’t this be active for 30 days?
 

 

Best answer by andrew_videoask

Hi @Yuriy 👋

@Grace is correct that the refresh_token doesn’t expire. You can use the refresh_token at any time to generate a new access_token.

The access_token expires after 60 minutes. It’s not currently possible to generate a permanent access_token, so you’ll need to generate a new one when it expires.

It’s best practice to use a caching layer like Redis to store the access_token. That way, you don’t have to generate a new access_token every time you call the VideoAsk API. Instead, you can use the current access_token until it expires. Once it expires, your code can generate a new one.

I hope this helps!

View original

4 replies

Yuriy
Forum|alt.badge.img+1
  • Author
  • Explorer
  • 10 replies
  • January 26, 2023

Oh got it, to have a 30-day period I should trigger refresh token call, right?

I saw here in the forum that refresh token doesn’t expire at all, is that true? I got the response that it still expires in 3600 sec
 

 


Grace
Community Team
Forum|alt.badge.img+5
  • Community Advocate
  • 2681 replies
  • January 26, 2023

Hey @Yuriy I’m pretty sure once the refresh_token is granted it allows you to obtain a new access token any time but I’m going to get @andrew_videoask to confirm this one when he’s back online later! 


Yuriy
Forum|alt.badge.img+1
  • Author
  • Explorer
  • 10 replies
  • January 26, 2023

Hey @Grace Seems it doesn’t( 

We have to update all the calls every hour which is very annoying. Is there a chance to not update tokens every hour?

And what’s the difference between registered and not registered dev app? Is that frequency of token updatings only? For the 1st one it’s 60 min and for the non-registered is 15?


andrew_videoask
Typeform
Forum|alt.badge.img+5

Hi @Yuriy 👋

@Grace is correct that the refresh_token doesn’t expire. You can use the refresh_token at any time to generate a new access_token.

The access_token expires after 60 minutes. It’s not currently possible to generate a permanent access_token, so you’ll need to generate a new one when it expires.

It’s best practice to use a caching layer like Redis to store the access_token. That way, you don’t have to generate a new access_token every time you call the VideoAsk API. Instead, you can use the current access_token until it expires. Once it expires, your code can generate a new one.

I hope this helps!


Reply