1.01.获取app_token
快速开始环境
快速开始环境
POST
/api/getAppToken.do
拿到app_token后通过1.02获取access_token登录,后续用该access_token作为其他业务接口的认证信息。
请求参数
Body 参数application/json
appId
string
必需
appSecret
string
必需
tenantid
string
租户id(可为空)
accountId
string
必需
language
string
语言(可为空)
示例
{
"appId": "FPY001",
"appSecret": "FPY001fpy@2023fpy",
"accountId": "1742050739649250304",
"tenantid": "1",
"language": "en"
}
示例代码
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/getAppToken.do' \
--header 'Content-Type: application/json' \
--data-raw '{
"appId": "FPY001",
"appSecret": "FPY001fpy@2023fpy",
"accountId": "1742050739649250304",
"tenantid": "1",
"language": "en"
}'
返回响应
🟢200成功
application/json
Body
data
object
返回数据
app_token
string
必需
success
boolean
必需
error_desc
string
返回描述
expire_time
number
超时截止时间
error_code
string
返回码
state
string
成功状态
示例
{
"data": {
"app_token": "e42bf075-695d-49f6-8040-7aeea3903027",
"success": true,
"error_desc": "",
"expire_time": 1708414721911,
"error_code": "0"
},
"state": "success",
"status": true
}
修改于 2024-03-05 06:10:02