I'm trying to access out-of-network profiles using the API: https://developer.linkedin.com/documents/accessing-out-network-profiles
I'm writing my code in Python.
As I understand it, I just add an extra header to my HTTPSConnection request:
normal call:
connection.request(method, relative_url, body = body, headers={'Authorization': OAuth_header})
out-of-network call:
name = x-li-auth-token # these values were extracted from the http-header I received
value = name:R8Y4
connection.request(method, relative_url, body = body, headers={'Authorization': OAuth_header, name: value})
When I do the out-of-network call, I get an error:
<error>
<status>401</status>
<timestamp>1330027911625</timestamp>
<request-id>VHUSL0J7TL</request-id>
<error-code>0</error-code>
<message>[unauthorized]. OAU:k1tofeoqr4id|2dc38f4e-73d1-4d31-9330-dd82aca89616|*01|*01:1330027911:CRc7YYYQRe2VS6woJpGX+qYVa/Q=</message>
</error>
I've been testing this on both my own profile and an actual out-of-network profile, no change in error.
From various API requests, the "value" changes slightly, and I have tried all variants:
"name:R8Y4"
"search-name:R8Y4"
"OUT_OF_NETWORK:R8Y4"
Does anyone know what I'm doing wrong? Please help! Thank you.
- Log in to post comments
Greetings Julia:
There is a limited set of fields you can request for an out of network profile. If you call for a field you can't get you may get the 401 error. Try reducing the number of fields requested and see if you get rid of the error.
Thanks
Steve