Public
Like
glimpse2-runbook-view-glimpse-save-login-react
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v1View latest version
Webhook handlers for Notion integrations.
Updates a Notion page's URL property with a glimpse URL.
Authentication: Requires X-API-KEY
header with NOTION_WEBHOOK_SECRET
value.
Request Body:
{ "data": { "id": "page-id-here" } }
Alternative payload structures supported:
{ "id": "page-id-here" }
{ "page_id": "page-id-here" }
Success Response (200):
{ "success": true, "message": "Page URL updated successfully", "pageId": "page-id-here", "url": "https://your-domain.com/glimpse/page-id-here", "timestamp": "2024-01-01T00:00:00.000Z" }
Error Responses:
400 - Missing page ID:
{ "success": false, "error": "Page ID is required in webhook payload" }
400 - Missing host header:
{ "success": false, "error": "Host header is required" }
500 - Notion API error:
{ "success": false, "error": "Failed to update Notion page with URL", "details": "Notion API error message" }
Testing:
curl -X POST https://your-val.web.val.run/tasks/url \ -H "X-API-KEY: your-notion-webhook-secret" \ -H "Content-Type: application/json" \ -d '{"data": {"id": "your-page-id"}}'
Main webhook endpoint for Notion integrations.
Authentication: Requires X-API-KEY
header with NOTION_WEBHOOK_SECRET
value.
Test endpoint for webhook authentication.
Authentication: Requires X-API-KEY
header with NOTION_WEBHOOK_SECRET
value.
Success Response (200):
{ "success": true, "message": "Webhook authentication successful", "timestamp": "2024-01-01T00:00:00.000Z" }
Debug endpoint to check webhook configuration.
No authentication required.
Response:
{ "hasSecret": true, "secretLength": 32 }