生成访问令牌
开发中
POST
/passport/api/v2/token
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Query 参数
grant_type
string
可选
示例值:
password
Header 参数
Authorization
string
可选
示例值:
Bearer {{user_access_token}}
x-auth-clientid
string
可选
Body 参数application/json
scope
string
必需
state
string
必需
username
string
账号
password
string
密码
示例
{
"scope": "test",
"state": "",
"mobileAreaCode": "86",
"username": "18818888880",
"password": "a481b294470e14e4f1b87666ee09aa58d9096dc8168728be7d37a6eb17b7f6db"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/passport/api/v2/token?grant_type=password' \
--header 'Authorization: Bearer {{user_access_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"scope": "test",
"state": "",
"mobileAreaCode": "86",
"username": "18818888880",
"password": "a481b294470e14e4f1b87666ee09aa58d9096dc8168728be7d37a6eb17b7f6db"
}'
返回响应
🟢201成功
application/json
Body
object {0}
示例
{}