getting a profile using id doesn't appear to work... #59

angelacode opened this Issue Jul 2, 2011 · 7 comments


None yet
4 participants

I use the following:

client.profile(:id => linkedin_uid)

I get this error:

LinkedIn::NotFound: (404): Not Found

Any thoughts on why Ii would be getting a 404 error when looking up based on another ID?


ryanatwork commented Sep 4, 2011

This works for me, maybe the latest version of the gem fixes the issue?

You can only display the profile from an ID for people in your LinkedIn Network


john commented Nov 6, 2011

This fails for me too, using the latest version of the gem. I can't get my own profile when authed as myself, so it doesn't appear to be a network issue. I can get profiles fine by :url.

Here's the top of the stack trace in the console:

ruby-1.9.3-rc1 :011 > pro = client.profile( :id => "r3TugUrYus" )
LinkedIn::Errors::NotFoundError: (404): Not Found
from /Users/john/.rvm/gems/ruby-1.9.3-rc1@rails31/bundler/gems/linkedin-2e35630343ae/lib/linked_in/helpers/request.rb:51:in raise_errors' from /Users/john/.rvm/gems/ruby-1.9.3-rc1@rails31/bundler/gems/linkedin-2e35630343ae/lib/linked_in/helpers/request.rb:16:inget'
from /Users/john/.rvm/gems/ruby-1.9.3-rc1@rails31/bundler/gems/linkedin-2e35630343ae/lib/linked_in/api/query_methods.rb:37:in simple_query' from /Users/john/.rvm/gems/ruby-1.9.3-rc1@rails31/bundler/gems/linkedin-2e35630343ae/lib/linked_in/api/query_methods.rb:8:inprofile'
from (irb):11
from /Users/john/.rvm/gems/ruby-1.9.3-rc1@rails31/gems/railties-3.1.1/lib/rails/commands/console.rb:45:in `start'


ryanatwork commented Nov 6, 2011

I can't replicate this issue - make sure you are using the correct LinkedIn profile id. If I use that ID In the example above I get a 404 also, that may not be the correct LinkedIn ID. The ID is not part of the default profile fields, however you can get it if you add it to the default profile fields.

[11] pry(main)> client.profile(:id=>"lkUnrbyLgY")
=> {"first_name"=>"Ryan",
"headline"=>"Fellow at Code for America",


john commented Nov 6, 2011

Thanks much for responding. You're right--I was using the 'uid' value I get back from omniauth, which I presumed to be the member id. But when I use your gem to get my own info via public URL ( client.profile(:url => "") ), I get back a different id value, which does work.

Bit off topic and unrelated to my (non) issue, but if anyone knows how to get the Linkedin member id from an omniauth Linkedin uid, I'd be very, very grateful.


ryanatwork commented Nov 6, 2011

I'm actually using the uid in this rails app, even though I wrote it to implement the LinkedIn ID maybe it will help -


john commented Nov 9, 2011

Thanks, that was helpful.

hexgnu closed this Apr 27, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment