LinkedIn: Invalid redirect URI error - oauth-2.0

I have created a sample call for LinkedIn authorization as follows:
https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=xxxxxxxx&client_secret=xxxxxxxx&redirect_uri=http://ws-100945:9080/ArtisWeb/index.html&state=9867998869&scope=r_basicprofile
but it is throwing an "Invalid redirect URI" error, I have double-checked the redirect_uri, it is correct one. Can anyone provide guidance?

There are 3 things to check:
the redirect_uri value should be url-encoded
double-check the URL also wrt. "http" vs."https" and port number
make sure you use the right client_id

Related

Invalid redirect URI for Deezer oAuth

Every attempt I make to authenticate at Deezer is answered with the error message:
You must enter a valid redirect URI
The redirect URI set in my application settings is https://example.com/callback/deezer and the request I make looks something like:
https://connect.deezer.com/oauth/auth.php?app_id=xxxxxx&redirect_uri=https%3A%2F%2Fexample.com%2Fcallback%2Fdeezer&scope=basic_access%2Cemail&state=xxxxxx&response_type=code
The app_id value is correct. Any help?
you must set the "Application domain" as the url which the login script in connection from.
for example, if you're working on your localhost on this url: http://localhost:3000/index.html
just put the value localhost/index.html, without the port.

Dailymotion Callback URL Error

I am trying to connect to the Data-API by using the PHP-SDK.
I have configured an API-Key. But when trying to connect an exception is thrown. Message:
This redirect_uri' isn't allowed byclient_id' configuration.
I suppose that somehow the callback URL is not correct.
Any help is appreciated.
Regarding the redirect_uri, if is stated at https://github.com/dailymotion/dailymotion-sdk-php/blob/master/Dailymotion.php#L196 that:
"if using authorization grant type, this key can be provided. If omitted, the current URL will be used. Make sure this value stays the same before the user is redirect to the authorization page and after the authorization page redirects to this URI (the token server will change this)."
You should also make sure that this value matches the "callback url" you defined when creating the api key at http://www.dailymotion.com/settings/developer . It not matching, it will trigger the error you mentioned.

Google auth redirect_uri no longer authorized even when the same uri is placed in settings

I'm getting a redirect uri error for google authentication even when I've already placed the EXACT url in the google dev console config settings. Anybody know what could trigger such an error?
Below are screenshots of the error. I have the exact uri authorized in the settings yet trying to authenticate leads to a redirect_uri error!
I just figured this out. If you're ever as dumb as me and your google app has multiple client IDs you could be using a different client ID for authorization then the one you're setting your redirect uri to. When you're changing the redirect uri, check to see if you have another client_id and set the redirect_uri for that.

Bug: SoundCloud OAuth2 connection will fail if Redirect URI includes "&" character

I'm getting an error while connecting to Sound API trought OAuth2.
This is the connection link I use:
https://soundcloud.com/connect?client_id=27e07408838149bc81b98928b76468f9&redirect_uri=http%3A%2F%2Fbeta.mydomain.com%2Fapd%2F%3Fmodule%3Dsoundcloud%26action%3Dreturn&response_type=code&consumer_key=28e07409898149a981b98928b76468f9
By clicking it I get redirected to:
http://beta.mydomain.com/apd/?module=soundcloud&action=return&error=redirect_uri_mismatch&error_description=The+redirection+URI+provided+does+not+match+a+pre-registered+value.
But the specified redirect_uri param (encoded) and the registered url (in the field Redirect URI) are exactly the same:
http://beta.mydomain.com/apd/?module=soundcloud&action=return
I don't know if there is anything wrong or there is any other restriction that returns the same error. Or maybe "Redirect URI" is not the applicable field. This should be enough.
(App name is bigpress)
(Domain and consumer_key have been altered for security reasons)
UPDATE: Ok, I think I got it. After having done a dozen of checks... if redirect_uri includes the "&" character SoundCloud will always return this error.

while authenticating with foursquare, it returns 'invalid_request'

It is clear to me that this error is because of the wrong redirect_uri I have used. But what should I use for redirect_uri ? I just created an application in FourSquare, and I got the consumer token and consumer secret. I filled in a URL in the callback URL field. Now when I pick up this URL and set it as my redirect_uri, it is still invalid.
Can tell me how exactly should this be used? I found out that with OAuth2.0, you need to register the redirect_uri for safety of the user. Now how do I do that registration?
Your callback URL is the "redirect_uri". Make sure you've URI-encoded the parameter and that you haven't changed the url scheme by mistake (http vs https)

Resources