2
votes

I am using linkedin api with oauth library. my request url for authorization is https://www.linkedin.com/uas/oauth2/authorization/?client_id=75gq3kju41jx44&redirect_uri=https%3A%2F%2Flocalhost%2FSocial%2Flinkedin%2Fsettings&scope=r_basicprofile%2Cw_share&response_type=code&state=1436579926-c05e44

But it is giving me error of page not found where it is showing me invalid client id.please let me know where I am going wrong.I am working on localhost.

2

2 Answers

3
votes

For getting rid of the page not found, remove '/' before '?'

https://www.linkedin.com/uas/oauth2/authorization?client_id=75gq3kju41jx44&redirect_uri=https%3A%2F%2Flocalhost%2FSocial%2Flinkedin%2Fsettings&scope=r_basicprofile%2Cw_share&response_type=code&state=1436579926-c05e44
1
votes

LinkedIn's OAuth 2.0 authorization endpoint is:

https://www.linkedin.com/uas/oauth2/authorization # <-- no '/' at the end

There is no trailing slash in it. You should remove the trailing slash from your request url and it should work.

Final request url:

https://www.linkedin.com/uas/oauth2/authorization?client_id=75gq3kju41jx44&redirect_uri=https%3A%2F%2Flocalhost%2FSocial%2Flinkedin%2Fsettings&scope=r_basicprofile%2Cw_share&response_type=code&state=1436579926-c05e44