# How integrations work

> Connect GitHub, Stripe, Sentry and other services with a webhook, and Opush pushes their events to your devices.

An integration turns a service's webhooks into pushes. You don't give Opush an account login or an API key. Opush gives you a webhook URL, you paste it into the service, and from then on its events reach your iPhone, Apple Watch or Android phone within seconds.

Each integration counts as one follow on your plan, and each one gets its own URL. Create one integration per repository, project or app, so you can name, mute and remove them one by one.

## Supported services [#supported-services]

<Cards>
  <Card title="GitHub" href="/docs/integrations/github" description="Actions runs, deploys, issues, pull requests, releases and star milestones." />
  <Card title="GitLab" href="/docs/integrations/gitlab" description="CI pipelines and deployments, on GitLab.com or self-managed." />
  <Card title="Vercel" href="/docs/integrations/vercel" description="Deployments that succeed or fail, plus any other Vercel event." />
  <Card title="Cloudflare" href="/docs/integrations/cloudflare" description="Pages deployments, Workers Builds and any Cloudflare notification." />
  <Card title="Stripe" href="/docs/integrations/stripe" description="Payments, subscriptions, refunds, failed payments and disputes." />
  <Card title="Sentry" href="/docs/integrations/sentry" description="New issues, issues that come back, and alert rules that fire." />
  <Card title="App Store Server Notifications" href="/docs/integrations/app-store-notifications" description="Subscriptions, purchases, renewals and refunds for your app." />
  <Card title="RevenueCat" href="/docs/integrations/revenuecat" description="Trials, subscriptions, renewals, billing issues and refunds." />
  <Card title="Any tool (JSON)" href="/docs/integrations/webhook" description="Grafana, Prometheus Alertmanager, Datadog, or your own scripts." />
</Cards>

## Create an integration [#create-an-integration]

<Tabs items={["App", "Web console"]}>
<Tab value="App">

1. Open the **Following** tab and tap **Add**.
2. Choose **Services** on iPhone, or **Integration** on Android.
3. Pick the service, and give it a name if you like (for example the repo or project name).
4. Tap **Create webhook** (iPhone) or **Create** (Android).

</Tab>
<Tab value="Web console">

1. Open [app.opu.sh](https://app.opu.sh) and go to **Following**.
2. Click **Service integration**.
3. Pick the service, add an optional name, and click **Create**.

</Tab>
</Tabs>

The integration's page then shows everything you need:

- **Payload URL**: the webhook URL to paste into the service. It looks like `https://opu.sh/v1/hooks/…`.
- **Secret** (or **Token** for the generic webhook): a secret Opush made for you, when the service needs one from you.
- **Set up in …**: the exact steps for that service, with a link to its settings page.

## Secrets and signatures [#secrets-and-signatures]

Opush checks every request, so only the real service can push to you. Who makes the secret depends on the service:

| Service | Who makes the secret | Where it goes |
|---|---|---|
| GitHub | Opush | GitHub's **Secret** field |
| GitLab | Opush | GitLab's **Secret token** field |
| Cloudflare | Opush | The webhook destination's **Secret** field |
| RevenueCat | Opush | RevenueCat's **Authorization header** field |
| Any tool (JSON) | Opush | `Authorization: Bearer` header, or `?token=` in the URL |
| Vercel | Vercel | Paste it back into Opush |
| Stripe | Stripe | Paste it back into Opush |
| Sentry | Sentry | Paste it back into Opush |
| App Store | Nobody | Opush checks Apple's signature instead |

For Vercel, Stripe and Sentry, paste the service's secret into **Signing secret from the service** on the integration's page. Until you do, Opush rejects every event from that service.

<Callout type="warn" title="Keep the URL and secret private">
Anyone who has them can send pushes to this integration. If one leaks, remove the integration and create a new one.
</Callout>

## What you get [#what-you-get]

Each event becomes one push:

- The **title** is the integration's name. If you didn't name it, it's the service's name (GitHub uses the repo name after its first ping).
- The **subtitle** and **message** are written by Opush in your device's language (English, Traditional Chinese, Simplified Chinese, Japanese, Korean, German, French, Spanish or Arabic; other languages get English).
- Tapping the push opens the right page on the service: the Actions run, the deploy, the Stripe payment, the Sentry issue.

For example, a failed GitHub Actions run looks like this:

```text
acme/rocket
CI · Failed
Fix login bug · main #128
```

Things that need you right away, like failed builds and deploys, failed payments, disputes and critical alerts, arrive as **time-sensitive** notifications, so they can break through Focus. See [Levels and sounds](/docs/push/levels-and-sounds).

Events Opush doesn't push are still accepted, so the service doesn't keep retrying. If a service sends the same event twice, you only get one push.

## Options [#options]

These options are on the integration's page in the app or the web console.

- **Only push failures** (GitHub, GitLab, Vercel, Cloudflare): skip pushes for runs and deploys that succeed.
- **Show progress as a Live Activity** (GitHub, GitLab, Vercel, Cloudflare, in the iPhone and Android apps): while a run or deploy is going, a live progress card shows what's running and for how long. When it ends, the card goes away quietly and the normal push tells you the result. See [Live progress](/docs/push/live-progress).
- **Pass on to your server** (App Store): send each notification on to the server you already have.
- **Fields** (any tool): choose which JSON fields become the title, message and link.

Like anything you follow, you can also mute an integration or put it in your daily digest instead of pushing right away.

## Test it [#test-it]

Most services can send a test event. Use it right after setup:

| Service | How to test | What you get |
|---|---|---|
| GitHub | Saving the webhook sends a ping | "Webhook connected" |
| GitLab | **Test › Pipeline events** | The sample pipeline result |
| Cloudflare | **Save and Test** on the destination | "Webhook connected" |
| Stripe | A test-mode payment, or `stripe trigger` | The event, marked "Test" |
| Sentry | **Send Test Notification** in an alert rule | The test alert |
| App Store | **Request a Test Notification** | "Webhook connected" |
| RevenueCat | **Send test event** | "Webhook connected" |
| Any tool | The tool's own test button, or `curl` | Your title and message |

Every event Opush accepts is also listed under **Recent events** on the integration's page.

## When something doesn't arrive [#when-something-doesnt-arrive]

The service's webhook log shows Opush's answer:

| Status | Meaning |
|---|---|
| `200` | Accepted. `"ignored": true` means it's an event Opush doesn't push. |
| `400` | The body isn't valid JSON for this service. |
| `401` | The secret or signature doesn't match, or you haven't pasted the service's secret yet. |
| `403` | App Store only: the notification is for a different app than the one the integration is tied to. |
| `404` | The integration was removed. |
| `413` | The body is larger than 1 MB. |
| `422` | App Store only: the notification was signed more than 7 days ago. |
| `502` | App Store only: Opush couldn't pass the notification on to your server. Apple will retry. |

Also check that the integration isn't muted, and that "Only push failures" isn't hiding a successful run.

## Remove an integration [#remove-an-integration]

Unfollow it in the app or the web console. The URL stops working right away. Remove the webhook from the service too, or it will keep getting `404` errors.
