Transferred from: http://blog.unvs.cn/archives/douban-oauth-2.0-error_code.html
The following two errors are frequently encountered in the process of starting a watercress in accordance with the OAUTH2.0 protocol:
1, Invalid_request:not_trial_user:unvs
This means: The user is not authorized to use the app;
Workaround: Before the app passes the audit, you need to add a test user in the app test user.
2. Another error is that after adding the test user, the callback user information appears: Array (3) {["MSG"]=> string "need_permission" ["Code"]=> int (+) ["Request"]= > string (+) "Get/v2/user/~me"}
This means: Need authorization, permission, but when you go to the Application Center to view API permissions, but also checked, but there is no permission, here to tell you when the application is not approved, Get/v2/user/~me this interface can not be used, can only use Get/v2/user/:name to obtain user information;
Workaround: The token obtained by the first step code, which contains the name parameter, and then call Get/v2/user/:name this interface to obtain user information.
The following is the official watercress for the API calls in the process of error code, the corresponding error description, sharing over, easy to refer to the instructions, in time to solve the problems in the development.
Error code |
Error description |
100 |
Invalid_request_scheme the wrong Request protocol |
101 |
Invalid_request_method the wrong request method |
102 |
Access_token_is_missing not found Access_token |
103 |
Invalid_access_token Access_token does not exist or has been deleted by the user |
104 |
Invalid_apikey Apikey does not exist or has been deleted |
105 |
apikey_is_blocked Apikey has been disabled |
106 |
Access_token_has_expired Access_token has expired |
107 |
Invalid_request_uri Request Address not registered |
108 |
Invalid_credencial1 user is not authorized to access this data |
109 |
Invalid_credencial2 Apikey did not apply for this permission |
110 |
Not_trial_user non-registered test users |
111 |
RATE_LIMIT_EXCEEDED1 User Access Speed limit |
112 |
RATE_LIMIT_EXCEEDED2 IP Access Speed limit |
113 |
Required_parameter_is_missing Missing parameters |
114 |
Unsupported_grant_type the wrong Grant_type |
115 |
Unsupported_response_type the wrong Response_type |
116 |
Client_secret_mismatch Client_secret mismatch |
117 |
Redirect_uri_mismatch Redirect_uri mismatch |
118 |
Invalid_authorization_code Authorization_code does not exist or has expired |
119 |
Invalid_refresh_token Refresh_token does not exist or has expired |
120 |
Username_password_mismatch user name passwords do not match |
121 |
Invalid_user user does not exist or has been deleted |
122 |
user_has_blocked user has been blocked |
123 |
Access_token_has_expired_since_password_changed Access_token expires due to user password change |
124 |
Access_token_has_not_expired Access_token not expired |
125 |
Invalid_request_scope access to the scope is not legal, developers do not pay too much attention, generally do not appear this error |
999 |
Unknown Unknown error |
HTTP status Code |
Description |
200 |
Indicates that the API request is normal |
400 |
Indicates an error occurred in the API request, for specific reasons refer to the error code listed above |
oauth2.0_ Watercress Login _api Error return code description list [GO]