While you cannot directly input a User ID or HWID into the audience selector for a one-time push message in the Control Panel, you can achieve this targeting through several methods.
Method 1: Using the API (Direct Method)
The most direct and recommended way to target specific users or devices is by using the /createMessage API endpoint. You can specify the exact User IDs or HWIDs you want to message in the request payload.
Use the users parameter to target by User ID, or the devices parameter to target by HWID. You can include up to 1000 identifiers in a single request.
Here is an example of a JSON payload for the /createMessage request:
{
"request": {
"application": "YOUR_APP_CODE",
"auth": "YOUR_API_TOKEN",
"notifications": [
{
"send_date": "now",
"content": "This is a targeted message.",
"users": [
"user_id_1",
"user_id_2"
],
"devices": [
"hwid_of_device_1",
"hwid_of_device_2"
]
}
]
}
}
Note: If you specify both users and devices in the same request, the devices parameter will be ignored.
For more details, please see our Messages API documentation.
Method 2: Using Control Panel Workarounds
If you prefer to use the Control Panel, here are a few alternative methods:
For Testing and Debugging: Add the device's HWID to your Test Devices list. This allows you to send test messages directly to that specific device from the message creation screen.
For One-Time Campaigns: You can import a list of HWIDs using the Import CSV feature. Import the HWIDs into a new or existing Tag, and then select that Tag as the audience for your push notification.
For Ongoing Targeting: Configure your application to assign the HWID or User ID as a string Tag value for each user. You can then create a segment that filters for users based on that specific Tag value.
Comments
0 comments
Please sign in to leave a comment.