I think this might help:
http://www.youtube.com/watch?v=iK14bfd6qhs

-- alex

On Thu, Oct 4, 2012 at 1:42 PM, Luca Matteis <[email protected]> wrote:
> I'm trying to use the Google Drive API through the App Identity interface
> provided with Google App Engine. This basically allows my web application to
> communicate with Google's APIs from server to server.
>
> However, after I set all the appropriate values and scopes, and enable all
> the right Google Drive knobs on the API console page, I still get this for a
> simple GET request to https://www.googleapis.com/drive/v2/files:
>
> { "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." }}
>
> And this is the code - never mind the weird JS syntax, this is still using
> the Java API:
>
> var scopes = new java.util.ArrayList();
> scopes.add("https://www.googleapis.com/auth/drive";);
> var appIdentity = AppIdentityServiceFactory.getAppIdentityService();
> var accessToken = appIdentity.getAccessToken(scopes);
> var url = new URL("https://www.googleapis.com/drive/v2/files";);
> var connection = url.openConnection();
> connection.setDoOutput(true);
> connection.setRequestMethod("GET");
> connection.addRequestProperty("Content-Type", "application/json");
> connection.addRequestProperty("Authorization", "OAuth " +
> accessToken.getAccessToken());
>
> Funny thing is that if I simply change the API to use the urlshortner API
> instead, it works:
>
> var url = new URL("https://www.googleapis.com/urlshortener/v1/url/history";);
>
> And output:
>
> { "kind": "urlshortener#urlHistory", "totalItems": 0, "itemsPerPage": 30}
>
> What am I missing?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/v2la6ZNMAsMJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to