2014-10-04 115 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>