Wait for bot execution to complete
curl --request GET \
--url https://www.lilbots.io/api/webhooks/{triggerId}/trigger/invocation/{invocationId}/sync \
--header 'X-Key: <api-key>'import requests
url = "https://www.lilbots.io/api/webhooks/{triggerId}/trigger/invocation/{invocationId}/sync"
headers = {"X-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Key': '<api-key>'}};
fetch('https://www.lilbots.io/api/webhooks/{triggerId}/trigger/invocation/{invocationId}/sync', 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://www.lilbots.io/api/webhooks/{triggerId}/trigger/invocation/{invocationId}/sync",
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-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://www.lilbots.io/api/webhooks/{triggerId}/trigger/invocation/{invocationId}/sync"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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://www.lilbots.io/api/webhooks/{triggerId}/trigger/invocation/{invocationId}/sync")
.header("X-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.lilbots.io/api/webhooks/{triggerId}/trigger/invocation/{invocationId}/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"outputs": [
{
"title": "Result",
"message": "Operation completed successfully"
}
]
}API Reference
Wait for Bot Execution
Synchronously wait for a bot execution to complete and get its outputs. This endpoint will wait until the bot has finished executing or times out after 5 minutes.
GET
/
webhooks
/
{triggerId}
/
trigger
/
invocation
/
{invocationId}
/
sync
Wait for bot execution to complete
curl --request GET \
--url https://www.lilbots.io/api/webhooks/{triggerId}/trigger/invocation/{invocationId}/sync \
--header 'X-Key: <api-key>'import requests
url = "https://www.lilbots.io/api/webhooks/{triggerId}/trigger/invocation/{invocationId}/sync"
headers = {"X-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Key': '<api-key>'}};
fetch('https://www.lilbots.io/api/webhooks/{triggerId}/trigger/invocation/{invocationId}/sync', 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://www.lilbots.io/api/webhooks/{triggerId}/trigger/invocation/{invocationId}/sync",
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-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://www.lilbots.io/api/webhooks/{triggerId}/trigger/invocation/{invocationId}/sync"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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://www.lilbots.io/api/webhooks/{triggerId}/trigger/invocation/{invocationId}/sync")
.header("X-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.lilbots.io/api/webhooks/{triggerId}/trigger/invocation/{invocationId}/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"outputs": [
{
"title": "Result",
"message": "Operation completed successfully"
}
]
}Authorizations
The key associated with the trigger. This key is displayed when you view the trigger in the UI.
Path Parameters
The ID of the trigger
The ID of the bot invocation received from the trigger endpoint
⌘I