Hello, I'm a beginner node.js developer.
I want to use YouTube as a video storage and video server in the service
To do this, everyone who comes into my service must upload with my token.
I am currently using the npm tube-api module
I'm getting an oauth2 token from Google to use YouTube API.
Using the module, we succeeded in receiving the first token, but
Due to the issue of the expiration date, I have to keep refreshing it.
At this point, there is a serious problem that users should see the Google login screen.
Is there any way to deal with this problem in the backend?
node.js youtube-api google oauth2
When I searched for it, you can update the access token by sending a POST https://accounts.google.com/o/oauth2/token
request by specifying client_id
, client_secret
, and .
The number of renewal tokens issued is limited, with limits per client/user combination and per user for all clients. You must store the renewal token in a long-term storage and continue to use it until it expires. If the application requests too many renewal tokens, this limit can be reached, which will stop the existing renewal tokens from working.
Then the server can automatically send me POST
when the right time comes to run token renewal, save the updated token as the latest token and work with it... But I don't know if it'll actually work out.
https://www.domsammut.com/code/php-server-side-youtube-v3-oauth-api-video-upload-guide
Please refer to the link It's in php.
© 2024 OneMinuteCode. All rights reserved.