POST
/
v1
/
connect
/
{project_id}
/
tokens
cURL
curl --request POST \
  --url https://api.pipedream.com/v1/connect/{project_id}/tokens \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-pd-environment: <x-pd-environment>' \
  --data '{
  "allowed_origins": [
    "<string>"
  ],
  "error_redirect_uri": "<string>",
  "external_user_id": "<string>",
  "success_redirect_uri": "<string>",
  "webhook_uri": "<string>"
}'
{
  "connect_link_url": "<string>",
  "expires_at": "2023-11-07T05:31:56Z",
  "token": "<string>"
}
Your app will initiate the account connection flow for your end users in your frontend. To securely scope connection to a specific end user, on your server, you retrieve a short-lived token for that user, and return that token to your frontend. See the Connect tokens docs for more information. When using the Connect API to make requests from a client environment like a browser, you must specify the allowed origins for the token. Otherwise, this field is optional. This is a list of URLs that are allowed to make requests with the token. For example:
{
  "allowed_origins": ["https://myapp.com"]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

x-pd-environment
enum<string>
required

The environment in which the server client is running

Available options:
development,
production

Path Parameters

project_id
string
required

The project ID, which starts with 'proj_'.

Body

application/json

Request object for creating a connect token

Response

200 - application/json

connect token created

Response received after creating a connect token