WeLink服务端API身份验证应用管理后台免登
【摘要】 OAuth2.0错误响应简介WeLink后台OAuth2.0在接受验证授权请求时,授权服务器会按照OAuth2.0协议对本次请求参数进行检验,若请求不合法或验证未通过,授权服务器会返回相应的错误信息,包含以下几个参数:code:错误码message:错误描述返回格式错误信息会以两种形式被返回:一种是在请求授权 https://login.welink.huaweicloud.com/sso/...
OAuth2.0错误响应
简介
WeLink后台OAuth2.0在接受验证授权请求时,授权服务器会按照OAuth2.0协议对本次请求参数进行检验,若请求不合法或验证未通过,授权服务器会返回相应的错误信息,包含以下几个参数:
code:错误码
message:错误描述
返回格式
错误信息会以两种形式被返回:
一种是在请求授权 https://login.welink.huaweicloud.com/sso/oauth2/authorize 时返回,返回方式是跳转到“redirect_uri”参数对应的URI上。
一种是在请求接口时 https://open.welink.huaweicloud.com/api/oauth2/v1/token 时返回,返回方式是返回一段JSON文本。
HTTP/1.1 400 Bad Request Content-Type: application/json Cache-Control: no-store { "code": "60008", "message": "code is invalid"}
错误码定义
WeLink OAuth2.0服务的错误码定义如下表所示:
错误码 | 描述 |
---|---|
60001 | success |
60002 | invalid_request: the length of code exceed 2000 |
60003 | invalid_request: code is empty |
60004 | invalid_request: the length of client_id exceed 255 |
60005 | invalid_request: the length of client_secret exceed 255 |
60006 | invalid_request: the length of state exceed 255 |
60007 | code has expired |
60008 | code is invalid |
60009 | Your account has been locked. Try again in 15 minutes! |
60010 | client_id and client_secret auth failed |
60011 | system is busy, please try again later |
60012 | temporaily_unavailable: please try again later |
60013 | invalid_request: grant_type param error |
60018 | The homePageUrl is invalid |
60019 | The redirectUrl is invalid |
60020 | The params of appName, homePageUrl, redirectUrl cannot be empty |
60021 | App name has been registered |
60022 | create client failed, please try again later |
60023 | register failed, please check input params |
60024 | register failed, please try again later |
41500 | 获取用户信息异常 |
【版权声明】本文为华为云社区用户原创内容,未经允许不得转载,如需转载请自行联系原作者进行授权。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)