申请授权码
GET/oauth2/authorize
申请授权码
History
Version | Changes |
---|---|
v3.14.117, v3.15.26 | Added in: v3.14.117, v3.15.26 |
Request
Query Parameters
client_id stringrequired
创建OAuth应用得到的Client ID
response_type stringrequired
固定值 code
redirect_uri string
创建OAuth应用时配置的Redirect URI,用户同意授权后将携带授权码重定向至该地址
scope string
逗号,分隔的Scope列表,必须是OAuth应用配置Scope的子集,默认使用创建OAuth应用时配置的Scope
state string
随机字符串,客户端使用它来维护请求和回调之间的状态,最终将原样返回
Responses
- 302
- 400
- 401
- 500
重定向至Redirect URI,并且在URL参数中添加code、state两个参数
无效的请求
- application/json
- Schema
- Example (from schema)
Schema
error string
本次请求错误信息
error_description string
本次请求错误信息详情
code integer
本次请求响应的httpStatusCode
errcode integer
本次请求响应的错误码
type string
本次请求响应的错误类型
model string
本次请求响应的错误模块
field string
本次请求响应的错误字段
reason string
本次请求响应的错误原因
{
"error": "string",
"error_description": "string",
"code": 0,
"errcode": 0,
"type": "string",
"model": "string",
"field": "string",
"reason": "string"
}
如果授权类型不对,则返回
- application/json
- Schema
- Example (from schema)
Schema
error string
本次请求错误信息
error_description string
本次请求错误信息详情
code integer
本次请求响应的httpStatusCode
errcode integer
本次请求响应的错误码
type string
本次请求响应的错误类型
model string
本次请求响应的错误模块
field string
本次请求响应的错误字段
reason string
本次请求响应的错误原因
{
"error": "string",
"error_description": "string",
"code": 0,
"errcode": 0,
"type": "string",
"model": "string",
"field": "string",
"reason": "string"
}
内部服务错误
- application/json
- Schema
- Example (from schema)
Schema
error string
本次请求错误信息
error_description string
本次请求错误信息详情
code integer
本次请求响应的httpStatusCode
errcode integer
本次请求响应的错误码
type string
本次请求响应的错误类型
model string
本次请求响应的错误模块
field string
本次请求响应的错误字段
reason string
本次请求响应的错误原因
{
"error": "string",
"error_description": "string",
"code": 0,
"errcode": 0,
"type": "string",
"model": "string",
"field": "string",
"reason": "string"
}
Loading...