---
title: mailbox.connected
description: A customer finished authorizing a Gmail or Outlook mailbox.
sidebar:
  label: mailbox.connected
  icon: user-check
---

A customer finished authorizing a Gmail or Outlook mailbox.

## Payload

| Prop | Type | Default | Description |
| - | - | - | - |
| `mailbox_id` | `string` | - | mbx_… |
| `address` | `string` | - | The mailbox address. |
| `provider` | `"google" \| "microsoft"` | - | Which provider. |
| `app_id` | `string \| null` | - | Your OAuth app, or null when the shared AI Inbx app was used. |
| `ref?` | `string` | - | The ref you put on the connect link or passed to mailboxes.connect — how you match this to your user. |
| `reconnected` | `boolean` | - | true when this replaced an existing authorization rather than adding a new mailbox. |

## Handling it

This — not the browser landing back on `return_to` — is the signal that the mailbox is live. The redirect happens whether or not the grant completed, and a customer who closes the tab never triggers it at all.

Match on `ref` — whatever you put on the connect link or passed to `mailboxes.connect` — to attach the mailbox to the right user in your database.

**[Mailboxes](/guides/mailboxes)**

The connect flow end to end, including your own OAuth app.
