0

I am using google task api, it works fine with my account associated to my device, but I can create tasks ONLY on this account, so how can I create tasks for other Gmail accounts that I know the login and password using my configured device account ?

For example my current account is MyAcount@gmail.com it is the account associated with the tablet, I want to create a task for YourAcount@gmail.com that I know the password.

to get token I'am using the GoogleAuthUtil.getToken(....) and GoogleAcountManager

Wajdi Hh
  • 785
  • 3
  • 9

1 Answers1

0

You cannot use username/password authentication to access the tasks api. The only thing you can do is login to that user, then use the Oauth Playground (https://developers.google.com/oauthplayground/) to generate a refresh token, which you can embed in your app to request an access token, which you can then use to access the API.

NB, this is all a really bad idea.

pinoyyid
  • 21,499
  • 14
  • 64
  • 115
  • Thxs for replaying, but can you give me and example using Java code in Android, because I am using the Java client API and google play authentification service, and I didnt' find how refresh Token using an other account – Wajdi Hh Jan 09 '14 at 13:53
  • 1
    You'll need to explain your requirement in a lot more detail. Remember I did say it's a really bad idea. – pinoyyid Jan 09 '14 at 17:33