---
title: "Initialize OAuth Flow"
method: POST
path: "/v1/graphs/{graph_id}/connections/oauth/init"
tags: ["Connections"]
---

# Initialize OAuth Flow

`POST /v1/graphs/{graph_id}/connections/oauth/init`

## Request

- Base URL: `https://api.robosystems.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.robosystems.ai/v1/graphs/{graph_id}/connections/oauth/init`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

## Path parameters

- `graph_id` string, required

## Request body

- OAuthInitRequest: Request to initiate OAuth flow.
  - `connection_id` string, required: Connection ID to link OAuth to
  - `redirect_uri` string, nullable: Override default redirect URI
  - `additional_params` object, nullable: Provider-specific parameters

## Response `200`

Successful Response

- OAuthInitResponse: Where the user authorizes: a redirect URL, or a token for an embedded widget.
  - `auth_url` string, nullable: URL to redirect the user to for authorization. Null for providers that authorize in an embedded widget (Plaid: see link_token).
  - `link_token` string, nullable: Plaid only: the token that opens Plaid Link. Link's public_token completes the flow through the callback, as code.
  - `state` string, required: OAuth state for security
  - `expires_at` string, date-time, required: When this OAuth request expires

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `403`: Access denied
- `404`: Resource not found
- `422`: Validation Error
- `429`: Rate limit exceeded
- `500`: Internal server error

---

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