-2

When I try to generate access token using:

https://www.linkedin.com/uas/oauth2/accessToken?grant_type=authorization_code&code=xxxxxxxxxxx&redirect_uri=http%3A%2F%2Fws-100945%3A9080%2FArtisWeb%2Findex.html&client_id=xxxxx&client_secret=xxxxx

it's throwing error as:

{"error_description":"missing required parameters, includes an invalid parameter value, parameter more than once. : Unable to retrieve access token : appId or redirect uri does not match authorization code or authorization code expired","error":"invalid_request"}.

Could you guide me on this issue?

1

1 Answer 1

0

The URL itself looks correct so it must be the code that is expired or reused. Make sure the code is used immediately after you receive it and use it only once.

Also make sure that you URL-encode in fact all parameter values, including client_id and client_secret if/since they may contain URL-unsafe characters like '&' and ' '.

Sign up to request clarification or add additional context in comments.

8 Comments

yes...i tried using immediately only..still same error
I just browse on site to get any reference.My issue is same as stackoverflow.com/questions/29804501/… ,hope this clarifies my question
updated answer with note about url-encoding of all parameter values
,we need to use code within 10secs,it has taht short lifespan
just need to confirm,i read somewhere taht access token generated is quit short ,merely 10characters-length,however,mine is a way lenghty-179characters.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.