---
title: "Create Customer Authentication Token"
method: POST
path: "/v1/customer/{customer_id}/token"
---

# Create Customer Authentication Token

`POST /v1/customer/{customer_id}/token`

Create a @Connect authentication token for a customer. This token can be used to embed @Connect in your application via the `@openint/connect` npm package.

## Path parameters

- `customer_id` string, required — The unique ID of the customer to create the token for

## Request body

- object
  - `validity_in_seconds` number — How long the publishable token and magic link url will be valid for (in seconds) before it expires. By default it will be valid for 30 days unless otherwise specified.
  - `connect_options` object
    - `return_url` string — Optional URL to return customers after adding a connection or if they press the Return To Organization button
    - `connector_names` CoreConnectorName[] — The names of the connectors to show in the connect page. If not provided, all connectors will be shown
    - `view` 'add' | 'manage' — The default view to show when the magic link is opened. If omitted, by default it will smartly load the right view based on whether the user has connections or not
    - `auto_connect` 'acme-apikey' | 'acme-oauth2' | 'apollo' | 'asana' | 'bigquery' | 'box' | 'calendly' | 'confluence' | 'databricks' | 'discord' | 'dropbox' | 'figma' | 'github' | 'google-calendar' | 'google-docs' | 'google-drive' | 'google-mail' | 'google-sheet' | 'hubspot' | 'instagram' | 'jira' | 'linear' | 'monday' | 'notion' | 'onedrive' | 'outlook' | 'plaid' | 'postgres' | 'resend' | 'salesforce' | 'sendgrid' | 'sharepoint' | 'slack' | 'slack-agent' | 'slack-agent-builder' | 'slack-deployed-agent' | 'snowflake' | 'spotify' | 'stripe' | 'stripe-agent-sandbox' | 'twilio' | 'workato' | 'youtube' | 'zendesk' | 'zoom'
    - `debug` boolean — Whether to enable debug mode
    - `is_embedded` boolean — Whether to enable embedded mode. Embedded mode hides the side bar with extra context for the end user (customer) on the organization
    - `hide_navigation` boolean — Whether to hide the navigation bar. This is useful for hardcoding to a particular view.
    - `theme` 'light' | 'dark' — The theme to use for the connect page. Defaults to light if not specified.

## Response `200`

Successful response

- object
  - `token` string, required — A short-lived publishable authentication token to use for customer api requests from the frontend. This token by default expires in 30 days unless otherwise specified via the validity_in_seconds parameter.
  - `magic_link_url` string, required — A link that can be shared with customers to use @Connect in any browser. This link will expire in 30 days by default unless otherwise specified via the validity_in_seconds parameter.
  - `api_key` string, nullable, required — A long-lived customer API key to use for API requests. Not meant to be published to the frontend.

## Other responses

- `400` — Invalid input data
- `401` — Authorization not provided
- `403` — Insufficient access
- `500` — Internal server error

---

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