Yes — parameter names in the Pushwoosh API are case-sensitive and must be lowercase. Devices is not the same as devices.
Why a typo here is dangerous
A mis-cased key is not rejected, it is simply not recognised. If no valid targeting parameter (devices, users, to, filter or conditions) remains in the request, the message is sent to every device subscribed in the application. During testing this looks like it worked, while in fact you broadcast to your whole audience.
What "Unknown Devices" means
The error means the identifiers you passed in the devices array are invalid, expired, or do not belong to this application.
How to fix it
Push tokens issued by APNs and FCM change frequently (app reinstall, token refresh, restore to a new device), so targeting them directly is unreliable. Prefer stable identifiers:
- HWID (Hardware ID) — the unique ID generated by the Pushwoosh SDK for each device. Pass these in the
devicesparameter. - UserID — your own user identifier. This is the most reliable way to reach a person across all of their devices. Pass these in the
usersparameter.
Request limits and rules to respect
- Use
devicesin all lowercase; the same applies to every other parameter name. - No more than 1000 tokens/HWIDs in
devices, and no more than 1000 User IDs inusers. Split larger audiences across multiple requests. - iOS push tokens must be lowercase — an uppercase or mixed-case iOS token will not be matched.
- If
devicesis present,filterandconditionsare ignored. Ifusersis present alongsidedevicesorto, the latter are ignored.
{
"notifications": [{
"content": "Your message here",
"devices": [
"hwid_1",
"hwid_2"
]
}]
}
Comments
0 comments
Please sign in to leave a comment.