public function withRefreshToken($refreshToken) { $p = array('refresh_token' => $refreshToken, 'grant_type' => 'refresh_token'); // Some services require specifying the redirect_uri also when using // the refresh_token. // issue: https://github.com/fkooman/php-oauth-client/issues/20 if ($this->clientConfig->getUseRedirectUriOnRefreshTokenRequest()) { if (null !== $this->clientConfig->getRedirectUri()) { $p['redirect_uri'] = $this->clientConfig->getRedirectUri(); } } return $this->accessTokenRequest($p); }