michaelliao / sinaweibopy

新浪微博Python SDK
http://michaelliao.github.com/sinaweibopy/
Apache License 2.0
1.27k stars 504 forks source link

weibo.APIError: APIError: 21324: #55

Open hillerliao opened 8 years ago

hillerliao commented 8 years ago

Traceback (most recent call last): File "weibo_bot.py", line 156, in check_user(1372451215) File "weibo_bot.py", line 104, in check_user token = client.request_access_token(code) File "/usr/local/lib/python2.7/dist-packages/weibo.py", line 263, in request_access_token code = code, grant_type = 'authorization_code') File "/usr/local/lib/python2.7/dist-packages/weibo.py", line 119, in _http_post return _http_call(url, _HTTP_POST, authorization, **kw) File "/usr/local/lib/python2.7/dist-packages/weibo.py", line 172, in _http_call raise APIError(r.error_code, r.get('error', ''), r.get('request', '')) weibo.APIError: APIError: 21324: invalid_client, request: /oauth2/access_token

yuening8080 commented 6 years ago

Same error. My generated url, for whatever reason, ended up as: https://api.weibo.com/oauth2/authorize?redirect_uri=https%3A//api.weibo.com/oauth2/default.html&response_type=code&client_id=3331125062

Change %3A to semidcolon resolved the issue.