---
title: "Poll OAuth connect"
method: GET
path: "/v1/accounts/oauth/{provider}/status"
tags: ["Email Accounts"]
---

# Poll OAuth connect

`GET /v1/accounts/oauth/{provider}/status`

## Request

- Base URL: `https://api.mailbeast.ai`
- URL: `https://api.mailbeast.ai/v1/accounts/oauth/{provider}/status`
- Auth: HTTP bearer

Poll a connect started with `init`. `pending` until the mailbox owner finishes consent, then `connected` (with `accountId`) or `failed`.

Requires one of the following scopes: `accounts:read`, `accounts:all`, `all:read`, `all:all`.

## Path parameters

- `provider` 'google' | 'microsoft', required

## Query parameters

- `state` string, required

## Response `200`

- OAuthStatusApiResponseDto
  - `status` 'pending' | 'connected' | 'failed', required: `pending` until consent completes, then `connected` (with `accountId`) or `failed`.
  - `accountId` string, nullable, required: The connected account id once `status` is `connected`; otherwise null.
  - `error` string, nullable, required: Failure reason when `status` is `failed`.

## Other responses

- `400`: The request body or parameters failed validation.
- `401`: Missing or invalid API key.
- `403`: The key lacks a required scope, or the plan does not include API access.
- `429`: Rate limit exceeded - retry after the interval in the Retry-After header.

---

[API](https://skmtc.dev/mailbeast/apis/mailbeast-public-api.md) · [All operations](https://skmtc.dev/mailbeast/apis/mailbeast-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mailbeast/apis/mailbeast-public-api/revisions/6440ce0738a4?raw)
