ข้ามไปยังเนื้อหา

API อุปกรณ์ทดสอบ

createTestDevice

Anchor link to

ลงทะเบียนอุปกรณ์ทดสอบสำหรับแอปพลิเคชัน

POST https://api.pushwoosh.com/json/1.3/createTestDevice

Request Body

Anchor link to
ชื่อประเภทคำอธิบาย
application*stringโค้ดแอปพลิเคชัน Pushwoosh
push_token*stringPush token ของอุปกรณ์
device_type*integerประเภทอุปกรณ์ ดูค่าที่เป็นไปได้ในเมธอด /registerDevice
name*stringชื่ออุปกรณ์ทดสอบ
descriptionstringคำอธิบายอุปกรณ์ทดสอบ
{
"status_code": 200,
"status_message": "OK",
"response": null
}
ตัวอย่าง
{
"request": {
"application": "XXXXX-XXXXX", // จำเป็น โค้ดแอปพลิเคชัน Pushwoosh
"push_token": "DEVICE_PUSH_TOKEN", // จำเป็น
"device_type": 1, // จำเป็น อ้างอิงประเภทอุปกรณ์จาก /registerDevice
"name": "TEST_DEVICE_1", // จำเป็น ชื่ออุปกรณ์ทดสอบ
"description": "android test device" // ไม่จำเป็น คำอธิบายอุปกรณ์ทดสอบ
}
}

listTestDevices

Anchor link to

ส่งคืนอุปกรณ์ทดสอบทั้งหมดสำหรับแอปพลิเคชันที่ระบุ

POST https://api.pushwoosh.com/json/1.3/listTestDevices

Request Body

Anchor link to
ชื่อประเภทคำอธิบาย
auth*stringโทเค็นการเข้าถึง API จาก Pushwoosh Control Panel
application*stringโค้ดแอปพลิเคชัน Pushwoosh
{
"status_code": 200,
"status_message": "OK",
"response": {
"TestDevices": [{
"name": "iosDevice",
"type": "1",
"pushtoken": "token",
"description": "ios device"
}]
}
}
ตัวอย่าง
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // จำเป็น โทเค็นการเข้าถึง API จาก Pushwoosh Control Panel
"application": "XXXXX-XXXXX" // จำเป็น โค้ดแอปพลิเคชัน Pushwoosh
}
}

สำหรับประเภทอุปกรณ์ ดูได้ที่ /registerDevice