I am unable to get a refresh token from Google. Notice I am using offline and force. But the token I get back has no refresh token. I thought , maybe its a token and refresh token all in one. But I cannot use that token to refresh the token.
$client = new Google_Client();
$client->setApplicationName("MYAPP");
$client->setClientId(GDRIVE_CLIENT_ID);
$client->setClientSecret(GDRIVE_CLIENT_SECRET);
$client->setRedirectUri($redirect_uri);
$client->addScope("https://www.googleapis.com/auth/drive");
$client->setAccessType('offline');
$client->setApprovalPrompt('force');
Array( [access_token] => ya29.a0AX9GBdUNfYtyMi098Yk.... [expires_in] => 3598 [scope] => https://www.googleapis.com/auth/drive [token_type] => Bearer [created] => 1674340315)