2
votes

I'm trying to authorize my iPhone app using the linkedin api but I keep getting errors in the authorization phase. I copied the URL from the app and tried to see how it act on my browser (chrome) and I get an error over there too. The URL is: https://www.linkedin.com/uas/oauth2/authorization?response_type=code%20&client_id=/myClientId/%20&scope=r_fullprofile%20r_emailaddress%20&state=/stateString/&redirect_uri=http%3A%2F%2Fwww%2Egoogle%2Ecom

in my browser I get to the main page of linked in with the following error in a red bar on top: There was an unexpected problem that prevented us from completing your request.

Can anyone tell me what I'm doing wrong?

Thanks

2

2 Answers

1
votes

You have some extra spaces(see bold) in your url string:

Your string: https://www.linkedin.com/uas/oauth2/authorization?response_type=code%20&client_id=/myClientId/%20&scope=r_fullprofile%20r_emailaddress%20&state=/stateString/&redirect_uri=http%3A%2F%2Fwww%2Egoogle%2Ecom

Try using: https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=/myClientId/&scope=r_fullprofile%20r_emailaddress%20&state=/stateString/&redirect_uri=http%3A%2F%2Fwww%2Egoogle%2Ecom

0
votes

This error may be due to scope=r_fullprofile. LinkedIn does not give full access to app by default. Reference.

I am using helloJs in here and I have used r_basicprofile, this works for me.