public function updateAccessToken($refreshToken, $apiContext) { $apiContext = $apiContext ? $apiContext : new ApiContext(self::$credential); $apiContext->getCredential()->updateAccessToken($apiContext->getConfig(), $refreshToken); }