0
我调用这个方法:com.google.api.client.auth.oauth2.TokenResponseException:400错误的请求
GoogleTokenResponse accessResposnse = new GoogleAuthorizationCodeTokenRequest(httpTransport, jsonFactory,
clientId, clientSecret, authorizationUrl, redirectUrl).execute();
其中authorizationUrl是:
String authorizationUrl = new GoogleAuthorizationCodeRequestUrl(clientId, redirectUrl, scope).setAccessType("offline").setState("security_token").setResponseTypes(responseType).build();
但它给我的错误:
com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request { "error" : "invalid_grant" }
我错过了之间的任何一步? 另外,如果我想调用这个函数:
AuthorizationCodeResponseUrl authoUrl = new AuthorizationCodeResponseUrl(redirectUrl);
它抛出java.lang.IllegalArgumentException