授权获得以下错误后,调用轮廓API时获得非法访问令牌错误通过omniauth,LinkedIn
{
errorCode: 0
message: "Invalid access token."
requestId: "7PQ0XX5WYL"
status: 401
timestamp: 1418976605501
}
当授权用户,并通过https://github.com/skorks/omniauth-linkedin
我的查询获得的access_token后查询看起来像
GET https://api.linkedin.com/v1/people/~?oauth2_access_token=8d8bb5ad-XXX-9026cde508b6-XXX
同样在https://developer.linkedin.com/documents/authentication步骤4中提到的在标头中传递令牌。进行身份验证追求
为
GET https://api.linkedin.com/v1/people/~
Connection: Keep-Alive
Authorization: Bearer 8d8bb5ad-XXX-9026cde508b6-XXX
Host: api.linkedin.com
x-li-format: json
我的响应头看起来像
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
我还提到在LinkedIn上的开发者网站https://developer.linkedin.com/forum/invalid-access-token这个问题,但没有更新(完全螺纹)
我是doi有什么不对,有什么想法?
我也遇到同样的错误,你有没有找到任何修复? – Dibish 2015-02-24 11:40:01
@Dibish我使用OAuth 1.0进行认证流程,当我通过https://github.com/decioferreira/omniauth-linkedin-oauth2 gem通过OAuth 2.0认证用户时,当我使用新的令牌错误得到解决时,我得到新的令牌。 – 2015-02-25 13:29:56