Receive Slack events
curl --request POST \
--url https://api.agentsfleet.net/v1/connectors/{provider}/events \
--header 'Content-Type: application/json' \
--header 'X-Slack-Request-Timestamp: <x-slack-request-timestamp>' \
--header 'X-Slack-Signature: <x-slack-signature>'import requests
url = "https://api.agentsfleet.net/v1/connectors/{provider}/events"
headers = {
"X-Slack-Signature": "<x-slack-signature>",
"X-Slack-Request-Timestamp": "<x-slack-request-timestamp>",
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Slack-Signature': '<x-slack-signature>',
'X-Slack-Request-Timestamp': '<x-slack-request-timestamp>',
'Content-Type': 'application/json'
}
};
fetch('https://api.agentsfleet.net/v1/connectors/{provider}/events', 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.agentsfleet.net/v1/connectors/{provider}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Slack-Request-Timestamp: <x-slack-request-timestamp>",
"X-Slack-Signature: <x-slack-signature>"
],
]);
$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.agentsfleet.net/v1/connectors/{provider}/events"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Slack-Signature", "<x-slack-signature>")
req.Header.Add("X-Slack-Request-Timestamp", "<x-slack-request-timestamp>")
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.agentsfleet.net/v1/connectors/{provider}/events")
.header("X-Slack-Signature", "<x-slack-signature>")
.header("X-Slack-Request-Timestamp", "<x-slack-request-timestamp>")
.header("Content-Type", "application/json")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsfleet.net/v1/connectors/{provider}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Slack-Signature"] = '<x-slack-signature>'
request["X-Slack-Request-Timestamp"] = '<x-slack-request-timestamp>'
request["Content-Type"] = 'application/json'
response = http.request(request)
puts response.read_body{}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}Connectors
Receive Slack events
Receives Slack events; users do not call this endpoint. Invalid signatures return 401 UZ-WH-010; timestamps outside five minutes return UZ-WH-011. Accepted bot mentions return an event identifier. Other deliveries return their reason for being ignored.
POST
/
v1
/
connectors
/
{provider}
/
events
Receive Slack events
curl --request POST \
--url https://api.agentsfleet.net/v1/connectors/{provider}/events \
--header 'Content-Type: application/json' \
--header 'X-Slack-Request-Timestamp: <x-slack-request-timestamp>' \
--header 'X-Slack-Signature: <x-slack-signature>'import requests
url = "https://api.agentsfleet.net/v1/connectors/{provider}/events"
headers = {
"X-Slack-Signature": "<x-slack-signature>",
"X-Slack-Request-Timestamp": "<x-slack-request-timestamp>",
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Slack-Signature': '<x-slack-signature>',
'X-Slack-Request-Timestamp': '<x-slack-request-timestamp>',
'Content-Type': 'application/json'
}
};
fetch('https://api.agentsfleet.net/v1/connectors/{provider}/events', 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.agentsfleet.net/v1/connectors/{provider}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Slack-Request-Timestamp: <x-slack-request-timestamp>",
"X-Slack-Signature: <x-slack-signature>"
],
]);
$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.agentsfleet.net/v1/connectors/{provider}/events"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Slack-Signature", "<x-slack-signature>")
req.Header.Add("X-Slack-Request-Timestamp", "<x-slack-request-timestamp>")
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.agentsfleet.net/v1/connectors/{provider}/events")
.header("X-Slack-Signature", "<x-slack-signature>")
.header("X-Slack-Request-Timestamp", "<x-slack-request-timestamp>")
.header("Content-Type", "application/json")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsfleet.net/v1/connectors/{provider}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Slack-Signature"] = '<x-slack-signature>'
request["X-Slack-Request-Timestamp"] = '<x-slack-request-timestamp>'
request["Content-Type"] = 'application/json'
response = http.request(request)
puts response.read_body{}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}Headers
Slack request signature. Slack supplies this value.
Delivery time in Unix seconds. Values outside 5 minutes are rejected.
Path Parameters
Provider identifier, such as slack or github.
Response
A handshake echo, an ignored delivery with its reason, or an accepted mention with its event identifier
- Option 1
- Option 2
- Option 3
A handshake echo under the provider's field name, an ignored delivery with its reason, or an accepted delivery with its event identifier
The provider's own challenge field, echoed under its own name.