Skip to content

Instantly share code, notes, and snippets.

@tiagofrancafernandes
Last active February 21, 2022 01:50
Show Gist options
  • Select an option

  • Save tiagofrancafernandes/d69c00fb94c3d591a91a9c94acc33b7a to your computer and use it in GitHub Desktop.

Select an option

Save tiagofrancafernandes/d69c00fb94c3d591a91a9c94acc33b7a to your computer and use it in GitHub Desktop.
one-signal snippets
### Send based on External User IDs - Create notification
# https://documentation.onesignal.com/reference/create-notification#send-based-on-external-user-ids---create-notification
curl -X POST https://onesignal.com/api/v1/notifications \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'Authorization: Basic MjViNDc3NWEtNjg0MS00NzI1LThlMTQtZGY3YTg4MWZlZGNk' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"app_id": "fcfd4df3-d387-49e8-a8a1-0a36084b0813",
"include_external_user_ids": ["123456789", "wiz-1234"],
"channel_for_external_user_ids": "push",
"data": {"foo": "bar"},
"contents": {"en": "English Message"}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment