Get token
POST
/oauth/tokenModified at: 1 年前
Maintainer:
Get access_token and refresh_token based on client_id and client_secret.
请求参数
Body Params application/x-www-form-urlencoded
client_id
string
required
Client ID
Example:
client_id
client_secret
string
required
Client Secret
Example:
client_secret
grant_type
string
required
Grant type, access_token/refresh_token
Example:
client_credentials
refresh_token
string
optional
Use when refreshing tokens
Example:
refresh_token
示例代码
Responses
OK(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
Data Schema
code
integer
required
Status code, 1 represents success, less than 1 represents failure
msg
string
required
message
data
object
optional
data
access_token
string
optional
access token
expires_in
integer
optional
token validity period, in seconds
token_type
string
optional
token type
scope
null
optional
oauth2 scope
refresh_token
string
optional
refresh token, used to exchange for a new access_token when the access_token expires
Example
{
"code": 0,
"msg": "string",
"data": {
"access_token": "string",
"expires_in": 0,
"token_type": "string",
"scope": null,
"refresh_token": "string"
}
}
Modified at 1 年前