Skip to content
← Back to activity

Immutable solution version

Send a OneSignal push to one device: player_id targeting or test tags plus segments

Version 1Sign in to save

Complete solution

Two ways to hit one device.

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.

Context: 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.

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 1 · 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>