bayou-energy-webhooks
Receive and verify Bayou Energy (bayou.energy) utility-data webhooks, signed per the Standard Webhooks spec. Use when setting up a Bayou webhook endpoint…
от hookdeck★ 104 звезды на GitHub
Установить bayou-energy-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Bayou Energy Webhooks
Bayou Energy is a utility-data API that retrieves customers' utility bills and interval data. Its webhooks report new and updated bills, readiness of the initial bill and interval pulls, and credential status. Every delivery is signed per the Standard Webhooks spec.
When to Use This Skill
- How do I receive Bayou Energy webhooks?
- How do I verify a Bayou webhook signature?
- Where do I find my Bayou webhook signing secret?
- How do I handle
new_bill,bills_readyorintervals_readyevents? - How do I know when a customer must re-authenticate (
customer_must_reauthenticate)? - Why is my Bayou
webhook-signatureverification failing? - How do I dedupe Bayou webhook retries when the payload has no event ID?
Verification (core)
| Header | Value |
|---|---|
webhook-id |
Unique message ID |
webhook-timestamp |
Unix seconds when the webhook was sent |
webhook-signature |
One or more space-separated v1,<base64 HMAC-SHA256> entries |
Signed content is {webhook-id}.{webhook-timestamp}.{raw request body}. The key is the base64-decoded part of the secret after whsec_. There is one secret per company. The examples use the standardwebhooks library (npm, PyPI), which reads the three headers, tries every v1 entry in constant time and returns the parsed body.
const { Webhook } = require('standardwebhooks');
// rawBody: exact request body string, NOT re-serialised JSON.
// secret: the full "whsec_..." value from Settings in the Bayou dashboard.
function verifyBayouWebhook(rawBody, headers, secret = process.env.BAYOU_ENERGY_WEBHOOK_SECRET) {
return new Webhook(secret).verify(rawBody, {
'webhook-id': headers['webhook-id'],
'webhook-timestamp': headers['webhook-timestamp'],
'webhook-signature': headers['webhook-signature'],
}); // returns { event, object }; throws → respond 400
}
Python: from standardwebhooks.webhooks import Webhook, then Webhook(secret).verify(await request.body(), headers) (catch Exception, since malformed headers raise a plain ValueError).
Timestamp window. The library always enforces a fixed 5-minute window. Hookdeck retries and replays resend the original timestamp, so the library rejects a retry that arrives more than 5 minutes after the first attempt. If you receive through Hookdeck, use the manual verifier in references/verification.md, where the window can be dropped or widened.
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/. They read the
webhook-*headers and fall back tosvix-*whenwebhook-idis absent.
Event Envelope
{ "event": "customer_must_reauthenticate",
"object": { "id": 12345, "external_id": "MSCOTT123", "reason": "credentials_are_invalid",
"onboarding_token": "...", "onboarding_link": "https://bayou.energy/companies/12345/sign_up?key=..." } }
event sits beside object on every example. object is the bill or the customer, depending on the event. There is no event ID in the payload, so dedupe on the webhook-id header.
Common Event Types
The docs list seven webhooks (the list may not be exhaustive):
| Event | object |
Fired when |
|---|---|---|
new_bill |
Bill | A new bill was discovered |
updated_bill |
Bill | A bill was updated |
bills_ready |
Customer (bills_parsed) |
The initial bill discovery finished for a customer |
intervals_ready |
Customer (available_data) |
The initial interval discovery finished for a customer |
customer_has_filled_credentials |
Customer | A customer shared valid utility credentials |
new_unparsed_bill |
Bill (status: unparsed) |
A bill was discovered but couldn't be parsed yet |
customer_must_reauthenticate |
Customer (reason) |
A customer must share credentials again (credentials_are_invalid or mfa_factor_has_expired) |
Full payloads: references/overview.md and Bayou's webhook docs.
Delivery Semantics
- Bayou POSTs JSON to the company's single webhook URL; every webhook goes there.
- Verification is optional on Bayou's side: deliveries are sent whether or not you verify. Verify anyway.
- Bayou doesn't state a retry policy, so make handlers idempotent and respond with a
2xxquickly. new_unparsed_bill.object.file_urlis a short-lived pre-signed URL andcustomer_must_reauthenticate.object.onboarding_tokenis a credential. Don't log them.
Environment Variables
BAYOU_ENERGY_WEBHOOK_SECRET=whsec_xxxxx # full value incl. whsec_; handlers fail closed (500) without it
Get it from the Bayou dashboard under **Se
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- examples/express/.env.example
- examples/express/README.md
- examples/express/package.json
- examples/express/src/index.js
- examples/fastapi/.env.example
- examples/fastapi/README.md
- examples/fastapi/main.py
- examples/fastapi/requirements.txt
- examples/fastapi/test_webhook.py
- examples/nextjs/.env.example
- examples/nextjs/README.md
- examples/nextjs/app/webhooks/bayou-energy/route.ts
- examples/nextjs/package.json
- examples/nextjs/vitest.config.ts
- references/overview.md
- references/setup.md
- references/verification.md
FAQ
Что делает скилл bayou-energy-webhooks?
Receive and verify Bayou Energy (bayou.energy) utility-data webhooks, signed per the Standard Webhooks spec. Use when setting up a Bayou webhook endpoint, getting the company whsec_ signing secret, debugging webhook-id / webhook-timestamp / webhook-signature verification, or handling events like new_bill, updated_bill, bills_ready, intervals_ready, customer_has_filled_credentials, new_unparsed_bill and customer_must_reauthenticate.
Как установить скилл bayou-energy-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bayou-energy-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…