Answered

New registered app token active life period is too short

  • 26 January 2023
  • 4 replies
  • 58 views

Userlevel 2
Badge +1

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

 

icon

Best answer by andrew_videoask 26 January 2023, 14:35

View original

4 replies

Userlevel 2
Badge +1

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
 

 

Userlevel 7
Badge +5

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! 

Userlevel 2
Badge +1

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?

Userlevel 7
Badge +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