# OneSignal

## **Setup**

1. Go to: `Settings → 3rd Party Sources → Cohort Export`
2. Click the ✎ icon next to **OneSignal**
3. Fill in the fields:
   * **App ID** – available in your app settings in the [OneSignal](https://onesignal.com/) dashboard (`Settings → Keys & IDs → OneSignal App ID`)
   * **REST API Key** – also found under `Settings → Keys & IDs → API Key`
4. Click `Save` to apply.

<figure><img src="/files/041aa2zJSKFDvU0KkCzC" alt=""><figcaption></figcaption></figure>

*To disable the integration, turn off the toggle.*

### **User Identifier**

* Set a [custom property](/integration/integration-of-sdk-v2/setting-up-events/user-profile.md#custom-user-property) in devtodev: `onesignal_id`. This identifier ensures accurate tracking and segmentation of users during data export.&#x20;
* `onesignal_id` must match the **External ID** you set when identifying users in OneSignal, [see OneSignal documentation](https://documentation.onesignal.com/docs/users#external-id).
* Make sure this property is set before cohort export.

## How to prepare cohorts

Check out the **Tuning section** to learn [how to export the cohorts](/reports-and-functionality/project-related-reports-and-fuctionality/tuning.md#cohort-export).&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devtodev.com/3rd-party-sources/cohort-export/onesignal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
