Hello I am using Google Drive API and successfully generated its token.
json object looks like following:
{
"access_token": xxxx,
"refresh_token": xxxx,
"token_type": "Bearer",
"expiry_date": xxxx
}
I can successfully make request (i.e. download file) but I wonder about its expiration. I read through its API document and I don't understand few things.
- It looks like Refresh Token is not expired. Only access token expires. Am I correct?
If #1 is correct, then should I remove all other fields other than "refresh_token"?
{ "refresh_token": xxxx }
What I want to achieve is... keep one token which never expires. However after an hour, I tried to download file from Google Drive, but it returns following:
{ "access_token" : xxxx, "expires_in" : 3600, "token_type" : "Bearer" }
It looks like it is expired. Do you need to generate token again for Google Drive API? There is no issue with Google Spreadsheet. Only Google Drive.
Thank you so much in advance.
Oh,, scope is
['https://www.googleapis.com/auth/drive.readonly']