谷歌+;带dart chrome应用程序的api-403日限

谷歌+;带dart chrome应用程序的api-403日限,dart,google-plus,google-oauth,google-chrome-app,Dart,Google Plus,Google Oauth,Google Chrome App,我正在尝试在chrome打包的应用程序中使用+ 当我只使用oauth2库时,一切正常: chrome.identity.getAuthToken(新的chrome.TokenDetails(交互式:true)) .然后((令牌){ OAuth2 auth=新的SimpleAuth2(令牌); var request=newhttprequest(); request.onLoad.listen((d){print(request.response); request.open('GET','ht

我正在尝试在chrome打包的应用程序中使用+

当我只使用oauth2库时,一切正常:

chrome.identity.getAuthToken(新的chrome.TokenDetails(交互式:true))
.然后((令牌){
OAuth2 auth=新的SimpleAuth2(令牌);
var request=newhttprequest();
request.onLoad.listen((d){print(request.response);
request.open('GET','https://www.googleapis.com/plus/v1/people/me');
auth.authenticate(request).then((request)=>request.send());
});
但我无法让google+lib工作:

chrome.identity.getAuthToken(新的chrome.TokenDetails(交互式:true))
.然后((令牌){
OAuth2 auth=新的SimpleAuth2(令牌);
Plus Plus=新Plus(认证);
plus.people.get('me')。然后((d)=>print(d));
});
返回此异常:

获取403(禁止) 例外:APIRestException:403未经验证的每日限额 超出使用范围。继续使用需要注册


我遗漏了什么吗?我应该如何使用google+api库?

对不起,我发现这行遗漏了,这要归功于:

plus.oauth\u token=auth.token.data;
我的google_plus_v1_api查询现在正在运行。
很抱歉给您带来不便。

我刚刚看到了您的答案,但想指出我也遇到了同样的问题,并通过将
Plus
客户端的
makeAuthRequests
属性设置为
true
,解决了这个问题:

final plusclient.Plus plus = new plusclient.Plus(auth)
    ..makeAuthRequests = true;

似乎是一个更直截了当的解决方案,因为auth对象已经包含了令牌。在使用OAuth2对象构建
Plus
客户端时,我希望
makeAuthRequests
自动设置为
true
,但显然不是(可能是疏忽).

我记得在使用无效的API密钥时会遇到这种情况。没有密钥正常工作,但不是无效密钥。