我希望我在適當的位置發佈此信息。Linkedin認證失敗
我試圖通過教程make your first LinkedIn API call using OAuth 2.0.
http://developer.linkedin.com/documents/authentication
一個工作。生成授權碼通過重定向用戶到LinkedIn的授權對話框
https://www.linkedin.com/uas/oauth2/authorization?response_type=code
&client_id=YOUR_API_KEY
&scope=SCOPE
&state=STATE
&redirect_uri=YOUR_REDIRECT_URI
填寫了這一點:
https://www.linkedin.com/uas/oauth2/authorization?response_type=code
&client_id=123456789
&scope=r_basicprofile%r_network%
&state=abcdefghi
&redirect_uri=http://www.socialinnovationlab.net
賦予的
https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=123456789&scope=r_basicprofile%r_network%&state=abcdefghi&redirect_uri=http://www.socialinnovationlab.net
URI並由此給LinkedIn身份驗證形式,因爲它應該。
b。請求訪問令牌由它
https://www.linkedin.com/uas/oauth2/accessToken?grant_type=authorization_code
&code=AUTHORIZATION_CODE ****I think this is the above uri?******
&redirect_uri=YOUR_REDIRECT_URI
&client_id=YOUR_API_KEY
&client_secret=YOUR_SECRET_KEY
交換authorization_code我:
https://www.linkedin.com/uas/oauth2/accessToken?grant_type=authorization_code
&code=https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=123456789&scope=r_basicprofile%r_network%&state=abcdefghi&redirect_uri=http://www.socialinnovationlab.net
&redirect_uri=http://www.socialinnovationlab.net
&client_id=123456789
&client_secret=1212121212
其中givies的URI:當我嘗試去這個地址我得到的
https://www.linkedin.com/uas/oauth2/accessToken?grant_type=authorization_code&code=https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=123456789&scope=r_basicprofile%r_network%&state=abcdefghi&redirect_uri=http://www.socialinnovationlab.net&redirect_uri=http://www.socialinnovationlab.net&client_id=123456789&client_secret=1212121212
錯誤:
{"error":"invalid_request","error_description":"missing required parameters, includes an invalid parameter value, parameter more then once. : client_id"}
任何想法,我哪裏出錯了?
謝謝
蒂姆你知道嗎?我和你有同樣的錯誤。我可以使用curl成功獲取訪問令牌,但不能使用Python。總是得到400。 – user1387717