I'm trying to create a script to read some information from the LinkedIn API. I'm using the PECL OAuth extension.
I've managed to get my request token, and auth, then it returns me to my script. However I cannot seem to get it to not be the "out-of-band" authentication with the pin number.
I've set the callback as per the docs, https://developer.linkedin.com/documents/linkedins-oauth-details
If the "OAuth Callback URL" is defined, this is used as the callback for your request if the oauth_callback parameter is missing. If neither is set, the "out-of-band" (aka oob) experience will happen for the user, and they will be given a PIN to input into your application to complete the authorization process.
However this doesn't seem to make any difference. I've set my call back url on the requestToken part, and it must be working or it wouldn't redirect back to my test page.
I had the same issue, seems to work when I do this:
$token = $oauth->getRequestToken($request_url, $callback_url);
where $request_url
is https://api.linkedin.com/uas/oauth/requestToken
, and $callback_url
is where you want LinkedIn to redirect you when it is done authorizing.