会话
删除会话
DELETE /sessions
正文参数
名称
类型
描述
residential_user_hashes
数组
用于重置会话的用户哈希数组
請求範例:
curl -X DELETE https://resi-api.iproyal.com/v1/sessions \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json" \
-d '{"residential_user_hashes":["hash1","hash2","hash3"]}'<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/sessions';
$residential_user_hashes = ['hash1', 'hash2', 'hash3'];
$data = json_encode(['residential_user_hashes' => $residential_user_hashes]);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$headers = [
"Authorization: Bearer $api_token",
"Content-Type: application/json"
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>Last updated