DingraiaPHP开发者
开发者上一步得到的上一步得到的获取token
使用钉钉OAuth2登录
快速登录页面
获取登录请求代码
GET
https://api.lxyddice.top/dingbot/php/?action=api&type=xyAppGetState
Response
{
"success": true,
"code": 0,
"message": "API调用成功了喵~",
"result": {
"state": "5c5a3ff9-52bd-c49b-b05f-1bca6273fcd0",
"timeStamp": 1714488342
},
"request_id": "1714488342_ae67ae84-b6ad-a09a-a6cb-336f1d1fc32f"
}
清除登录请求代码
GET
https://api.lxyddice.top/dingbot/php/?action=api&type=xyAppClearIpState
Response
{
"success": true,
"code": 0,
"message": "API调用成功了喵~",
"result": {
"state": "5c5a3ff9-52bd-c49b-b05f-1bca6273fcd0",
"createAt": 1714488342,
"timeStampe": 1714491351
},
"request_id": "1714491351_a327e328-3b48-ee06-800f-f64142fdd00a"
}
获取钉钉登录的跳转地址
GET
https://api.lxyddice.top/dingbot/php/?action=api&type=xyAppLoginWithDingtalkOAuth2
Params
Name
Type
Description
state
string
得到的登录请求代码
Response
{
"success": true,
"code": 0,
"message": "API调用成功了喵~",
"result": {
"state": "a95bb8c2-b084-869c-d76f-52ba5da21309",
"createAt": 1723393731,
"timeStampe": 1723393732,
"urlId": "ANVpQjLH"
},
"request_id": "1723393732_46e5bcdd-908c-e23c-298f-04bbf8e25a2d",
"apiPath": "xyAppLoginWithDingtalkOAuth2"
}
获取钉钉登录的跳转地址
GET
https://api.lxyddice.top/dingbot/php/?action=api&type=getShortUrlInfo
Params
Name
Type
Description
id
string
urlId 短链接代码
Response
{
"success": true,
"code": 0,
"message": "API调用成功了喵~",
"result": {
"url": "http://api.lxyddice.top/dingbot/php/?client_id=xxxxx"
},
"request_id": "1723393746_5a1e2650-b635-7272-5983-d60f2292c8ae",
"apiPath": "getShortUrlInfo"
}
完成登录
{
"success": true,
"code": 0,
"message": "API调用成功了喵~",
"result": {
"token": "abcdefghijklmnopqrstuvwxyz",
"expiration": 1714497275,
"unionId": "xxx"
},
"request_id": "1714490072_fe3fc718-fd61-6564-dfc2-000d309a0a59"
}
验证token可用性
GET
https://api.lxyddice.top/dingbot/php/?action=api&type=xyAppCheckToken
Params
Name
Type
Description
token
String
上面得到的token
Response
{
"success": true,
"code": 0,
"message": "API调用成功了喵~",
"result": {
"unionId": "xxx",
"expiration": 1714497275
},
"request_id": "1714490762_6d9a20b5-cc20-77e9-5117-7968b68ba80e"
}
创建APP以便获取id和密钥
GET
https://api.lxyddice.top/dingbot/php/?action=api&type=xyAppGetId
Body
Name
Type
Description
token
string
AccessToken
Response
{
"success": true,
"code": 0,
"message": "API调用成功了喵~",
"result": [
{
"appId": "xxx",
"appSecret": "xxxxxxxx"
}
],
"request_id": "1714633692_76398e1c-5f8e-7c35-9b00-c0ef41df64dd",
"apiPath": "xyAppGetId"
}
使用APPID和APPSECRET获取TOKEN
GET
https://api.lxyddice.top/dingbot/php/?action=api&type=xyAppGetAccessToken
Params
Name
Type
Description
appId
string
appId
appSecret
string
appSecret
Response
{
"success": true,
"code": 0,
"message": "API调用成功了喵~",
"result": {
"token": "xxxxxxxxxxxxxxxxxxx",
"expiration": 1714645804,
"unionId": "xxxxx"
},
"request_id": "1714638604_123f7afb-409d-55d9-4059-27a70dfc408f",
"apiPath": "xyAppGetAccessToken"
}
Last updated