API ReferenceConnected Accounts

Complete a deferred OAuth connection after identity verificationv3.1

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.

Authorization

ApiKeyAuth
x-api-key<token>

Project API key authentication

In: header

Request Body

application/json

session_uristringRequired

The opaque session URI received on the verifier redirect.

user_idstringRequired

The user this connection was initiated for.

Response Body

application/json

application/json

application/json

application/json

application/json

import requestsurl = "https://example.com/api/v3.1/connected_accounts/complete_auth"body = """{  "session_uri": "string",  "user_id": "string"}"""response = requests.request("POST", url, data = body, headers = {  "Content-Type": "application/json"})print(response.text)
{  "connected_account_id": "string",  "toolkit_slug": "string"}