---
title: "Airbnb OAuth API — connect a host's Airbnb account"
canonical: "https://repull.dev/docs/oauth-connect"
description: "Let users connect their Airbnb account to your app through Repull's hosted, white-label OAuth page. You never handle tokens. Sessions, redirects, status."
updated: "2026-11-30T00:48:58.694Z"
commit: "18314c12fefb59a7545ef7607c0893919de20aa9"
---

New to the Airbnb API? [How Airbnb API access works, and what it lets you do](https://repull.dev/airbnb-api) · [How to get Airbnb API access in 2026](https://repull.dev/airbnb-api-access)

# OAuth Connect

Let your users connect their Airbnb account to your app through a hosted, white-label OAuth page. You never handle tokens; we redirect the user back to your URL when they're done.

> **Note: Connecting Booking.com?**
>
> This page covers Airbnb's OAuth flow. Booking.com uses a similar hosted connect page, but the user finishes the link inside their Booking.com Extranet — see [Connect Booking.com](https://repull.dev/docs/channels/booking/connect.md).

## How it works

From your server, you create a Connect session. We give you a one-time URL on `connect.repull.dev`. Send your user there. We render a page styled with your brand, walk them through Airbnb's consent screen, exchange the OAuth code for tokens, and redirect them back to your app with `?status=connected` appended.

1. Your server calls `POST /v1/connect/airbnb` with a `redirectUrl`.
2. We return `url` — a URL on `connect.repull.dev`.
3. Redirect your user to `url`.
4. We render your white-label Connect page → Airbnb consent → an account-confirmation screen (“Is this the right Airbnb account?”) → done.
5. The user lands on your `redirectUrl` with status query params.

> **Note: Same model as Stripe Connect or Plaid Link**
>
> Your server only mints a session and reads a status. You never touch tokens, never handle the OAuth code, never make a request to Airbnb. The hosted Connect page is rendered with your branding from [/dashboard/settings/connect](https://repull.dev/dashboard/settings/connect) — logos, colors, and trust signals — and includes a mid-flow confirmation step so users can verify they authorized the right Airbnb account before we activate it.

## Start a connect session

Server-to-server. Authenticate with your live API key. The session expires after 30 minutes if the user doesn't complete the flow.

**cURL**

```bash
curl -X POST 'https://api.repull.dev/v1/connect/airbnb' \
  -H 'Authorization: Bearer sk_live_...' \
  -H 'Content-Type: application/json' \
  -d '{
    "redirectUrl": "https://yourapp.com/airbnb/connected",
    "accessType": "full_access",
    "state": "user_8421"
  }'
```

**Node.js**

```javascript
import { Repull } from '@repull/sdk'

const repull = new Repull({ apiKey: process.env.REPULL_API_KEY! })

const { url } = await repull.connect.airbnb.create({
  redirectUrl: 'https://yourapp.com/airbnb/connected',
  accessType: 'full_access', // 'full_access' | 'messaging' | 'read_only'. Omit to default to full_access.
})

// Redirect the user
res.redirect(url)
```

**Python**

```python
import json
import os
from repull import AuthenticatedClient
from repull.api.connect import create_connection
from repull.models import CreateConnectionBody, CreateConnectionBodyAccessType

client = AuthenticatedClient(
    base_url="https://api.repull.dev",
    token=os.environ["REPULL_API_KEY"],
)

response = create_connection.sync_detailed(
    "airbnb",
    client=client,
    body=CreateConnectionBody(
        redirect_url="https://yourapp.com/airbnb/connected",
        access_type=CreateConnectionBodyAccessType.FULL_ACCESS,  # or READ_ONLY / MESSAGING
    ),
)

# Redirect the user
return redirect(json.loads(response.content)["url"])
```

**PHP**

```php
$response = Http::withToken('sk_live_...')
    ->post('https://api.repull.dev/v1/connect/airbnb', [
        'redirectUrl' => route('airbnb.connected'),
        'accessType'  => 'full_access', // 'full_access' | 'messaging' | 'read_only'. Omit to default to full_access.
    ])
    ->throw();

$url = $response->json('url');

return redirect()->away($url);
```

### Body parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `redirectUrl` | `string` | Yes | Where we send the user after the OAuth flow completes (or fails). We append status query params to this URL. |
| `accessType` | `string` | No | Permission scope requested from the host. One of full\_access, messaging, or read\_only. Omit it and the consent screen lets the host choose (defaulting to full\_access). Pass it and the tier is fixed: the choice is hidden and the host can only continue with the tier you requested. Default: `full_access`. |
| `reservationHistoryMonths` | `integer` | No | How many months of past reservations the first import pulls, from 1 to 60. Omit it for the default window. Upcoming stays are always imported. A wider window takes longer to import, because every extra month is more stays to fetch. |
| `state` | `string` | No | Your own correlation value, e.g. your user id or a signed token (at most 500 characters). Echoed in the response, on every redirect back (whatever the outcome), in the popup message, and in the connect.session.completed webhook. Works on every provider. |

### Choosing an access type

- **full\_access (default)**— read + manage, including listing/calendar/pricing writes. Recommended for property managers and channel managers that run the host's operations end-to-end. Requests Airbnb's `property_management` scope.
- **messaging** (shown to hosts as “Messaging & reviews”) — read everything _plus send guest messages and reply to reviews_, but no listing, calendar, or pricing management. Use this when the host's Airbnb account is **already connected to another PMS** (or any app that holds property management) and you only need to handle guest communication and reviews. Because it never requests `property_management`, it connects cleanly alongside the incumbent app.
- **read\_only** — read listings, reservations, calendars, messages, and reviews. Recommended for analytics, reporting, and BI tools that just need to pull data.

`messaging` and `read_only` request a shorter, less alarming list of permissions on the Airbnb consent screen, which generally improves conversion. `messaging` additionally requests `messages_write` and `reviews_write`, so your app can reply to guests, reply to their reviews and review guests. Hosts who connected with `messaging` before October 19, 2026 hold a token without `reviews_write`: Airbnb refuses their review replies until the host reconnects once.

> **Warning: Only one app can manage a property at a time**
>
> Airbnb's `property_management` scope is **exclusive**— a host's account can grant it to only one app at a time. If the host already syncs their Airbnb account to another PMS or channel manager, `full_access` will fail to connect. Use `messaging` (or `read_only`) to coexist with that incumbent app — the same works on Booking.com and Vrbo, see [Use Repull alongside a PMS](https://repull.dev/docs/alongside-your-pms.md).

> **Warning: Full access turns listings to Instant Book**
>
> With `full_access`, every listing on the host's Airbnb account comes under API management, and Airbnb's default for API-managed listings is Instant Book. Listings that were Request to Book become Instant Book — all of them, including listings the host keeps inactive in Repull. To switch a listing back, send `{"instantBook": {"enabled": false}}` to `PUT /v1/channels/airbnb/listings/{id}/booking-settings` and check it with `GET` on the same path (see [Airbnb Booking Settings](https://repull.dev/docs/channels/airbnb/booking-settings.md#instant-book-after-connect)). Airbnb may keep some listings on Instant Book even after accepting the change; set those in Airbnb. `messaging` does not put listings under API management, so booking settings stay as the host set them — use it for hosts who must stay Request to Book without any change made through the API.

> **Tip: Let the host choose, or fix the tier**
>
> Omit `accessType` and the hosted consent screen lets the host pick a tier, starting from `full_access`. Pass it and the choice is hidden: the host can only continue with the tier you requested. Pass it when your app only works with one tier.

> **Note: Pick once, per host**
>
> The access type is locked in at consent time. To change it for an existing connection, the host has to reauthorize through a new Connect session with the new `accessType`.

### Response

```
{
  "url": "https://connect.repull.dev/cs_8gQrT2v9k3M4nLp7wJxYzAbCdEfGhIjKlMnOp",
  "provider": "airbnb",
  "sessionId": "cs_8gQrT2v9k3M4nLp7wJxYzAbCdEfGhIjKlMnOp",
  "expiresAt": "2026-04-29T18:25:14.000Z",
  "state": "user_8421"
}
```

`state` is echoed when you sent one. Keep `sessionId` too: it comes back on the redirect, whatever the outcome.

## Handle the redirect back

When the OAuth flow completes (or fails), we redirect the user to your `redirectUrl` with these query params appended. Every return — connected, cancelled, failed or expired — carries `status`, `sessionId`, and your `state` when you sent one, so you can always tie it to the request that started it.

| Param | Value | Meaning |
| --- | --- | --- |
| status | connected | Connection successful. `hostId`, `externalAccountId`, `connectionId` and `accountId` are also set. |
| status | cancelled | The user declined. `code` may explain (`access_denied`, `wrong_account`, `account_conflict`, …). |
| status | error | The connection could not be completed. `code` says why (`token_exchange_failed`, `activation_failed`, …). |
| sessionId | cs\_8gQrT2v9… | The `sessionId` the create call returned. On every return. |
| state | user\_8421 | The `state` you sent, unchanged. On every return; absent if you sent none. |
| status | expired | User took too long; the link expired before they completed authorization. |
| hostId | 123456789 | Airbnb host ID. Use this to query `GET /v1/properties`. |
| externalAccountId | 123456789 | The platform's own account id: for Airbnb the host ID (same as `hostId`). The same value as `externalAccountId` on the `connect.session.completed` webhook. |
| connectionId | 42 | Our connection record, the `X-Account-Id`. Stable across token refreshes. |
| accountId | 42 | Same as `connectionId`, kept for existing integrations. |

```
// Your /airbnb/connected handler
public function connected(Request $request)
{
    $status = $request->query('status');

    if ($status === 'connected') {
        $hostId    = $request->query('hostId');     // Airbnb host ID
        $accountId = $request->query('accountId');  // Repull connection ID
        // Associate $hostId with the currently authenticated user, kick off
        // any post-connect work in your app (welcome email, dashboard nudge).
        return redirect()->route('dashboard')->with('success', 'Airbnb connected!');
    }

    if ($status === 'cancelled') {
        $code = $request->query('code', 'unknown');
        $message = match($code) {
            'wrong_account'    => 'You authorized the wrong Airbnb account. Try again.',
            'access_denied'    => 'You declined to authorize Airbnb.',
            'account_conflict' => 'This Airbnb account is already connected elsewhere.',
            default            => "Connection failed: {$code}",
        };
        return redirect()->route('dashboard.connections')->with('error', $message);
    }

    if ($status === 'expired') {
        return redirect()->route('dashboard.connections')->with('error', 'The connect link expired. Please try again.');
    }

    return redirect()->route('dashboard.connections');
}
```

## Popup completion (postMessage)

The redirect above is one of **two** ways a Connect session finishes. If you open the Connect URL in a **popup window** instead of navigating the whole page — the pattern our SDKs and the [Connect widget](https://repull.dev/docs/connect-widget.md) use — the hosted page posts a `message` back to the window that opened it and then closes itself. Your app stays put; no full-page round-trip.

Every terminal screen of the flow (success, cancelled, expired, error) emits exactly one message to `window.opener`. Listen on the `message` event and **always verify `event.origin`** before trusting the payload.

### The three messages

| message `type` | Fired when | Extra fields |
| --- | --- | --- |
| repull:connect:completed | Connection is live. | `connectionId` (our connection record, the `X-Account-Id`) and `externalAccountId` (the platform's own account id, e.g. the Airbnb host id), the same pair as the redirect and the `connect.session.completed` webhook |
| repull:connect:error | Authorization failed. | `error` — the same reason codes as the redirect flow (`access_denied`, `account_conflict`, `token_exchange_failed`, …) |
| repull:connect:close | User cancelled or the link expired. | — |

Every message carries the correlation value — the opaque `sessionId` you got back when you started the session — plus the `provider`. That's how you match a message to the user who opened the popup without keeping any per-window state:

```
// Shape of every Connect popup message
{
  "type": "repull:connect:completed",   // or :error | :close
  "sessionId": "cs_8gQrT2v9k3M4nLp7wJxYzAbCdEfGhIjKlMnOp",  // correlation value
  "provider": "airbnb",
  "connectionId": 42,                    // only on :completed — our connection record (X-Account-Id)
  "externalAccountId": "123456789",      // only on :completed — the platform's account id (Airbnb host id)
  "error": "access_denied"               // only on :error
}
```

### Full round-trip

Start the session from your server (so your API key never touches the browser), hand the returned `url` to the client, open it in a popup, and resolve when the matching message arrives:

```
// Browser — 'url', 'sessionId', and 'expiresAt' came from your server's
// POST /v1/connect/airbnb call (never expose your API key client-side).
function connectAirbnb({ url, sessionId, expiresAt }) {
  return new Promise((resolve, reject) => {
    const popup = window.open(url, 'repull-connect', 'width=520,height=720')

    // The session itself expires — stop waiting once it does.
    const expiry = setTimeout(
      () => finish(reject, new Error('session_expired')),
      new Date(expiresAt).getTime() - Date.now(),
    )

    function onMessage(event) {
      // 1. ALWAYS pin the origin — the hosted Connect page only ever posts
      //    from https://connect.repull.dev (or your Scale custom domain).
      if (event.origin !== 'https://connect.repull.dev') return

      const msg = event.data || {}
      // 2. Correlate: ignore messages for other sessions/windows.
      if (msg.sessionId !== sessionId) return

      switch (msg.type) {
        case 'repull:connect:completed':
          // msg.connectionId = our connection record; msg.externalAccountId = the Airbnb host id.
          return finish(resolve, { connectionId: msg.connectionId, externalAccountId: msg.externalAccountId, provider: msg.provider })
        case 'repull:connect:error':
          return finish(reject, new Error(msg.error || 'connect_failed'))
        case 'repull:connect:close':
          return finish(reject, new Error('cancelled'))
      }
    }

    function finish(cb, value) {
      clearTimeout(expiry)
      window.removeEventListener('message', onMessage)
      try { popup && popup.close() } catch {}
      cb(value)
    }

    window.addEventListener('message', onMessage)
  })
}

// Usage
const { connectionId } = await connectAirbnb(session)
// Connection is live — confirm state / pull host metadata:
// GET /v1/connect/airbnb
```

> **Warning: Origin is the security boundary**
>
> The hosted page posts with a wildcard target, so **you** must reject any message whose `event.origin` isn't `https://connect.repull.dev` (or your Scale [custom domain](https://repull.dev/docs/oauth-connect.md#custom-domain)). The browser sets `event.origin`— it can't be spoofed — so pinning it is what keeps another tab from forging a completion. Correlating on `sessionId` then protects against stale messages from an earlier popup.

> **Note: No opener? You still get the redirect**
>
> If the page has no `window.opener`— the user pasted the URL into a normal tab, or refreshed after the popup closed — there's nothing to post to, so the hosted page falls back to the full-page [redirect](https://repull.dev/docs/oauth-connect.md#handle-redirect) to your `redirectUrl` instead. Handle both paths and either entry point works.

## Associating the connection with your user

When the user lands back on your `redirectUrl`, you'll usually want to record `hostId` against the user in your database. Two ways to know who that user is:

### Option 1 — Auth-required redirect (simplest)

If your `redirectUrl`requires login, the user's session is intact when they land back — the OAuth round-trip happens in the same browser session. Your usual `auth()->user()` / `request.user` works.

### Option 2 — Pass `state` (works without a session)

Send your own value as `state` when you create the session — a user id, or better a signed token — and store the `sessionId` you get back. Both come back on the redirect whatever the outcome:

```
// Start: your server
const { url, sessionId } = await fetch('https://api.repull.dev/v1/connect/airbnb', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.REPULL_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ redirectUrl: 'https://yourapp.com/airbnb/connected', state: signState(user.id) }),
}).then((r) => r.json())
await db.connectAttempts.insert({ sessionId, userId: user.id })

// Return: GET /airbnb/connected?status=…&sessionId=…&state=…
app.get('/airbnb/connected', async (req, res) => {
  const { status, sessionId, state, code, externalAccountId } = req.query
  const userId = verifyState(state) // reject a forged or missing state
  const attempt = await db.connectAttempts.find({ sessionId, userId })
  if (!attempt) return res.status(403).send('Unknown connect attempt')

  if (status === 'connected') await db.users.linkAirbnbHost(userId, externalAccountId)
  else await db.connectAttempts.update(sessionId, { status, code }) // cancelled | error | expired
  res.redirect('/settings/channels')
})
```

### Option 3 — Encode user context into the redirectUrl

We preserve all your existing query params. When the user lands back, we only **append** `&status=...&sessionId=...&state=...&hostId=...&externalAccountId=...&connectionId=...&accountId=...` to the URL you gave us:

```
// Generate
$signed = hash_hmac('sha256', $userId . ':' . time(), config('app.key'));
'redirectUrl' => route('airbnb.connected', ['from' => $userId, 'sig' => $signed]),

// Receive
public function connected(Request $request)
{
    $userId = (int) $request->query('from');
    $sig    = $request->query('sig');
    if (! $this->verify($userId, $sig)) abort(403);

    $hostId = $request->query('hostId');
    User::find($userId)->airbnbHosts()->syncWithoutDetaching([$hostId]);
    // ...
}
```

> **Note: Why sign it?**
>
> Without a signature, anyone could craft a URL with a different `from` value and link an Airbnb host to the wrong user. A signed nonce or short-lived token makes this safe.

## Check connection status anytime

After the user is connected, query the canonical state via `GET /v1/connect/airbnb`:

```
curl 'https://api.repull.dev/v1/connect/airbnb' \
  -H 'Authorization: Bearer sk_live_...'

# {
#   "connected": true,
#   "provider": "airbnb",
#   "id": 42,
#   "status": "active",
#   "externalAccountId": "123456789",
#   "createdAt": "2026-04-29T18:01:42.000Z",
#   "host": {
#     "displayName": "Lidia",
#     "displayNameLong": "Lidia",
#     "avatarUrl": "https://a0.muscache.com/im/users/.../profile_pic.jpg",
#     "avatarUrlLarge": "https://a0.muscache.com/im/users/.../profile_pic_large.jpg",
#     "activationStatus": "active"
#   },
#   "accounts": [
#     {
#       "externalAccountId": "123456789",
#       "name": "Lidia",
#       "pictureUrl": "https://a0.muscache.com/im/users/.../profile_pic.jpg",
#       "status": "active",
#       "connected": true
#     }
#   ]
# }
```

After a successful connection, the response includes a `host`object with the host's display name and Airbnb avatar so you can render an account-level confirmation UI in your own app — no follow-up calls required.

> **Note: Why no host email?**
>
> Airbnb's partner API does not expose host email to integrators, so we can't return one. The host's account email is the email they used to sign in to your app — you already have that. `host.displayName` + `host.avatarUrl`is what you need to confirm “you linked the right account” back to the user.

For non-Airbnb providers (Booking.com, Vrbo), `host` is currently `null`. Per-provider enrichment will land incrementally.

A workspace can connect more than one Airbnb account. `accounts` lists every one of them; the top-level fields describe a single connection and are kept for existing integrations.

## Which listings are imported

- Connecting imports **every** listing on the Airbnb account, including unlisted ones.
- Listings that are listed on Airbnb arrive **active**. Unlisted listings arrive **inactive**: not billed and closed to the API until you activate them with `POST /v1/listings/status`. Find them with `GET /v1/listings?status=inactive`.
- Listings the host adds on Airbnb after connecting are picked up by a **daily refresh**, and whenever the host reconnects, following the same rule. To pick one up right away, call [`POST /v1/connections/{id}/imports`](https://repull.dev/docs/imports.md#new-listings).
- A later sync never changes the state of a listing you already have, so a listing you activated or deactivated stays that way.

See [Active & inactive listings](https://repull.dev/docs/manage-listings.md) for what an inactive listing can and cannot do.

## Disconnect an account

Call `DELETE /v1/connect/airbnb?accountId=<externalAccountId>` to disconnect one host account. `accountId`is required when more than one Airbnb account is connected. The account's listings are deactivated (not deleted) unless they are still connected through another account or channel, and their ids come back in `listingsDeactivated`. Full details on [Connect → Disconnect an account](https://repull.dev/docs/connect.md#disconnect).

That `accountId` is the Airbnb host id, and it is the same value the Airbnb collection routes take as `?account_id=` to scope a read to one connected account. If your workspace has two hosts, see [Account scope → Several Airbnb accounts](https://repull.dev/docs/scoping.md#several-airbnb-accounts) for reading one account's listings, reservations and messages, and for the per-account freshness envelope that says which of the two is up to date.

## Failure modes

All non-success outcomes redirect back to your `redirectUrl` with `?status=cancelled&code=<reason>`, `?status=error&code=<reason>` or `?status=expired`, plus `sessionId` and your `state`:

- **access\_denied** — user clicked “Cancel” on Airbnb's consent screen.
- **wrong\_account** — user clicked “Use a different account” on the confirmation screen. They likely had the wrong Airbnb account logged in. Mint a fresh session and ask them to retry (in another browser tab where they're logged in to the right account).
- **account\_conflict** — the Airbnb account is already connected to a different Repull workspace. Disconnect it from there first.
- **token\_exchange\_failed** — Airbnb rejected our token exchange. Usually transient; retry.
- **activation\_failed** — DB write failed during the final activate step. Rare; transient; retry.
- **expired** (status, not code) — connect link is older than 30 minutes. Generate a new one.

> **Note: Webhooks**
>
> Want to be notified the instant a connection completes? Subscribe to `account.created` via [webhooks](https://repull.dev/docs/webhooks-introduction.md). Coming soon.

## Custom domain (Scale plan)

On the Scale plan, you can swap `connect.repull.dev` for your own subdomain — e.g. `connect.yourapp.com` — so the URL bar matches your brand end-to-end. Add a CNAME to `cname.vercel-dns.com`, paste the hostname in your dashboard, and we'll provision SSL automatically.

[View Scale pricing →](https://repull.dev/pricing)
