Authentication
Developing
POST
co/v1/oauth2/token
Request
Body Params application/json
client_id
string
required
client_secret
string
required
Example
{
"client_secret": "mollit",
"client_id": "54"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://test-cn.your-api-server.comco/v1/oauth2/token' \
--header 'Content-Type: application/json' \
--data-raw '{
"client_secret": "mollit",
"client_id": "54"
}'
Responses
🟢200response
application/json
Body
code
enum<integer> <int32>
required
Allowed values:
200401
Default:
200
Example:
200
message
string
required
data
object
required
access_token
string
required
expires_in
integer
required
token_type
string
required
Example
{
"code": 200,
"message": "string",
"data": {
"access_token": "string",
"expires_in": 0,
"token_type": "string"
}
}
Modified at 2023-05-11 06:58:21