Skip to content

Make your first request ​

List the first three events in your test environment. Set your key as an environment variable, then run a snippet. Requests go to https://api.vabu.live/v1.

sh
export VABU_API_KEY="vk_test_..."

Each request sends:

HeaderValueRequired
AuthorizationBearer <secret or restricted key>Yes
Vabu-VersionA dated version such as 2026-11-01. Leave it out to use your tenant's pinned version.No
Idempotency-KeyA unique string, on POST, PATCH and DELETE. See idempotency.On requests that move money
sh
curl "https://api.vabu.live/v1/events?limit=3" \
  -H "Authorization: Bearer $VABU_API_KEY"
ts
const res = await fetch('https://api.vabu.live/v1/events?limit=3', {
  headers: { Authorization: `Bearer ${process.env.VABU_API_KEY}` },
})

const body = await res.json()
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message} (${body.error.request_id})`)

for (const event of body.data) console.log(event.id)
php
<?php

$ch = curl_init('https://api.vabu.live/v1/events?limit=3');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('VABU_API_KEY')],
]);

$body = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}

foreach ($body['data'] as $event) {
    echo $event['id'], PHP_EOL;
}
python
import os
import requests

res = requests.get(
    "https://api.vabu.live/v1/events",
    params={"limit": 3},
    headers={"Authorization": f"Bearer {os.environ['VABU_API_KEY']}"},
    timeout=30,
)
body = res.json()
if not res.ok:
    raise RuntimeError(f"{body['error']['code']}: {body['error']['message']}")

for event in body["data"]:
    print(event["id"])
go
package main

import (
	"encoding/json"
	"fmt"
	"net/http"
	"os"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.vabu.live/v1/events?limit=3", nil)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("VABU_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	var body struct {
		Data  []struct{ ID string `json:"id"` } `json:"data"`
		Error *struct{ Code, Message string }   `json:"error"`
	}
	json.NewDecoder(res.Body).Decode(&body)
	if body.Error != nil {
		panic(body.Error.Code + ": " + body.Error.Message)
	}
	for _, e := range body.Data {
		fmt.Println(e.ID)
	}
}

A successful response looks like this:

json
{
  "data": [
    { "id": "evt_01JB3K...", "object": "event", "livemode": false, "created_at": "2026-11-02T18:30:05Z" }
  ],
  "meta": {
    "pagination": { "limit": 3, "has_more": true, "next_cursor": "c_eyJ...", "prev_cursor": null }
  }
}

If you get a 401, check that the key starts with vk_test_ and that you copied all of it. For anything else, see read responses and errors.

Vabu OS documentation