API อุปกรณ์ทดสอบ
createTestDevice
Anchor link toลงทะเบียนอุปกรณ์ทดสอบสำหรับแอปพลิเคชัน
POST
https://api.pushwoosh.com/json/1.3/createTestDevice
Request Body
Anchor link toชื่อ | ประเภท | คำอธิบาย |
---|---|---|
application* | string | โค้ดแอปพลิเคชัน Pushwoosh |
push_token* | string | Push token ของอุปกรณ์ |
device_type* | integer | ประเภทอุปกรณ์ ดูค่าที่เป็นไปได้ในเมธอด /registerDevice |
name* | string | ชื่ออุปกรณ์ทดสอบ |
description | string | คำอธิบายอุปกรณ์ทดสอบ |
{ "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