Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

hostaway-webhooks

БесплатноЗапускает вложенные скриптыНе проверен

Receive and authenticate Hostaway webhooks. Use when setting up a Hostaway (vacation rental software) webhook endpoint, verifying the HTTP Basic auth login…

hookdeckот hookdeck★ 104 звезды на GitHub

Об этом скилле

Hostaway Webhooks

Hostaway sends a webhook when something changes in your account: a reservation is created or updated, a guest message arrives, a task changes. Webhooks are not signed. If you set a login and password on the webhook (Settings > Integrations, unified webhook, or the legacy reservation and message webhooks), Hostaway sends them as HTTP Basic auth, and your endpoint authenticates the request by checking the Authorization header.

Set a login and password on the Hostaway webhook. Webhooks without them send nothing to verify.

When to Use This Skill

  • How do I receive Hostaway webhooks?
  • How do I verify a Hostaway webhook? (HTTP Basic auth, there is no signature)
  • Why does my Hostaway webhook endpoint return 401?
  • How do I handle reservation.created, reservation.updated or message.received events?
  • Which HTTP method does Hostaway use for webhooks?

Verification (core)

const crypto = require('crypto');

const sha = (s) => crypto.createHash('sha256').update(s).digest(); // equal-length buffers
const safeEqual = (a, b) => crypto.timingSafeEqual(sha(a), sha(b));

function verifyHostawayRequest(headers, user = process.env.HOSTAWAY_WEBHOOK_USERNAME,
                               pass = process.env.HOSTAWAY_WEBHOOK_PASSWORD) {
  if (!user || !pass) return false;                          // never accept when unconfigured
  const m = /^basic +([A-Za-z0-9+/]+={0,2})$/i.exec((headers.authorization || '').trim());
  if (!m) return false;                                      // scheme is case-insensitive
  const buf = Buffer.from(m[1], 'base64');
  if (buf.toString('base64') !== m[1]) return false;         // strict: no junk after valid base64
  const text = buf.toString('utf8');
  const i = text.indexOf(':');                               // split on the FIRST colon
  if (i === -1) return false;
  const userOk = safeEqual(text.slice(0, i), user);          // evaluate both, no short-circuit
  const passOk = safeEqual(text.slice(i + 1), pass);
  return userOk && passOk;
}
  • Header: Authorization: Basic base64(username:password), built from the login and password you set on the webhook. Both are optional in Hostaway; without them there is nothing to verify.
  • Missing or malformed header, or a mismatch: return 401. Check the credential first, for every HTTP method, before reading the body.
  • Compare the username and the password each in constant time. Node: crypto.timingSafeEqual on equal-length buffers (SHA-256 digests here). Python: hmac.compare_digest on bytes (encode both sides; str raises on non-ASCII). Decode strictly (validate=True in Python) so valid credentials followed by junk are rejected.
  • A static shared credential authenticates the sender, not the body. There is no signature and no timestamp, so it gives no replay protection. Use HTTPS only, and rotate the login and password in Hostaway if they leak.
  • No 401 challenge (no WWW-Authenticate round trip), so the credentials must arrive with every request. Don't rely on the sender retrying with credentials after a challenge.
  • Read the body raw (express.raw({ type: '*/*' })) so any content type works, and parse it only after the check.

For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.

HTTP Methods and Body

Hostaway's docs don't name the HTTP method or the body format. The examples therefore accept GET, POST, PUT, PATCH and DELETE on the webhook route (Express app.all, a Next.js handler per method, FastAPI api_route), check the credential first for every method, and handle an empty body. Hookdeck's Hostaway source accepts only the methods you allow (custom methods), so any other method the sender uses must also be allowed on the source.

Event Types

Hostaway doesn't document the unified webhook body or which field carries the event name. Make a test direct booking under Reservations, capture the request, and route on the field you find there. Until then, log the top-level keys of any body you can't route. The API changelog says unified webhooks carry the Reservation object, and the help article says each request includes listingMapId.

Event Sent When
reservation.created A reservation is created
reservation.updated A reservation changes
message.received A guest message arrives
task.created A task is created
task.updated A task changes

Hostaway times out after 20 seconds and retries transient failures (connection errors, 5xx, 429) up to 3 times within about an hour; other 4xx responses are not retried. Events can arrive out of order and more than once, so acknowledge quickly and process idempotently. Only ports 80 and 443 are accepted.

Environment Variables

HOSTAWAY_WEBHOOK_USERNAME=your-webhook-lo
Полный SKILL.md на GitHub

Установить hostaway-webhooks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/express/.env.exampleexamples/express/README.mdexamples/express/package.jsonexamples/express/src/index.jsexamples/fastapi/.env.exampleexamples/fastapi/README.mdexamples/fastapi/main.pyexamples/fastapi/requirements.txtexamples/fastapi/test_webhook.pyexamples/nextjs/.env.exampleexamples/nextjs/README.mdexamples/nextjs/app/webhooks/hostaway/route.tsexamples/nextjs/lib/verify-hostaway.tsexamples/nextjs/package.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

FAQ

Что делает скилл hostaway-webhooks?

Receive and authenticate Hostaway webhooks. Use when setting up a Hostaway (vacation rental software) webhook endpoint, verifying the HTTP Basic auth login and password, debugging 401s, or handling events like reservation.created, reservation.updated, message.received, task.created and task.updated.

Как установить скилл hostaway-webhooks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл hostaway-webhooks запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить hostaway-webhooks с