Error authenticating application using link

I get the following error while trying to authenticate using LinkedIn. "Invalid redirect URI"

The link is valid and registered in my application inside the developer linked to the site.

What can cause this error?

  var auth = new OAuth2Authenticator
  (
     clientId: "MYID",
     scope: "r_basicprofile",
     authorizeUrl: new Uri("https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=MYID&redirect_uri=https://wicareerpathways.org/&state=987654321&scope=r_basicprofile"),              
     redirectUrl: new Uri("https://wicareerpathways.org/")
  );
+4
source share
2 answers

Try the following:

var auth = new OAuth2Authenticator (
                clientId: "**",
                clientSecret:"**",
                scope: "r_fullprofile r_contactinfo",
                authorizeUrl: new Uri ("https://www.linkedin.com/uas/oauth2/authorization"),
                redirectUrl: new Uri ("http://www.***.co.nz/"),
                accessTokenUrl:new Uri("https://www.linkedin.com/uas/oauth2/accessToken")    
            );

See https://forums.xamarin.com/discussion/comment/49244/#Comment_49244

+1
source

Try to encode the redirect_url parameter url in authorizeUrl ->

https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=MYID&redirect_uri=https%3A%2F%2Fwicareerpathways.org%2F&state=987654321&scope=r_basicprofile
0
source

Source: https://habr.com/ru/post/1619976/


All Articles