POST
/
connectTokens
Create a connectToken
curl --request POST \
  --url https://backendapi.corbado.io/v2/connectTokens \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "passkey-append",
  "data": {
    "displayName": "Jane Doe",
    "identifier": "jane@doe.com"
  },
  "maxLifetimeInSeconds": 3600
}'
{
  "id": "ctk-940364795071150919",
  "tokenType": "passkey-append",
  "data": {
    "displayName": "Jane Doe",
    "identifier": "jane@doe.com"
  },
  "connectTokenStatus": "initial",
  "secret": "ctk1_sxmexzS7RFBaJSA4V4kBFPs45bkxMK",
  "expires": 1752749184
}

Authorizations

Authorization
string
header
required

Basic authentication is used to authenticate requests to the Backend API. The username is the project ID and the password is the API secret.

The project ID and API secret can be found in the Developer Panel.

Body

application/json
type
enum<string>
required
Available options:
passkey-append,
passkey-delete,
passkey-list,
passkey-login
data
object
required

Data for passkey-append.

maxLifetimeInSeconds
integer

Maximum lifetime of the connectToken in seconds.

Example:

3600

Response

ConnectToken has been created.

id
string
required

Unique identifier of the connectToken.

Example:

"ctk-940364795071150919"

tokenType
enum<string>
required
Available options:
passkey-append,
passkey-delete,
passkey-list,
passkey-login
data
object
required

Data for passkey-append.

connectTokenStatus
enum<string>
required
Available options:
initial,
consumed
expires
integer
required

Unix time of when the connectToken expires (in seconds elapsed since January 1, 1970, 00:00:00 UTC).

Example:

1752749184

secret
string

Secret of the connectToken.

Example:

"ctk1_sxmexzS7RFBaJSA4V4kBFPs45bkxMK"