cURL
curl --request GET \
--url https://public-api.kiwify.com/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'x-kiwify-account-id: <api-key>'import requests
url = "https://public-api.kiwify.com/v1/webhooks"
headers = {
"x-kiwify-account-id": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-kiwify-account-id': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://public-api.kiwify.com/v1/webhooks', 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://public-api.kiwify.com/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-kiwify-account-id: <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://public-api.kiwify.com/v1/webhooks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-kiwify-account-id", "<api-key>")
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.get("https://public-api.kiwify.com/v1/webhooks")
.header("x-kiwify-account-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.kiwify.com/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-kiwify-account-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"pagination": {
"count": 10,
"page_number": 1,
"page_size": 10
},
"data": [
{
"id": "c2be7f8e-b373-4eb7-b623-16ce98d5ed44",
"name": "meu webhook",
"url": "https://webhook.site/73d28a2b-6c48-41e0-a8ad-0d5ef748ce41",
"products": "all",
"triggers": [
"boleto_gerado",
"pix_gerado",
"carrinho_abandonado",
"compra_recusada",
"compra_aprovada",
"compra_reembolsada",
"chargeback",
"subscription_canceled",
"subscription_late",
"subscription_renewed"
],
"token": "rxue90njjv1",
"created_at": "2023-11-24T10:06:47.540Z",
"updated_at": "2023-11-24T10:06:47.540Z"
}
]
}{
"error": "auth_error",
"message": "Invalid token: access token is invalid"
}Webhooks
Listar webhooks
Obtenha uma lista de todos webhooks.
GET
/
webhooks
cURL
curl --request GET \
--url https://public-api.kiwify.com/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'x-kiwify-account-id: <api-key>'import requests
url = "https://public-api.kiwify.com/v1/webhooks"
headers = {
"x-kiwify-account-id": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-kiwify-account-id': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://public-api.kiwify.com/v1/webhooks', 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://public-api.kiwify.com/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-kiwify-account-id: <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://public-api.kiwify.com/v1/webhooks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-kiwify-account-id", "<api-key>")
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.get("https://public-api.kiwify.com/v1/webhooks")
.header("x-kiwify-account-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.kiwify.com/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-kiwify-account-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"pagination": {
"count": 10,
"page_number": 1,
"page_size": 10
},
"data": [
{
"id": "c2be7f8e-b373-4eb7-b623-16ce98d5ed44",
"name": "meu webhook",
"url": "https://webhook.site/73d28a2b-6c48-41e0-a8ad-0d5ef748ce41",
"products": "all",
"triggers": [
"boleto_gerado",
"pix_gerado",
"carrinho_abandonado",
"compra_recusada",
"compra_aprovada",
"compra_reembolsada",
"chargeback",
"subscription_canceled",
"subscription_late",
"subscription_renewed"
],
"token": "rxue90njjv1",
"created_at": "2023-11-24T10:06:47.540Z",
"updated_at": "2023-11-24T10:06:47.540Z"
}
]
}{
"error": "auth_error",
"message": "Invalid token: access token is invalid"
}Autorizações
The access token received from the authorization server in the OAuth 2.0 flow.
⌘I
