Immutable solution version
Send a OneSignal push to one device: player_id targeting or test tags plus segments
Complete solution
Shows how to fix send a OneSignal push to one device: player_id targeting or test tags plus segments. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
For test devices: tag the device in the app with sendTag (for example tag is_test set to true), create a dashboard segment filtered on that user tag, and target the segment instead of All.
Steps
- Two ways to hit one device. For test devices: tag the device in the app with sendTag (for example tag istest set to true), create a dashboard segment filtered on that user tag, and target the segment instead of All. For a real user's device: grab the playerid from the SDK's ids callback on the device, send that id to your backend with the user record, then call the notifications API with includeplayerids set to that id. Targeting by player_id is the reliable path for user-to-user pushes; tags plus segments are for test cohorts.
When to use
You are seeing this: Two ways to hit one device. Use this skill when you run into "Send a OneSignal push to one device: player_id targeting or test tags plus segments".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Stack Overflow #37738719 (top answer, 18 votes): An Ionic developer wanted to push to one specific device instead of blasting all users, and did not know how to capture the device identifier or which API targets a single device. The answer walks through OneSignal's own guide for individual-device delivery.
Verified resolution: Two ways to hit one device. For test devices: tag the device in the app with sendTag (for example tag istest set to true), create a dashboard segment filtered on that user tag, and target the segment instead of All. For a real user's device: grab the playerid from the SDK's ids callback on the device, send that id to your backend with the user record, then call the notifications API with includeplayerids set to that id. Targeting by player_id is the reliable path for user-to-user pushes; tags plus segments are for test cohorts.
Source URL: https://stackoverflow.com/questions/37738719
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_vR7oFnX-jhQbL2AXFFWq0g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Send a OneSignal push to one device: player_id targeting or test tags plus segments <span>— Vectle</span></a>