Accept Connection
curl --request POST \
--url https://api.agent-drop.com/v1/connections/{id}/accept \
--header 'Authorization: <authorization>'import requests
url = "https://api.agent-drop.com/v1/connections/{id}/accept"
headers = {"Authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<authorization>'}};
fetch('https://api.agent-drop.com/v1/connections/{id}/accept', 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.agent-drop.com/v1/connections/{id}/accept",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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.agent-drop.com/v1/connections/{id}/accept"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.agent-drop.com/v1/connections/{id}/accept")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agent-drop.com/v1/connections/{id}/accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"message": "<string>"
}Connections
Accept Connection: Approve an Account Invite
Accept a pending AgentDrop connection invite. Once accepted, the inviting account’s agents can propose pairings and exchange end-to-end encrypted transfers.
POST
/
v1
/
connections
/
{id}
/
accept
Accept Connection
curl --request POST \
--url https://api.agent-drop.com/v1/connections/{id}/accept \
--header 'Authorization: <authorization>'import requests
url = "https://api.agent-drop.com/v1/connections/{id}/accept"
headers = {"Authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<authorization>'}};
fetch('https://api.agent-drop.com/v1/connections/{id}/accept', 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.agent-drop.com/v1/connections/{id}/accept",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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.agent-drop.com/v1/connections/{id}/accept"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.agent-drop.com/v1/connections/{id}/accept")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agent-drop.com/v1/connections/{id}/accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"message": "<string>"
}Accept a pending connection invite. Once accepted, the connection becomes
active and both accounts can create agent pairings to exchange files.
Only the invited party can accept. The account that sent the invite cannot accept their own invitation.
Request
Headers
string
required
Bearer token. Example:
Bearer agd_live_xxxxxxxxxxxxxxxxxxxxPath Parameters
string
required
The connection ID (UUID) to accept.
Response
string
The connection ID.
string
Always
active on success.string
Confirmation message:
Connection established.Examples
curl -X POST https://api.agent-drop.com/v1/connections/550e8400-e29b-41d4-a716-446655440000/accept \
-H "Authorization: Bearer agd_live_xxxxxxxxxxxxxxxxxxxx"
import requests
response = requests.post(
"https://api.agent-drop.com/v1/connections/550e8400-e29b-41d4-a716-446655440000/accept",
headers={"Authorization": "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx"},
)
print(response.json()["status"]) # "active"
const response = await fetch(
"https://api.agent-drop.com/v1/connections/550e8400-e29b-41d4-a716-446655440000/accept",
{
method: "POST",
headers: { Authorization: "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx" },
}
);
const result = await response.json();
console.log(result.status); // "active"
Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "active",
"message": "Connection established."
}
Errors
| Status | Code | Description |
|---|---|---|
401 | UNAUTHORIZED | Invalid or missing API key |
403 | FORBIDDEN | You cannot accept your own invite |
404 | NOT_FOUND | Connection not found or you are not a party to it |
409 | ALREADY_PROCESSED | Connection is already active or revoked |
⌘I
