Re: Y use refresh token return invalid_request
Au Lai Seong <[email protected]>
| Newsgroups | gmane.comp.web.blogger.api |
|---|---|
| Message-ID | <[email protected]> |
it seem sooooo hard to get help in here!!!
On Sunday, 3 November 2013 00:21:47 UTC+8, Jimmy Stock wrote:
>
> tokenResponse.setExpiresInSeconds(10l); //purposely it expired to try
> using the refresh token.
>
> return new
> Credential.Builder(BearerToken.authorizationHeaderAccessMethod()).setTransport(
> transport)
> .setJsonFactory(jsonFactory)
> .setTokenServerUrl(
> new GenericUrl("https://accounts.google.com/o/oauth2/token"))
> .setClientAuthentication(new BasicAuthentication("[email protected]<javascript:>",
> "qwewewewqeq"))
> .build()
> .setFromTokenResponse(tokenResponse);
>
> ......................
>
> Post post2 = insert.execute();//cause following error
>
> Exception in thread "main"
> com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request
> {
> "error" : "invalid_request"
> }
> at
> com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105)
> at
> com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
>
--
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/bloggerdev.
For more options, visit https://groups.google.com/groups/opt_out.