using-webhooks
/using-webhooks
Explains how webhook access works on deployed Major apps and how to implement webhook endpoints. Use when the user mentions webhooks, needs to receive external HTTP callbacks, or is integrating with services that send webhooks (e.g., Stripe, GitHub, Twilio).
- Author
- major-technology ↗
- Repository
- cli ↗
- Licence
- MIT
- Last repository change
- 23.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 23.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Explains how webhook access works on deployed Major apps and how to implement webhook endpoints. Use when the user mentions webhooks, needs to receive external HTTP callbacks, or is integrating with services that send webhooks (e.g., Stripe, GitHub, Twilio).
Original author description
Explains how webhook access works on deployed Major apps and how to implement webhook endpoints. Use when the user mentions webhooks, needs to receive external HTTP callbacks, or is integrating with services that send webhooks (e.g., Stripe, GitHub, Twilio).
How it works
- Overview
- Two Options
- Checking & Enabling Webhooks
- Implementing Webhook Endpoints
- Tips
SKILL.md preview
---
name: using-webhooks
description: Explains how webhook access works on deployed Major apps and how to implement webhook endpoints. Use when the user mentions webhooks, needs to receive external HTTP callbacks, or is integrating with services that send webhooks (e.g., Stripe, GitHub, Twilio).
---
# Major Platform: Webhooks
## Overview
Major apps are protected by an authentication gateway by default. Enabling **Webhook Access** allows unauthenticated HTTP traffic to reach routes matching `/api/webhook/*` on **deployed apps only**. This is required for receiving callbacks from external services like Stripe, GitHub, Twilio, etc.
**Important:** Webhook access simply allows traffic through — it does NOT perform any authentication or verification. If the webhook provider supports authentication (e.g., Stripe signature verification, GitHub webhook secrets, Twilio request validation), the application **MUST** implement its own verification at the application layer.
---
## Two Options
- **Webhook token (preferred):** for any sender that can set a URL or a header. This includes Zapier, internal services, scripts, and signing senders such as Stripe and GitHub, where the token adds a second layer. The sender sends the token as `x-major-jwt: <token>` or as `?major_token=<token>`. The token works only on the app it was created for, on both the deployed app and the preview.
- **Unauthenticated toggle:** for senders that cannot carry a token. The app must verify the provider signature, as described below.
### Where tokens are created
Major dashboard > open the app > Settings tab > Webhook Access > Webhook tokens > Create. Only app admins can create tokens. The agent never creates or sees a token. Tell the user to create one and to paste the URL (`https://<app-host>/api/webhook/<your-route>?major_token=<token>`) into the sender.
### App code with tokens
The request arrives as the token's creator in `x-major-user-id`. The app must not log full request URLs, because the query can contain `major_token`.
---
## Checking & Enabling Webhooks
Run `major app info --json` from the app workspace to check the current app status, including `webhooksEnabled`. In a hosted sandbox, run it through `mcp__plugin_major_major__sandbox_bash`.
If webhooks are not enabled, instruct the user to enable them from the **Major dashboard → App Settings → Webhook Access** toggle.
**Note:** If the app is already public (`isPublic: true`), webhook access is not needed — all unauthenticated traffic is already allowed.
---
## Implementing Webhook Endpoints
Create your webhook routes under the `/api/webhook/` path. Only routes matching this pattern will bypass authentication when webhook access is enabled.
```typescript
// app/api/webhook/stripe/route.ts
import { NextRequest, NextResponse } from "next/server";
import Stripe from "stripe";
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);
const webhookSecret = process.env.STRIPE_WEBHOOK_SECRET!;
export async function POST(request: NextRequest) {
const body = await request.text();
const signature = request.headers.get("stripe-signature")!;
// CRITICAL: Verify the webhook signature at the application layer
let event: Stripe.Event;
try {
event = stripe.webhooks.constructEvent(body, signature, webhookSecret);
} catch (err) {
return NextResponse.json({ error: "Invalid signature" }, { status: 400 });
}
// Handle the verified event
switch (event.type) {
case "checkout.session.completed":
// Process the event
break;
}
return NextResponse.json({ received: true });
}
```
---
## Tips
- **Deployed apps only** — Webhook bypass only applies to deployed applications, not coding sessions
- **Route pattern** — Only `/api/webhook/*` routes are bypassed. All other routes still require authentication
- **Always verify signatures** — Since Major does not authenticate webhook requests, you MUST verify request authenticity yourself using provider-specific mechanisms (signatures, shared secrets, etc.)
- **Public apps** — If the app is already public, the webhook toggle is irrelevant since all routes are already accessible without authentication
- **Environment variables** — Store webhook secrets (e.g., `STRIPE_WEBHOOK_SECRET`, `GITHUB_WEBHOOK_SECRET`) as environment variables in the Major dashboard
Versions
The database has no other skills named using-webhooks.
Database snapshot: 13.11.2026 · package version aa2205813be0 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100twilio-webhooks
Receive and verify Twilio webhooks. Use when setting up Twilio webhook handlers, debugging X-Twilio-Signature verification, or handling communications events like incoming SMS, voice calls, message status callbacks (delivered, failed), or recording status callbacks. - 100stripe-webhooks
Receive and verify Stripe webhooks. Use when setting up Stripe webhook handlers, debugging signature verification, or handling payment events like payment_intent.succeeded, customer.subscription.created, or invoice.paid. - 100webhook-collector
Create webhook endpoints, send test payloads, and inspect captured events using webhookcollector.dev. Use for both temporary testing and permanent webhook infrastructure. Endpoints are persistent — only event data expires after 24hrs, so pair with a cron to drain events for… - 100webhooks
Webhook patterns for sending and receiving. Signature verification, retry logic, idempotency, payload design, and webhook infrastructure. Covers Stripe, GitHub, Slack webhook consumption and custom webhook dispatch. USE WHEN: user mentions "webhook", "webhook endpoint", "webhook… - 100stripe-test-cards-and-webhooks
Use for any question or task about testing Stripe payments, including one webhook handler and checkout that fails for 3D Secure cards: test-mode keys, test cards for success, declines and 3D Secure, stripe listen to forward webhooks locally, stripe trigger fixtures, and… - 100receive-webhooks
Receive and verify inbound webhooks from providers like Stripe, GitHub, Twilio, Slack, or Shopify and deliver them to a local or private service without exposing that service to the public internet. Verify signatures at the edge with no app code; route third-party callbacks to a…