---
title: "Finish connecting Google Drive"
method: POST
path: "/google-drive/connect/callback/"
tags: ["google-drive"]
---

# Finish connecting Google Drive

`POST /google-drive/connect/callback/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/google-drive/connect/callback/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Exchanges the OAuth code and stores the grant for the signed-in user.

## Request body

- GoogleDriveConnectCallbackSchema: What Google sent to the callback page.
  - `code` string, required
  - `state` string, required

## Response `200`

Successful Response

- GoogleDriveConnectionReadSchema: Whether the signed-in user has connected Drive in this workspace. Always a 200, never a 404: the settings page is asking "Connect, or pick?" and both answers are ordinary.
  - `configured` boolean, required: Whether this deployment has a Google Drive client at all. False means the Connect button should not be offered.
  - `connected` boolean, required
  - `connected_at` string, date-time, nullable, required
  - `google_account_email` string, nullable, required: Which Google account is connected, for the caption.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `422`: The OAuth state is invalid or expired.
- `500`: Internal server error.
- `502`: Google rejected the token exchange.
- `503`: Service unavailable.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/4a6bd71e3f02?raw)
