hexgnu / linkedin

Ruby wrapper for the LinkedIn API
http://rdoc.info/gems/linkedin
MIT License
756 stars 407 forks source link

problems with the access token #271

Closed KevinMartins367 closed 5 years ago

KevinMartins367 commented 5 years ago

I do not know if I'm doing something wrong, but it does not hurt to know ... I am authenticating by the javascript SDK in my project and saving the tokens in the database to try to update the token by this gem. But I'm getting it as if it were an invalid token

        @client = LinkedIn::Client.new
        @client.authorize_from_access(user[oauth_token], user[anonymous_token])
        test = @client.profile

LinkedIn :: Errors :: UnauthorizedError ((401): [unauthorized].) The token used in the OAuth request is not valid consumerKey: 'MY_KEY') : Or am I running the wrong way? (yes, I'm running this before the token expires)

hexgnu commented 5 years ago

Hey @KevinMartins367.

I'm not actually sure, I haven't ever tried authenticating through the javascript SDK. I'm not actually sure it will work or not. If you figure it out let me know.

KevinMartins367 commented 5 years ago

Hello, I do not know why, but the javascript lib I used did not return a valid token for this gem, but I was able to perform authentication without problems using gem-only. @hexgnu