Bunny Stream encoding-status webhook
curl --request POST \
--url https://your-site.com/api/storage-bunny/stream/webhook \
--header 'Content-Type: application/json' \
--header 'X-BunnyStream-Signature: <x-bunnystream-signature>' \
--header 'X-BunnyStream-Signature-Algorithm: <x-bunnystream-signature-algorithm>' \
--header 'X-BunnyStream-Signature-Version: <x-bunnystream-signature-version>' \
--data '
{
"Status": 123,
"VideoGuid": "<string>",
"VideoLibraryId": 123
}
'import requests
url = "https://your-site.com/api/storage-bunny/stream/webhook"
payload = {
"Status": 123,
"VideoGuid": "<string>",
"VideoLibraryId": 123
}
headers = {
"X-BunnyStream-Signature": "<x-bunnystream-signature>",
"X-BunnyStream-Signature-Version": "<x-bunnystream-signature-version>",
"X-BunnyStream-Signature-Algorithm": "<x-bunnystream-signature-algorithm>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-BunnyStream-Signature': '<x-bunnystream-signature>',
'X-BunnyStream-Signature-Version': '<x-bunnystream-signature-version>',
'X-BunnyStream-Signature-Algorithm': '<x-bunnystream-signature-algorithm>',
'Content-Type': 'application/json'
},
body: JSON.stringify({Status: 123, VideoGuid: '<string>', VideoLibraryId: 123})
};
fetch('https://your-site.com/api/storage-bunny/stream/webhook', 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://your-site.com/api/storage-bunny/stream/webhook",
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([
'Status' => 123,
'VideoGuid' => '<string>',
'VideoLibraryId' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-BunnyStream-Signature: <x-bunnystream-signature>",
"X-BunnyStream-Signature-Algorithm: <x-bunnystream-signature-algorithm>",
"X-BunnyStream-Signature-Version: <x-bunnystream-signature-version>"
],
]);
$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://your-site.com/api/storage-bunny/stream/webhook"
payload := strings.NewReader("{\n \"Status\": 123,\n \"VideoGuid\": \"<string>\",\n \"VideoLibraryId\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-BunnyStream-Signature", "<x-bunnystream-signature>")
req.Header.Add("X-BunnyStream-Signature-Version", "<x-bunnystream-signature-version>")
req.Header.Add("X-BunnyStream-Signature-Algorithm", "<x-bunnystream-signature-algorithm>")
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://your-site.com/api/storage-bunny/stream/webhook")
.header("X-BunnyStream-Signature", "<x-bunnystream-signature>")
.header("X-BunnyStream-Signature-Version", "<x-bunnystream-signature-version>")
.header("X-BunnyStream-Signature-Algorithm", "<x-bunnystream-signature-algorithm>")
.header("Content-Type", "application/json")
.body("{\n \"Status\": 123,\n \"VideoGuid\": \"<string>\",\n \"VideoLibraryId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-site.com/api/storage-bunny/stream/webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-BunnyStream-Signature"] = '<x-bunnystream-signature>'
request["X-BunnyStream-Signature-Version"] = '<x-bunnystream-signature-version>'
request["X-BunnyStream-Signature-Algorithm"] = '<x-bunnystream-signature-algorithm>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"Status\": 123,\n \"VideoGuid\": \"<string>\",\n \"VideoLibraryId\": 123\n}"
response = http.request(request)
puts response.read_bodyAPI reference
Bunny Stream encoding-status webhook
Receives encoding-status callbacks from Bunny Stream. On completion (with mp4Fallback enabled) the plugin fills in bunnyData.stream.resolutions. Authenticated by an HMAC signature, not a Payload session. Set the webhook URL in your Bunny Stream library to this path. See Webhooks.
POST
/
api
/
storage-bunny
/
stream
/
webhook
Bunny Stream encoding-status webhook
curl --request POST \
--url https://your-site.com/api/storage-bunny/stream/webhook \
--header 'Content-Type: application/json' \
--header 'X-BunnyStream-Signature: <x-bunnystream-signature>' \
--header 'X-BunnyStream-Signature-Algorithm: <x-bunnystream-signature-algorithm>' \
--header 'X-BunnyStream-Signature-Version: <x-bunnystream-signature-version>' \
--data '
{
"Status": 123,
"VideoGuid": "<string>",
"VideoLibraryId": 123
}
'import requests
url = "https://your-site.com/api/storage-bunny/stream/webhook"
payload = {
"Status": 123,
"VideoGuid": "<string>",
"VideoLibraryId": 123
}
headers = {
"X-BunnyStream-Signature": "<x-bunnystream-signature>",
"X-BunnyStream-Signature-Version": "<x-bunnystream-signature-version>",
"X-BunnyStream-Signature-Algorithm": "<x-bunnystream-signature-algorithm>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-BunnyStream-Signature': '<x-bunnystream-signature>',
'X-BunnyStream-Signature-Version': '<x-bunnystream-signature-version>',
'X-BunnyStream-Signature-Algorithm': '<x-bunnystream-signature-algorithm>',
'Content-Type': 'application/json'
},
body: JSON.stringify({Status: 123, VideoGuid: '<string>', VideoLibraryId: 123})
};
fetch('https://your-site.com/api/storage-bunny/stream/webhook', 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://your-site.com/api/storage-bunny/stream/webhook",
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([
'Status' => 123,
'VideoGuid' => '<string>',
'VideoLibraryId' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-BunnyStream-Signature: <x-bunnystream-signature>",
"X-BunnyStream-Signature-Algorithm: <x-bunnystream-signature-algorithm>",
"X-BunnyStream-Signature-Version: <x-bunnystream-signature-version>"
],
]);
$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://your-site.com/api/storage-bunny/stream/webhook"
payload := strings.NewReader("{\n \"Status\": 123,\n \"VideoGuid\": \"<string>\",\n \"VideoLibraryId\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-BunnyStream-Signature", "<x-bunnystream-signature>")
req.Header.Add("X-BunnyStream-Signature-Version", "<x-bunnystream-signature-version>")
req.Header.Add("X-BunnyStream-Signature-Algorithm", "<x-bunnystream-signature-algorithm>")
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://your-site.com/api/storage-bunny/stream/webhook")
.header("X-BunnyStream-Signature", "<x-bunnystream-signature>")
.header("X-BunnyStream-Signature-Version", "<x-bunnystream-signature-version>")
.header("X-BunnyStream-Signature-Algorithm", "<x-bunnystream-signature-algorithm>")
.header("Content-Type", "application/json")
.body("{\n \"Status\": 123,\n \"VideoGuid\": \"<string>\",\n \"VideoLibraryId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-site.com/api/storage-bunny/stream/webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-BunnyStream-Signature"] = '<x-bunnystream-signature>'
request["X-BunnyStream-Signature-Version"] = '<x-bunnystream-signature-version>'
request["X-BunnyStream-Signature-Algorithm"] = '<x-bunnystream-signature-algorithm>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"Status\": 123,\n \"VideoGuid\": \"<string>\",\n \"VideoLibraryId\": 123\n}"
response = http.request(request)
puts response.read_bodyHeaders
Lowercase-hex HMAC-SHA256 of the exact raw request body, keyed by the library's Read-Only API key (stream.webhook.secret).
Signature scheme version. Must be v1.
Available options:
v1 Signature algorithm. Must be hmac-sha256.
Available options:
hmac-sha256 Body
application/json
Response
Acknowledged.