question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception in thread "main" com.github.scribejava.core.model.OAuth2AccessTokenErrorResponse: {"error":"invalid_redirect_uri","error_description":"Unable to retrieve access token: appid/redirect uri/code verifier does not match authorization code. Or authorization code expired. Or external member binding exists"}

See original GitHub issue

Hi kullfar,

I just tried LinkedIn20Example on my machine and I got this error 😦

`=== LinkedIn’s OAuth Workflow ===

Fetching the Authorization URL… Got the Authorization URL! Now go and authorize ScribeJava here: https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=78as3jzx478svw&redirect_uri=http%3A%2F%2Fexample.com%2Fcallback&scope=r_basicprofile r_emailaddress&state=some_params And paste the authorization code here

https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=78as3jzx478svw&redirect_uri=http%3A%2F%2Fexample.com%2Fcallback&scope=r_basicprofile r_emailaddress&state=some_params

Trading the Request Token for an Access Token… Exception in thread “main” com.github.scribejava.core.model.OAuth2AccessTokenErrorResponse: {“error”:“invalid_redirect_uri”,“error_description”:“Unable to retrieve access token: appid/redirect uri/code verifier does not match authorization code. Or authorization code expired. Or external member binding exists”} at com.github.scribejava.core.extractors.OAuth2AccessTokenJsonExtractor.generateError(OAuth2AccessTokenJsonExtractor.java:75) at com.github.scribejava.core.extractors.OAuth2AccessTokenJsonExtractor.extract(OAuth2AccessTokenJsonExtractor.java:46) at com.github.scribejava.core.extractors.OAuth2AccessTokenJsonExtractor.extract(OAuth2AccessTokenJsonExtractor.java:16) at com.github.scribejava.core.oauth.OAuth20Service.sendAccessTokenRequestSync(OAuth20Service.java:62) at com.github.scribejava.core.oauth.OAuth20Service.getAccessToken(OAuth20Service.java:98) at com.github.scribejava.core.oauth.OAuth20Service.getAccessToken(OAuth20Service.java:91) at com.sinay.Main.main(Main.java:103)`

Can you help me with this issue please ? Thank you 😃

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kullfarcommented, May 7, 2018

note &state=some_params in code you mentioned.

0reactions
vayouvacommented, May 7, 2018

Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to retrieve access token : appId or redirect uri does not ...
Unable to retrieve access token : appId or redirect uri does not match authorization code or authorization code expired #31.
Read more >
scribejava/OAuth20Service.java at master - GitHub
Simple OAuth library for Java. Contribute to scribejava/scribejava development by creating an account on GitHub.
Read more >
scribejava/OAuth2AccessToken.java at master - GitHub
* Represents an OAuth 2 Access token. * http://tools.ietf.org/html/rfc6749#section-5.1. *.
Read more >
Authorization OAuth 2.0: Request Authorization Code not ...
I should be able to request an Authorization Code token by pressing the Request Token button on the "Get New Access Token" window....
Read more >
scribejava/StackExchangeExample.java at master - GitHub
Simple OAuth library for Java. Contribute to scribejava/scribejava development by creating an account on GitHub.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found