跳转到内容

交换授权码、刷新会话,或对机密客户端进行认证

POST
/v1/oauth/token
curl --request POST \
--url https://api.vimine.network/v1/oauth/token \
--header 'Content-Type: application/json' \
--data '{ "grant_type": "authorization_code", "client_id": "example", "client_secret": "example", "code": "example", "code_verifier": "example", "redirect_uri": "https://example.com", "refresh_token": "example", "scope": "example" }'

OAuth 2.1 令牌端点。grant_type=authorization_code(+ PKCE S256,来自“使用 Vimine 登录”)、refresh_token(轮换;重复使用会撤销整个会话家族)、client_credentials(机密客户端,HTTP Basic 或请求体)。错误遵循 RFC 6749。

媒体类型application/json
object
grant_type
必填
string
允许的值: authorization_code refresh_token client_credentials
client_id
string
client_secret
string
code
string
code_verifier
string
redirect_uri
string 格式: uri
refresh_token
string
scope
string

令牌响应

媒体类型application/json
object
access_token
string
token_type
string
expires_in
integer
refresh_token
string
scope
string
sub
string
示例自动生成
{
"access_token": "example",
"token_type": "example",
"expires_in": 1,
"refresh_token": "example",
"scope": "example",
"sub": "example"
}

请求无效

媒体类型application/problem+json
object
type
必填
string 格式: uri
title
必填
string
status
必填
integer
detail
string
code
必填
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
示例自动生成
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

未找到

媒体类型application/problem+json
object
type
必填
string 格式: uri
title
必填
string
status
必填
integer
detail
string
code
必填
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
示例自动生成
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

已触发速率限制

媒体类型application/problem+json
object
type
必填
string 格式: uri
title
必填
string
status
必填
integer
detail
string
code
必填
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
示例自动生成
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}

内部错误

媒体类型application/problem+json
object
type
必填
string 格式: uri
title
必填
string
status
必填
integer
detail
string
code
必填
string
request_id
string
errors
Array<object>
object
field
string
code
string
message
string
示例自动生成
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}