Google-api-php Refresh Token returns invalid_grant
I've nearly searched every result of the first page of google for this. But can't seem to find the answer. I'm working with a refresh_token by Google's API and receiving: Error refreshing the OAuth2 token, message: '{ "error" : "invalid_grant" } What i'm doing. First: i'm creating and storing a persistant connection to the google api: $client = new Google_Client(); $client->setClientId('xxxxxx-s73q0pa41aq3i2kcpatmpas6e6kkp99h.apps.googleusercontent.com'); $client->setClientSecret('xxxxxxxxxxxx'); $client->setRedirectUri('http://xxxxxxxx/generaterefreshtoken.php'); $client->setScopes(array(