I am using Google Drive API to get the list of files on my google drive. I've got it working by getting an access token, client id and client secret in google cloud platform. My issue is, the token expires in 3600. I've tried this endpoint, https://www.googleapis.com/oauth2/v4/token
and put this in the request body,
{
"client_id": "client_id",
"client_secret": "client_secret",
"refresh_token": "access_token",
"grant_type": "refresh_token"
}
but is only returning
{
"access_token": "new_access_token",
"expires_in": 3552,
"scope": "https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive",
"token_type": "Bearer"
}
which doesn't refresh the token life.
is there anything I'm missing?
I am using it on postman first so that I can know it's working properly.
any help is appreciated.