{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/862","labels_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/862/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/862/comments","events_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/862/events","html_url":"https://github.com/chrsmith/google-api-java-client/issues/862","id":59382783,"number":862,"title":"GoogleCredential.executeRefreshToken() fails due to wrong Payload","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-High","name":"Priority-High","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-01T06:05:04Z","updated_at":"2015-03-01T06:05:06Z","closed_at":"2015-03-01T06:05:04Z","body":"```\nVersion of google-api-java-client (e.g. 1.15.0-rc)?\n1.17.0\n\nJava environment (e.g. Java 6, Android 2.3, App Engine)?\nApp Engine\n\nDescribe the problem.\nWhen using service accounts the client library fails once the access token \nexpires with the following exception:\ncom.google.api.client.auth.oauth2.TokenResponseException: 403 OK\n<!DOCTYPE html><html lang=en><meta charset=utf-8><meta name=viewport \ncontent=\"initial-scale=1, minimum-scale=1, width=device-width\"><title>Error 403 \n(Forbidden)!!1</title><style>*{margin:0;padding:0}html,code{font:15px/22px \narial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% \nauto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > \nbody{background:url(//www.google.com/images/errors/robot.png) 100% 5px \nno-repeat;padding-right:205px}p{margin:11px 0 \n22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media \nscreen and \n(max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right\n:0}}#logo{background:url(//www.google.com/images/errors/logo_sm_2.png) \nno-repeat}@media only screen and \n(min-resolution:192dpi){#logo{background:url(//www.google.com/images/errors/logo\n_sm_2_hr.png) no-repeat 0% 0%/100% \n100%;-moz-border-image:url(//www.google.com/images/errors/logo_sm_2_hr.png) \n0}}@media only screen and \n(-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/\nerrors/logo_sm_2_hr.png) no-repeat;-webkit-background-size:100% \n100%}}#logo{display:inline-block;height:55px;width:150px}</style><a \nhref=//www.google.com/><span id=logo \naria-label=Google></span></a><p><b>403.</b> <ins>That’s an \nerror.</ins><p>We're sorry, but you do not have access to this page. \n<ins>That’s all we know.</ins>\n\tat com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105)\n\tat com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)\n\tat com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)\n\tat com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:269)\n\tat com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)\n\tat com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:217)\n\tat com.google.api.client.http.HttpRequest.execute(HttpRequest.java:859)\n\nWhen digging into the source code it turns out that the JsonWebToken.Payload is \nusing the\n    @Key(\"sub\")\n    private String subject;\nmethod but service account spefication expects \"prn\" instead.\n```\n\nOriginal issue reported on code.google.com by `daniel.florey@gmail.com` on 25 Mar 2014 at 11:58"},"comment":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/comments/76578125","html_url":"https://github.com/chrsmith/google-api-java-client/issues/862#issuecomment-76578125","issue_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/862","id":76578125,"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},"created_at":"2015-03-01T06:05:06Z","updated_at":"2015-03-01T06:05:06Z","body":"```\nIf you have too many instances that sends out \"refresh_token\" requests for the \nsame access token simultaneously, you will hit the \"rate limit\" at the endpoint \nand therefore get a 403 error.\n\nBy the way, were you using GData APIs or any of the new APIs listed on \nhttps://developers.google.com/api-client-library/java/apis/ ?\n```\n\nOriginal comment by `wonder...@google.com` on 25 Mar 2014 at 6:33"}}