---
url: https://docs.seen.io/api/guides/xtremepush.md
description: >-
  Send customer data from an Xtremepush campaign to Seen for video generation,
  then deliver the player link and thumbnail back as an Xtremepush event.
---

# Xtremepush

::: info
In the following example, we will be sending customer data to Seen for video generation, and receiving a unique video player link and personalised email thumbnail back to Xtremepush for distribution. This example uses an event-triggered webhook campaign in Xtremepush to send data to Seen, and a Seen Project webhook to deliver the result back as an event. No third-party middleware is required.

If you have multiple video campaigns with Seen, repeat the process to connect Xtremepush with each one. You can reach out to your Customer Success Manager at Seen for assistance.

A Project needs to be created and published in the Seen Platform prior to setting up the integration.
:::

## Send data to Seen

1. Navigate to **Campaigns → Create Campaign**, select the trigger that should start video generation, and give it a name. Select **Webhook** as the channel and proceed to **Step 2: Content**. Configure the webhook as follows:

   * URL: `https://next.seen.io/v1/projects/{PROJECT_ID}/data` (find your Project endpoint in the **Run** tab of your Seen Platform Project)
   * Request body: **JSON Parameters**. Add the following key-value pairs, using the dynamic user attributes picker where indicated:

     | Key | Value |
     |---|---|
     | `first_name` | `{{ first_name }}` (select via dynamic attributes picker) |
     | `last_name` | `{{ last_name }}` (select via dynamic attributes picker) |
     | `id` | `{{ user.id }}` |

     Remember to modify the payload to match the variables used in your Seen Project. All fields must match property names defined in your Seen Project.
   * Request headers:

     * Key: `Authorization`
     * Value: `Bearer {your Seen API token}`

     You can create an API token in your Seen Platform Workspace under **Settings → API**.

   The final webhook payload will look like this:

   ```json
   {
     "first_name": "{{ first_name }}",
     "last_name": "{{ last_name }}",
     "id": "{{ user.id }}"
   }
   ```
2. Proceed to **Step 3: Events** and set the trigger event to the event created above. Review and launch.

## Prepare to receive data from Seen

1. Create a new event in Xtremepush to receive your player link and personalised email thumbnail link. You can add a new event by navigating to **Data → Data Manager → Events**. Give the event a name and take note of it. It is needed in the next step in the Seen Platform Project. This example uses the event name `seen`.
2. Create a new campaign (as in the first step), choose **Trigger type → Event Triggered** and choose **Trigger event → `seen`** on step **3. Trigger**.
3. Finish up the campaign set-up according to your specific use case.

## Set up your webhook in your Seen Platform Project

1. In Seen Platform, navigate to your Project.
2. Go to the **Run** tab, and click on **Add webhook**.
   * URL: `https://external-api.xtremepush.com/api/external/hit/event`
   * Method: `POST`
   * Use the payload below as a starting point for the Seen webhook body. Replace the `{{ }}` placeholders with the dynamic output references available in the Seen webhook editor:
     ```json
     {
       "event": "seen",
       "value": {
         "email_thumbnail": "{{ Email thumbnail link }}",
         "player": "{{ Player link }}"
       },
       "user_id": "{{ id }}"
     }
     ```
   * **Security** tab:
     * Type: `OAuth`

     * Client ID and Client Secret: follow the [Xtremepush OAuth2 guide](https://docs.xtremepush.com/docs/oauth20#client-secret-authentication).

       ::: warning
       This guide requires using **Client Secret Authentication** for Xtremepush.
       :::

     * Fill out the fields on the **Secret** tab as follows:

       | Field | Value |
       |---|---|
       | Token URL | `https://external-api.xtremepush.com/api/oauth/token` |
       | Client ID | `<Your Xtremepush Client ID>` |
       | Client Secret | `<Your Xtremepush Client Secret>` |
       | Grant Type | `client_credentials` |

     * Fill out the **Scopes** field based on your OAuth Key specifications. Leave empty if all scopes are active.
3. Click **Create** to save the webhook.
4. You can now test the full flow.
