3
votes

How I can make authenticated request if I have access token?

I follow this post: https://developer.linkedin.com/documents/authentication

and pass access token like this:

https://api.linkedin.com/v1/people/~?oauth2_access_token= some token

I always receive error:

  <error>
     <status>401</status>
     <timestamp>1412404356540</timestamp>
     <request-id>01GPXMMPI4</request-id><error-code>0</error-code>
     <message>Invalid access token.</message>
  </error>

Can somebody give me some advice? I am very new in OAuth.

1

1 Answers

0
votes

Access token should not be sent in the query string. It should be included in the header in the authorization field.

GET /v1/people/~ 
...
Authorization: Bearer <access_token>