【发布时间】:2017-08-19 17:56:47
【问题描述】:
我刚刚开始着手在 3rd Party API 之上构建,我想添加到我自己的网站(用 AngularJS 编写)的一个功能是构建 Blogger 的 API 以创建博客提要。
我已设置好所有内容,并看到 200 状态作为请求,但网络选项卡中的响应显示:
// API callback
angular.callbacks._0({
"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."
}
}
);
这是我的控制器:
$http.jsonp('https://www.googleapis.com/blogger/v3/blogs/' + id + '?api_key=' + apiKey).then(function(res) {
$scope.blogData = res.data;
console.log($scope.blogData, res);
}, function(error) {
console.log(error);
});
所以从外观上看请求是成功的,但响应显示身份验证问题。我已经阅读了文档,并且该博客将是公开的,因此机密等方面应该没有任何问题。
有什么想法吗?
【问题讨论】:
-
你可以尝试去你的谷歌开发控制台看看你是否超出了你的每日配额。
标签: javascript angularjs api google-api blogger