Monu
Monu

Reputation: 907

YouTube API - How to create a permanent access token?

I am using the access token to play my private videos in my android app and for that, I am created an access token.

But It says, The OAuth Playground will automatically revoke refresh tokens after 24h. You can avoid this by specifying your own application OAuth credentials using the Configuration panel

I tried to add my own client secrets and ID and after creating a new token, it still displays the same NOTE.

How can I create a permanent access token that will not expire?

I tried to change available parameters like Access Type Online, Offline, and still shows same NOTE.

Upvotes: 3

Views: 3644

Answers (1)

Tobey
Tobey

Reputation: 1440

Google apis generally do not let you get a permanent access token

Access tokens have limited lifetimes. If your application needs access to a Google API beyond the lifetime of a single access token, it can obtain a refresh token. A refresh token allows your application to obtain new access tokens.

Generate an offline refresh token to use and get a short lived access token

This is part of the Oauth2 standard

Upvotes: 3

Related Questions