java – org. scribe. exceptions. Oautexception: the response body is incorrect Unable to extract token and secret from: ‘token is invalid
•
Java
OAuthService service = new ServiceBuilder()
OAuthService service = new ServiceBuilder() .provider(GoogleApi.class) .apiKey("198898816518.apps.googleusercontent.com") .apiSecret("hpvFCWHt6ZxWqO-DLwF062rO") .scope(SCOPE) .build(); Token requestToken = null; requestToken = service.getRequestToken(); System.out.println("authorize Scribe here:"); Token token = new Token("oauth_token","4/qGH3cNdzrdIIMmEsDMTRNhKD9z51"); System.out.println(AUTHORIZE_URL + requestToken.getToken()); System.out.println("paste the verifier"); Verifier verifier = new Verifier("IWqonDH9RCtK0hwyZQlYOUCb"); // Trade the Request Token and Verfier for the Access Token Token accessToken = service.getAccessToken(token,verifier);
I received an error
Thank you in advance
Solution
I believe you may be using scribe 1.3 0, because I also encountered such a mistake when doing OAuth Just replace it with the latest version and copy 1.3 1. You can It looks like 1.3 There are some problems in 0... I'm not sure if it completely violates the error reason, but it's useful to me
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码