Getting Following error when calling profile API
{
errorCode: 0
message: "Invalid access token."
requestId: "7PQ0XX5WYL"
status: 401
timestamp: 1418976605501
}
When queried after authorizing user and obtaining access_token via https://github.com/skorks/omniauth-linkedin
My query looks like
GET https://api.linkedin.com/v1/people/~?oauth2_access_token=8d8bb5ad-XXX-9026cde508b6-XXX
Also Tried with passing token in header as mentioned at https://developer.linkedin.com/documents/authentication, Step 4. Make an authenticated request
as
GET https://api.linkedin.com/v1/people/~
Connection: Keep-Alive
Authorization: Bearer 8d8bb5ad-XXX-9026cde508b6-XXX
Host: api.linkedin.com
x-li-format: json
My Response header looks like
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36
Authorization: Bearer 8d8bb5ad-XXX-9026cde508b6-XXX
x-li-format: json
Accept: */*
Accept-Encoding: gzip,deflate
I also referred this issue on linkedin developers site https://developer.linkedin.com/forum/invalid-access-token, but no updates (incomplete thread)
Am I doing something wrong, Any thoughts?