1
votes

I have a problem when trying to get the oauth_token and oauth_token_sceret from linkedin oauth api. I can get requestToken (1st request), but in the callback page (after the user approved the app) I'm trying to get the token and the secret but I always get 401 and it says the signature is invalid. I'm posting the following values to https://api.linkedin.com/uas/oauth/accessToken: - oauth_consumer_key - oauth_nonce - oauth_signature_method - oauth_timestamp - oauth_token - oauth_verifier - oauth_version

as a side note i don't understand why I'm getting the verifier (I don't need the PIN since it's running in a browser) . The only way I was able to get the token and the secret was when I also post the "oauth_token_secret" I received in the 1st requrst (when I asked for requestToken). But I can't get this oauth_token_secret in the callback page.

I found out you need to pass in the secret token you get in the first request for requestToken (1st request) to the access token and it is working.

1
Have you successfully registered your application with linkedin? - vinay
yes , I've created the app. I don't understand why do I need the secret token when I ask for access token - Ido Shilon

1 Answers

0
votes

Once you have the first stage done and you have the request token, you should have been passed back the request token and the verifier, per:

https://developer.linkedin.com/documents/oauth-overview

Then, pass the request token back along with the verifier in the same way you did for the request token (signing the request, etc) and you should receive the access token.