OneSignal

OneSignal

Send events to OneSignal

Configuration

OptionDescription
OneSignal App ID
Type: string
Required: True

Your OneSignal App ID. You can find this in your OneSignal dashboard under Settings > Keys & IDs.

OneSignal REST API Key
Type: string
Required: True

Your OneSignal REST API Key. You can find this in your OneSignal dashboard under Settings > Keys & IDs.

External ID
Type: string
Required: True

A unique identifier that is used to identify this person across OneSignal, PostHog, and other external systems.

Event name
Type: string
Required: True

The name of the event to send to OneSignal.

Event properties
Type: json
Required: False

Additional properties to include with the event. Leave empty to use all event properties, or specify custom properties.

Event timestamp
Type: string
Required: True

The timestamp of the event.

Using our REST API you can create this destination like so:

Terminal
# Create a new destination
curl --location 'https://us.i.posthog.com/api/environments/:project_id/hog_functions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <POSTHOG_PERSONAL_API_KEY>' \
--data '{
"type": "destination",
"name": "OneSignal",
"inputs": {
"appId": {
"value": ""
},
"apiKey": {
"value": ""
},
"externalId": {
"value": ""
},
"eventName": {
"value": ""
},
"eventTimestamp": {
"value": ""
}
},
"enabled": true,
"template_id": "template-onesignal"
}'

Community questions

Questions about this page? or post a community question.