我正在为网页开发一个appengine项目。
我在开发人员控制台中打开了Google+ API。
该网页以以下身份登录:
userService.createLoginURL(request.getRequestURI())
之后,我想检索已登录用户的个人资料图片。
为此,我导入了js库:
<script src = "https://plus.google.com/js/client:platform.js" async defer></script>
和:
<script src="https://apis.google.com/js/client:plusone.js" type="text/javascript"></script>
然后我执行:
gapi.client.load('plus','v1', function(){
var request = gapi.client.plus.people.get({
'userId': 'me'
});
request.execute(function(resp) {
console.log('Image at:' + resp.image.url);
});
});
但这继续返回403错误:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceededUnreg",
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
"extendedHelp": "https://code.google.com/apis/console"
}
],
"code": 403,
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
}
}
我该如何解决?我想念什么?
最佳答案
我无法发表评论,所以我正在为此写答案。
转到Google开发者控制台:
选择您的项目。
转到左侧面板上的API和身份验证。
选择您正在使用的API。
点击使用情况标签,然后查看您提出的请求数量。
请求数量必须超过您尝试使用的API的每日免费限制。
关于javascript - gapi.client.plus.people.get返回403错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/30798197/