---
title: "Complete a deferred OAuth connection after identity verification"
method: POST
path: "/api/v3.1/connected_accounts/complete_auth"
tags: ["Connected Accounts", "Authentication"]
---

# Complete a deferred OAuth connection after identity verification

`POST /api/v3.1/connected_accounts/complete_auth`

Redeems a single-use `session_uri` handed to a project's OAuth callback verifier. Composio validates that the caller's project owns the pending connection and that `user_id` matches the connection owner, then completes the token exchange and returns the now-ACTIVE connected account. The session is single-use.

## Request body

- object
  - `session_uri` string, required — The opaque session URI received on the verifier redirect.
  - `user_id` string, required — The user this connection was initiated for.

## Response `200`

The connection was completed and is now ACTIVE.

- object
  - `connected_account_id` string, required — The connection that was completed.
  - `toolkit_slug` string, required — The toolkit the connection belongs to.

## Other responses

- `400` — Bad request — missing/malformed field, or identity mismatch (user_id does not match the connection owner).
- `401` — Unauthorized - Authentication failed
- `404` — Session not found, expired, already consumed, or not owned by the caller (masks cross-tenant); or the held authorization expired.
- `500` — Internal server error - Failed to complete the connection.

---

[API](https://skmtc.net/composiohq/apis/composio-platform-api-v3-1.md) · [All operations](https://skmtc.net/composiohq/apis/composio-platform-api-v3-1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/composiohq/composio-platform-api-v3-1/versions/4239836857f8/schema)
