Android get Google tasks - API key method
My main goal is get google task data for the selected google account using goole tasks APIs. I am using API key method to get google task data in android platform. http://code.google.com/p/google-api-java-client/source/browse/tasks-v1-开发者_开发知识库json-oauth2-android-sample/src/com/google/api/client/sample/tasks/v1/android/TasksSample.java?repo=samples
As it specified in above link, I have generated API key for my account and used it in code and it works fine. But the same API key generated for my google account is working for other google account also to get task data.
In API key method we have to provide API key and auth token of perticular google account to goolge APIs to get task data.
My question is how the API key genretaed for one account is working for other google accounts?
How to get this API key programatically?
Is this API key unique for different google accounts?
what is the valid time of API key?
Thank you.
The API key is bound to the developer (not the user) Google Account, and is used to identify your application to the Tasks API so it can applies global quota and display statistics.
This sample then uses (anonymous) OAuth 2.0 to request Authorization to make requests to the Tasks API on the behalf of the user (not the developer) Google Account.
Hope that helps
精彩评论