{"action":"closed","issue":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/41","labels_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/41/comments","events_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/41/events","html_url":"https://github.com/chrsmith/google-api-java-client/issues/41","id":59374384,"number":41,"title":"How I can reuse stored tokens to do future queries ?","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Type-Sample","name":"Type-Sample","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-01T03:23:07Z","updated_at":"2015-03-01T03:23:08Z","closed_at":"2015-03-01T03:23:07Z","body":"```\nWhich API and version (e.g. Google Calendar Data API version 2)?\n  google-api-java-client.1.1.0-alpha\n\n\nWhat format (e.g. JSON, Atom)?\n  JSON and Atom\n\nWhat Authentation (e.g. OAuth, OAuth 2, Android, ClientLogin)?\n  We need an example to OAuth 2\n\nJava environment (e.g. Java 6, Android 2.2, App Engine 1.3.7)?\n  Java 6\n\nExternal references, such as API reference guide?\n  We are using the picasa API\n\nPlease provide any additional information below.\n\n1. We are runing the picasa-atom-oauth-sample and it works perfect.\n2. The example have a \"private static OAuthCredentialsResponse credentials;\"\n3. Execute the next code to obtain the access tokens:\n    GoogleOAuthGetAccessToken accessToken = new GoogleOAuthGetAccessToken();\n    accessToken.temporaryToken = tempToken;\n    accessToken.signer = signer;\n    accessToken.consumerKey = \"www.mydomain.com\" /*\"anonymous\"*/;\n    accessToken.verifier = verifier;\n    credentials = accessToken.execute();\n    signer.tokenSharedSecret = credentials.tokenSecret;\n\n4. We are storing the credentials.token and credentials.tokenSecret for future \nreuse, but when we try to reuse the tokens in other programs it send me a \"403 \nForbidden\":\nException in thread \"main\" com.google.api.client.http.HttpResponseException: \n403 Forbidden\n\tat com.google.api.client.http.HttpRequest.execute(HttpRequest.java:219)\n\tat com.google.api.client.sample.picasa.model.Feed.executeGet(Feed.java:51)\n\tat com.google.api.client.sample.picasa.model.UserFeed.executeGet(UserFeed.java:37)\n\tat com.google.api.client.sample.picasa.AuthTest1.showAlbums(AuthTest1.java:54)\n\tat com.google.api.client.sample.picasa.AuthTest1.<init>(AuthTest1.java:46)\n\tat com.google.api.client.sample.picasa.AuthTest1.main(AuthTest1.java:94)\n\n5.  We have a registered application in \nhttps://www.google.com/accounts/ManageDomain, and we are using the parameters:\n    OAuth Consumer Key:\t   www.mydomani.com\n    OAuth Consumer Secret: XXXXXXXXXXXXXXXXXXXXXXXX\n\nCan you give us a correct example of how to get access and how to reuse stored \ntokens? \n```\n\nOriginal issue reported on code.google.com by `carlosec...@gmail.com` on 11 Oct 2010 at 11:23\n\nAttachments:\n* [ReuseAuthTest1.java](https://storage.googleapis.com/google-code-attachments/google-api-java-client/issue-41/comment-0/ReuseAuthTest1.java)\n"}}