如何使用cURL从刷新令牌获取新的访问令牌?
在PHP中,我会做如下操作:
$client = new Google_Client();
$client->addScope(Google_Service_Analytics::ANALYTICS_READONLY);
$client->refreshToken($refresh_token);
$access_token = $client->getAccessToken();
如何使用cURL完成同样的事情?
我无法从他们的documentation中找到它。
1条答案
按热度按时间xurqigkl1#
下面是我使用的代码:
Link to gist
带有cURL的完整流