---
title: "Create Connect token"
method: POST
path: "/v1/connect/{project_id}/tokens"
---

# Create Connect token

`POST /v1/connect/{project_id}/tokens`

Generate a Connect token to use for client-side authentication

## Headers

- `x-pd-environment` 'development' | 'production', required — The environment in which the server client is running

## Request body

- CreateTokenOpts — Request object for creating a connect token
  - `allowed_origins` string[] — List of allowed origins for CORS
  - `error_redirect_uri` string — URI to redirect to on error
  - `expires_in` integer — Token TTL in seconds (max 14400 = 4 hours). Defaults to 4 hours if not specified.
  - `external_user_id` string, required — Your end user ID, for whom you're creating the token
  - `scope` string — Space-separated scopes to restrict token permissions. Defaults to 'connect:*' if not specified. See https://pipedream.com/docs/connect/api-reference/authentication#connect-token-scopes for more information.
  - `success_redirect_uri` string — URI to redirect to on success
  - `webhook_uri` string — Webhook URI for notifications
  - `allow_progressive_scopes` boolean — When true, end users may authorize a subset of the app's OAuth scopes; only the app's functional scopes (needed for the post-OAuth test request) are enforced. Defaults to false.

## Response `200`

connect token created

- CreateTokenResponse — Response received after creating a connect token
  - `connect_link_url` string, required — The Connect Link URL
  - `expires_at` string, date-time, required — The expiration time of the token in ISO 8601 format
  - `token` string, required — An authentication token with a limited lifespan

## Other responses

- `429` — too many requests

---

[API](https://skmtc.net/pipedream/apis/pipedream-rest-api.md) · [All operations](https://skmtc.net/pipedream/apis/pipedream-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pipedream/pipedream-rest-api/versions/c25dbf225c49/schema)
