San*_*tsa 7 python api access-token instagram python-requests
当我尝试接收来自Instagram.我的access_token时,请执行以下请求
params = {
'client_id' : config.INSTAGRAM_APP_ID,
'client_secret' : config.INSTAGRAM_APP_SECRET_KEY,
'grant_type' : 'authorization_code',
'redirect_uri' : '`my localhost`',
'code' : code
}
r = requests.post('https://api.instagram.com/oauth/access_token', params = params)
Run Code Online (Sandbox Code Playgroud)
并收到错误:
{"code": 400, "error_type": "OAuthException", "error_message": "You must provide a client_id"}
Run Code Online (Sandbox Code Playgroud)
我该怎么办?
我通过将这些参数放在(x-www-form-encoded)正文中而不是在标头中来解决此问题(该想法的信箱为https://github.com/request/request/issues/983#issuecomment-57005849) 。
注意:我没有使用python包装器。
| 归档时间: |
|
| 查看次数: |
3233 次 |
| 最近记录: |