1.02获取access_token
快速开始环境
快速开始环境
POST
/api/login.do
请求参数
Body 参数application/json
user
string
登录用户(必填)
apptoken
string
必需
tenantid
string
租户id(可为空)
accountId
string
必需
usertype
enum<string>
可选
枚举值:
UserNameMobile
默认值:
UserName
示例
{
"user": "15815530006",
"apptoken": "e42bf075-695d-49f6-8040-7aeea3903027",
"accountId": "1742050739649250304"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://cosmic-sandbox.piaozone.com/jdpjykjyxgs/api/login.do' \
--header 'Content-Type: application/json' \
--data-raw '{
"user": "15815530006",
"apptoken": "e42bf075-695d-49f6-8040-7aeea3903027",
"accountId": "1742050739649250304"
}'
返回响应
🟢200成功
application/json
Body
data
object
返回数据
access_token
string
必需
success
boolean
必需
error_desc
string
必需
expire_time
number
必需
error_code
string
必需
state
string
必需
示例
{
"data": {
"access_token": "1742050739649250304_MBB21m4dd2w8RGbv7o1Mkypn7yBd1lBnN3ghr9ybEBJQAI3IVJRhWc9XTFrNOrN7BUghq4j4knv6b19zSW9uNK851RRvQima7x52",
"success": true,
"error_desc": "",
"expire_time": 1708414785680,
"error_code": "0"
},
"state": "success",
"status": true
}
修改于 2024-06-14 03:46:24