2014-10-04 117 views
3

如果我有访问令牌,如何进行身份验证请求?如何使用访问令牌进行OAuth请求linkedin

我遵循这个帖子: https://developer.linkedin.com/documents/authentication

,并通过访问令牌是这样的:

https://api.linkedin.com/v1/people/~?oauth2_access_token=一些象征性的

我总是收到错误:

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

有人可以给我一些建议?我在OAuth中很新。

回答

0

访问令牌不应该在查询字符串中发送。它应该包含在authorization字段的标题中。

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