I've been poking through the API and have found various functions in different places that look like they are involved in refreshing tokens. Nothing I am doing is working.
My code as follows
// oauth 2 config
$credentials= array(
'client_id' => $config['id'],
'client_secret' => $config['secret'],
'access_token' => $params['access_token'],
'refresh_token' => $params['refresh_token']
);
$user = new \AdWordsUser(null, $adwords['dev_token'], $adwords['useragent'], null, null, $credentials);
$handler = $user->GetOAuth2Handler();
$oauth2Info = $handler->RefreshAccessToken($user->GetOAuth2Info());
$user->SetOAuth2Info($oauth2Info);
Using this code here I would expect that the access token would get refreshed. If I try to make any call after it however I get
{\n \"error\" : \"unauthorized_client\"\n}
Thoughts?