简体   繁体   中英

Uploading files to Google Drive in the background

When authenticating a user on the website I get an access token

{
"access_token": "ya29.igD5RcTYjTQgJwGL_LFB7HFeWOZvGWTTO8JWpqGNaMOuMssswynugEea",
"token_type": "Bearer",
"expires_in": 3600,
"created": 1411545943
}

My problem is this will expire in one hour and I need to upload files in background using a cron job, this could be a week later. Is there a method to either get a token that will never expire or perhaps something I haven't considered?

You can get refresh tokens, check the docs at

https://developers.google.com/accounts/docs/OAuth2 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM