---
title: "Create OAuth connect link"
method: POST
path: "/v1/projects/{project_id}/oauth-apps/{app_id}/connect-links"
tags: ["oauth-apps"]
---

# Create OAuth connect link

`POST /v1/projects/{project_id}/oauth-apps/{app_id}/connect-links`

## Request

- Base URL: `https://api.connic.co`
- URL: `https://api.connic.co/v1/projects/{project_id}/oauth-apps/{app_id}/connect-links`
- Auth: HTTP bearer

Creates a single-use sign-in link for an end user, valid for 10 minutes.

Send the user to `url`. After they sign in with the provider, their token is stored
under `user_id`. Use the same ID that your middleware sets in the context path named
by the MCP server's `oauth.user`. The browser then returns to `return_url` with
`connic_oauth=connected`, `denied`, or `failed` added to the query. `return_url`
must match one of the app's return URLs; without it, connic shows a confirmation page.

Required permission: `oauth_apps.connect`.

## Path parameters

- `project_id` string, uuid, required
- `app_id` string, uuid, required

## Request body

- OAuthConnectLinkCreate: End user to create a sign-in link for.
  - `user_id` string, required: Your ID for the end user, up to 255 characters. Use the value your middleware sets at the MCP server's `oauth.user` context path.
  - `return_url` string, nullable: Where the browser returns after sign-in, with `connic_oauth` set to `connected`, `denied` or `failed`. Must match one of the app's `return_urls`; omit to show a connic confirmation page.

## Response `201`

Successful Response

- OAuthConnectLinkResponse: Single-use sign-in link for an end user.
  - `url` string, required: Single-use sign-in URL to send the end user to.
  - `expires_at` string, required: When the link expires, 10 minutes after creation.

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required permission or access to the environment.
- `404`: The resource does not exist in this project.
- `422`: Validation Error
- `429`: Rate limit exceeded.

---

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