Python (SDK)
from meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.agent_connectors.delete_agent_connector(id="<id>", connector_id="<id>")
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.agentConnectors.deleteAgentConnector({
id: "<id>",
connectorId: "<id>",
});
console.log(result);
}
run();using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.AgentConnectors.DeleteAgentConnectorAsync(
id: "<id>",
connectorId: "<id>"
);
// handle responsecurl --request DELETE \
--url https://apigw.mka1.com/api/v1/agents/{id}/connectors/{connectorId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apigw.mka1.com/api/v1/agents/{id}/connectors/{connectorId}', 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://apigw.mka1.com/api/v1/agents/{id}/connectors/{connectorId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://apigw.mka1.com/api/v1/agents/{id}/connectors/{connectorId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://apigw.mka1.com/api/v1/agents/{id}/connectors/{connectorId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/agents/{id}/connectors/{connectorId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "agent.connector.deleted",
"id": "<string>",
"deleted": true
}{
"error": {
"message": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"details": "<string>"
}
}Agent Connectors
Eliminar un conector
Anula el webhook del proveedor, descarta sus actualizaciones pendientes de Telegram y elimina las credenciales del conector almacenadas.
DELETE
/
api
/
v1
/
agents
/
{id}
/
connectors
/
{connectorId}
Python (SDK)
from meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.agent_connectors.delete_agent_connector(id="<id>", connector_id="<id>")
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.agentConnectors.deleteAgentConnector({
id: "<id>",
connectorId: "<id>",
});
console.log(result);
}
run();using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.AgentConnectors.DeleteAgentConnectorAsync(
id: "<id>",
connectorId: "<id>"
);
// handle responsecurl --request DELETE \
--url https://apigw.mka1.com/api/v1/agents/{id}/connectors/{connectorId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apigw.mka1.com/api/v1/agents/{id}/connectors/{connectorId}', 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://apigw.mka1.com/api/v1/agents/{id}/connectors/{connectorId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://apigw.mka1.com/api/v1/agents/{id}/connectors/{connectorId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://apigw.mka1.com/api/v1/agents/{id}/connectors/{connectorId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/agents/{id}/connectors/{connectorId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "agent.connector.deleted",
"id": "<string>",
"deleted": true
}{
"error": {
"message": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"details": "<string>"
}
}Autorizaciones
Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
Encabezados
Optional external end-user identifier forwarded by the API gateway.
¿Esta página le ayudó?
⌘I