curl --request GET \
--url https://api.nekt.ai/api/v1/live-connections/{live_connection_slug}/setup-tokens/ \
--header 'x-api-key: <api-key>'import requests
url = "https://api.nekt.ai/api/v1/live-connections/{live_connection_slug}/setup-tokens/"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.nekt.ai/api/v1/live-connections/{live_connection_slug}/setup-tokens/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nekt.ai/api/v1/live-connections/{live_connection_slug}/setup-tokens/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nekt.ai/api/v1/live-connections/{live_connection_slug}/setup-tokens/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.nekt.ai/api/v1/live-connections/{live_connection_slug}/setup-tokens/")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nekt.ai/api/v1/live-connections/{live_connection_slug}/setup-tokens/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"purpose": "setup",
"created_at": "2023-11-07T05:31:56Z",
"created_by": 123,
"connector_config_fields": "<unknown>"
}
]List Setup Tokens
Setup links for a connection, so a third party fills in credentials in their own browser.
Create one to get a token, then send its recipient to {WEB_APP_URL}/lcl/{token}: they
configure the connection without a Nekt account, and the credentials never pass through
you. Optionally restrict what the link exposes with connector_config_fields, and have
the connection announce completion with its callback_webhook.
A link minted while the connection awaits setup (a draft) stops working once it is set up. A link minted for a connection already in use updates it: it keeps working until it expires, is deleted or the connection is archived, and a write through it must leave every required field filled.
The token is returned in clear text only when it is created, and is redacted on every later read. Managing setup links requires manager access on the connection — the token is a config-write capability, so listing links is as sensitive as creating one.
curl --request GET \
--url https://api.nekt.ai/api/v1/live-connections/{live_connection_slug}/setup-tokens/ \
--header 'x-api-key: <api-key>'import requests
url = "https://api.nekt.ai/api/v1/live-connections/{live_connection_slug}/setup-tokens/"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.nekt.ai/api/v1/live-connections/{live_connection_slug}/setup-tokens/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nekt.ai/api/v1/live-connections/{live_connection_slug}/setup-tokens/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nekt.ai/api/v1/live-connections/{live_connection_slug}/setup-tokens/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.nekt.ai/api/v1/live-connections/{live_connection_slug}/setup-tokens/")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nekt.ai/api/v1/live-connections/{live_connection_slug}/setup-tokens/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"purpose": "setup",
"created_at": "2023-11-07T05:31:56Z",
"created_by": 123,
"connector_config_fields": "<unknown>"
}
]Authorizations
API Key authentication. Format: 'x-api-key: api_key'
Path Parameters
The slug of the live connection
Response
Fixed at mint time from the connection's state. A setup link (minted while the connection awaits setup) stops working once that setup is over; an update link (minted for a connection already created) works until it expires, is deleted or the connection is archived.
setup- Setupupdate- Update
setup, update Restricts which connector config fields are visible/editable through this setup link. Same shape as the config: true/false, a list of field names, or a nested object. NULL means no restriction (the whole config template).
Was this page helpful?