Google+ api with dart chrome app - 403 Daily Limit

I am trying to use google_plus_v1_api + google_oauth2_client in a chrome-packaged application.

Everythin works fine when I use only oauth2 lib:

chrome.identity.getAuthToken(new chrome.TokenDetails(interactive:true))
.then((token){
       OAuth2 auth = new SimpleOAuth2(token);
       var request = new HttpRequest();
       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());
});

But I can not get google + lib to work:

chrome.identity.getAuthToken(new chrome.TokenDetails(interactive:true))
.then((token){
       OAuth2 auth = new SimpleOAuth2(token);
       Plus plus = new Plus(auth); 
       plus.people.get('me').then((d)=>print(d));
});

Throw this exception:

GET https://www.googleapis.com/plus/v1/people/me 403 (Forbidden) Exception: APIRequestException: 403 Daily limit for unauthenticated users Use Exceeded. To continue using registration is required.

Am I missing something? How should I use google + api lib?

+4
2

, , , , makeAuthRequests Plus true:

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

, auth . , makeAuthRequests true Plus OAuth2, , -, (, ).

+3

, , :

plus.oauth_token = auth.token.data;

google_plus_v1_api . .

+1

Source: https://habr.com/ru/post/1535435/


All Articles