dongqun1656 2015-10-04 19:24
浏览 114

使用Google ID令牌进行身份验证时获取Google Plus配置文件时出错

When I try getting The Google plus profile information using the following code,

$client = new Google_Client();
$client->setClientId(Config::get('services.google.clientId'));
$client->setClientSecret(Config::get('services.google.clientSecret'));
$client->setRedirectUri(Config::get('services.google.redirectUri'));
$client->setScopes(['profile', 'login' ]);

$id_token = $this->request->input('idToken');


$token_data = $client->verifyIdToken($id_token)->getAttributes();

$googlePlus = new Google_Service_Plus($client);
$userProfile = $googlePlus->people->get('me');

I get the error saying

exception 'Google_Service_Exception' with message 'Error calling GET https://www.googleapis.com/plus/v1/people/me: (403) Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.' in /home/bepolite/websites/goodies/vendor/google/apiclient/src/Google/Http/REST.php:110

This code used to work before and I changed nothing on my end.

Also I am using the official google php api which I downloaded using composer

"google/apiclient": "^1.1"

Thanks In advance

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Vue3 大型图片数据拖动排序
    • ¥15 划分vlan后不通了
    • ¥15 GDI处理通道视频时总是带有白色锯齿
    • ¥20 用雷电模拟器安装百达屋apk一直闪退
    • ¥15 算能科技20240506咨询(拒绝大模型回答)
    • ¥15 自适应 AR 模型 参数估计Matlab程序
    • ¥100 角动量包络面如何用MATLAB绘制
    • ¥15 merge函数占用内存过大
    • ¥15 使用EMD去噪处理RML2016数据集时候的原理
    • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大