import { Kombo } from "@kombo-api/sdk";
const kombo = new Kombo({
api_key: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await kombo.general.createReconnectionLink({
integration_id: "personio:93fCvorjZ2jas7ZekX1V1n5d",
body: {
scope_config_id: "9Pv6aCFwNDEzPNmwjSsY9SQx",
},
});
console.log(result);
}
run();require 'kombo'
Models = ::Kombo::Models
s = ::Kombo::Kombo.new(
security: Models::Shared::Security.new(
api_key: '<YOUR_BEARER_TOKEN_HERE>'
)
)
res = s.general.create_reconnection_link(integration_id: 'personio:93fCvorjZ2jas7ZekX1V1n5d', body: Models::Shared::PostIntegrationsIntegrationIdRelinkRequestBody.new(
scope_config_id: '9Pv6aCFwNDEzPNmwjSsY9SQx'
))
unless res.post_integrations_integration_id_relink_positive_response.nil?
# handle response
endfrom kombo import Kombo
with Kombo(
api_key="<YOUR_BEARER_TOKEN_HERE>",
) as k_client:
res = k_client.general.create_reconnection_link(integration_id="personio:93fCvorjZ2jas7ZekX1V1n5d", language="en", scope_config_id="9Pv6aCFwNDEzPNmwjSsY9SQx", link_type="EMBEDDED")
# Handle response
print(res)curl --request POST \
--url https://api.kombo.dev/v1/integrations/{integration_id}/relink \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"language": "en",
"scope_config_id": "9Pv6aCFwNDEzPNmwjSsY9SQx",
"link_type": "EMBEDDED"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
language: 'en',
scope_config_id: '9Pv6aCFwNDEzPNmwjSsY9SQx',
link_type: 'EMBEDDED'
})
};
fetch('https://api.kombo.dev/v1/integrations/{integration_id}/relink', 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.kombo.dev/v1/integrations/{integration_id}/relink",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'language' => 'en',
'scope_config_id' => '9Pv6aCFwNDEzPNmwjSsY9SQx',
'link_type' => 'EMBEDDED'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kombo.dev/v1/integrations/{integration_id}/relink"
payload := strings.NewReader("{\n \"language\": \"en\",\n \"scope_config_id\": \"9Pv6aCFwNDEzPNmwjSsY9SQx\",\n \"link_type\": \"EMBEDDED\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kombo.dev/v1/integrations/{integration_id}/relink")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"language\": \"en\",\n \"scope_config_id\": \"9Pv6aCFwNDEzPNmwjSsY9SQx\",\n \"link_type\": \"EMBEDDED\"\n}")
.asString();Create reconnection link
Create a link that will allow the user to reconnect an integration. This is useful if you want to allow your users to update the credentials if the old ones for example expired.
import { Kombo } from "@kombo-api/sdk";
const kombo = new Kombo({
api_key: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await kombo.general.createReconnectionLink({
integration_id: "personio:93fCvorjZ2jas7ZekX1V1n5d",
body: {
scope_config_id: "9Pv6aCFwNDEzPNmwjSsY9SQx",
},
});
console.log(result);
}
run();require 'kombo'
Models = ::Kombo::Models
s = ::Kombo::Kombo.new(
security: Models::Shared::Security.new(
api_key: '<YOUR_BEARER_TOKEN_HERE>'
)
)
res = s.general.create_reconnection_link(integration_id: 'personio:93fCvorjZ2jas7ZekX1V1n5d', body: Models::Shared::PostIntegrationsIntegrationIdRelinkRequestBody.new(
scope_config_id: '9Pv6aCFwNDEzPNmwjSsY9SQx'
))
unless res.post_integrations_integration_id_relink_positive_response.nil?
# handle response
endfrom kombo import Kombo
with Kombo(
api_key="<YOUR_BEARER_TOKEN_HERE>",
) as k_client:
res = k_client.general.create_reconnection_link(integration_id="personio:93fCvorjZ2jas7ZekX1V1n5d", language="en", scope_config_id="9Pv6aCFwNDEzPNmwjSsY9SQx", link_type="EMBEDDED")
# Handle response
print(res)curl --request POST \
--url https://api.kombo.dev/v1/integrations/{integration_id}/relink \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"language": "en",
"scope_config_id": "9Pv6aCFwNDEzPNmwjSsY9SQx",
"link_type": "EMBEDDED"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
language: 'en',
scope_config_id: '9Pv6aCFwNDEzPNmwjSsY9SQx',
link_type: 'EMBEDDED'
})
};
fetch('https://api.kombo.dev/v1/integrations/{integration_id}/relink', 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.kombo.dev/v1/integrations/{integration_id}/relink",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'language' => 'en',
'scope_config_id' => '9Pv6aCFwNDEzPNmwjSsY9SQx',
'link_type' => 'EMBEDDED'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kombo.dev/v1/integrations/{integration_id}/relink"
payload := strings.NewReader("{\n \"language\": \"en\",\n \"scope_config_id\": \"9Pv6aCFwNDEzPNmwjSsY9SQx\",\n \"link_type\": \"EMBEDDED\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kombo.dev/v1/integrations/{integration_id}/relink")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"language\": \"en\",\n \"scope_config_id\": \"9Pv6aCFwNDEzPNmwjSsY9SQx\",\n \"link_type\": \"EMBEDDED\"\n}")
.asString();Example Request Body
{
"language": "en",
"scope_config_id": "9Pv6aCFwNDEzPNmwjSsY9SQx",
"link_type": "EMBEDDED"
}
Authorizations
Path Parameters
POST /integrations/:integration_id/relink Parameter
Body
POST /integrations/:integration_id/relink Request body
Language of the connection flow UI.
en, de, fr, it, es Specify a scope config which the integration will start using once the reconnection flow has been completed.
This can be useful if you want to update the permissions of an integration, but only want the change to take effect once the user has updated their API credentials to prevent sync issues.
The type of link you want to create. EMBEDDED is for the embedded flow using the Kombo Connect SDK (these links are valid for 1 hour) and MAGIC_LINK is for magic links which you send out manually to customers (there are valid for 1 year).
This defaults to EMBEDDED, which is our recommended method of implementing the connection flow for a seamless user experience.
EMBEDDED, MAGIC_LINK Was this page helpful?