Verify that an action call comes from Botello
Every API action call is signed with your workspace’s secret. Verify the signature to reject any call that does not come from Botello.
- Plans
- All plans
- Roles
- Owner, Admin
- In the admin
- Integrations › Developers › Signed action calls
Your API receives Botello action calls from the internet. Authentication (key, token) proves the caller knows your secret; the signature also proves that the request was built by Botello, at that moment, for that method and route, and that it has not been modified. Every action call is signed, with no setup on your side.
An API that writes (booking, ticket, cancellation), or that exposes customer data: reject any unsigned call.
Before you start
- You have at least one API action.
- You are an Owner or Admin of the workspace.
- Your server can read the method, the path with query string as received, and the raw body.
The signature headers
Every call carries:
| Header | Content |
|---|---|
X-Botello-Timestamp | The time of the call, in Unix seconds |
X-Botello-Request-Id | A unique ID for the call, req_ followed by 32 hexadecimal characters |
X-Botello-Signature | sha256= followed by the hex-encoded HMAC-SHA256 of the signed string |
The signed string is:
<timestamp>.<METHOD>.<path>?<query>.<body><timestamp>: the value ofX-Botello-Timestamp;<METHOD>: uppercase,GET,POST,PUT,PATCHorDELETE;<path>?<query>: the path and query string of the called URL, as sent (encoding included), without the domain. With no query, the path alone, without?;<body>: the raw JSON body. ForGETandDELETE, it is empty: the signed string then ends with a dot.
The HMAC key is your workspace signing secret, which starts with botsig_. It is the same for all actions in the workspace.
Example of a signed string for a call to GET https://api.exemple.ch/orders/1001?email=jeanne%40example.com:
1791364200.GET./orders/1001?email=jeanne%40example.com.Method and route are signed
A captured request cannot be replayed on another route, with another method, or later: the timestamp is part of the signed string.
Get the secret
Open the Developers page
Open Integrations, then on the Developers card, click Configure. Scroll down to the Signed action calls section.
Show the secret
In Signed action calls, click Show the secret. Copy it into your server configuration, for example into the BOTELLO_ACTION_SECRET variable. Each reveal is recorded in the audit log.

Verify in your API
Add the verification below in front of the routes Botello calls. Reject with 401 any call whose signature is missing, invalid or too old.
Verification code
import express from 'express';
import crypto from 'node:crypto';
const SECRET = process.env.BOTELLO_ACTION_SECRET; // "botsig_…"
const TOLERANCE_SECONDS = 300;
const app = express();
// Keep the raw body next to the parsed one.
app.use(express.json({ verify: (req, _res, buf) => { req.rawBody = buf.toString('utf8'); } }));
function verifyBotelloCall(req, res, next) {
const timestamp = Number(req.get('X-Botello-Timestamp'));
if (!Number.isFinite(timestamp) || Math.abs(Date.now() / 1000 - timestamp) > TOLERANCE_SECONDS) {
return res.sendStatus(401);
}
// req.originalUrl = path + query exactly as received (not rewritten by routers).
const signed = `${timestamp}.${req.method.toUpperCase()}.${req.originalUrl}.${req.rawBody ?? ''}`;
const expected = 'sha256=' + crypto.createHmac('sha256', SECRET).update(signed).digest('hex');
const given = req.get('X-Botello-Signature') ?? '';
const a = Buffer.from(given);
const b = Buffer.from(expected);
if (a.length !== b.length || !crypto.timingSafeEqual(a, b)) return res.sendStatus(401);
next();
}
app.get('/orders/:number', verifyBotelloCall, (req, res) => {
res.json({ order: { status: 'shipped', carrier: 'La Poste' } });
});
app.post('/bookings', verifyBotelloCall, (req, res) => {
res.status(201).json({ booking: { id: 'BK-1A2B3C', date: req.body.date, status: 'confirmed' } });
});
app.listen(3000);Behind a proxy or gateway
If a proxy rewrites the path before it reaches your application (prefix removed, /api added), the signature no longer matches. Verify against the path as Botello called it, the one in the action’s URL.
Renew the secret
In Signed action calls, click Renew and confirm. Subsequent calls are signed immediately with the new secret: unlike webhooks, there is no overlap period. Between the click and the update of your API, calls signed with the new secret are rejected. To shrink that window:
- Prepare your API to accept a list of secrets: accept the call if the signature matches any of them.
- At a quiet time, click Renew, copy the new secret and add it to the list, next to the old one. Deploy.
- Remove the old secret from the list.
The secret is created automatically on the first action call: an action call is always signed.
Troubleshooting
| What you see | Likely cause | Fix |
|---|---|---|
Signature always invalid on POST | The body was decoded then re-encoded | Sign the raw body (Express verify, php://input) |
| Signature invalid when the URL has special characters | The path used is decoded (%40 turned into @) | Use the raw target (req.originalUrl, REQUEST_URI, RAW_URI) |
Signature invalid on GET | The trailing dot is missing | For an empty body, the signed string ends with . |
| Signature invalid after a renewal | The API still uses the old secret | Set the new secret, or accept both during the switch |
| Signature invalid “now and then” | Your server’s clock is off | Synchronize the time (NTP) |
| The API key appears in the signed string | Your key is sent in the URL (The URL) | Expected: the signature covers the final URL. Prefer a key in a header |
Frequently asked questions
Learn more
Authenticate the calls of an API action
Choose how Botello identifies itself to your API, from a Bearer token to OAuth 2, with encrypted secrets bound to the domain.
Test webhooks and actions with the sandbox
Create a private fake store that receives your webhooks, checks their signature and answers your API actions, with nothing to install.