[{"data":1,"prerenderedAt":8922},["ShallowReactive",2],{"docs-navigation":3,"content-query-5sTnI4CXWM":357},[4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58,61,64,67,70,73,76,79,82,85,88,91,94,97,100,103,106,109,112,115,118,121,124,127,130,133,136,139,142,145,148,151,154,157,160,163,166,169,172,175,178,181,184,187,190,193,196,199,202,205,208,211,214,217,220,223,226,229,232,235,238,241,244,247,250,253,256,259,262,265,268,271,274,277,280,283,286,289,292,294,297,300,303,306,309,312,315,318,321,324,327,330,333,336,339,342,345,348,351,354],{"_path":5,"title":6},"/docs/account/account-management","Account management",{"_path":8,"title":9},"/docs/account/mfa","Multi-factor authentication (MFA)",{"_path":11,"title":12},"/docs/account/team","Teams and sub-accounts",{"_path":14,"title":15},"/docs/account/billing-and-subscriptions","Billing & subscriptions",{"_path":17,"title":18},"/docs/account/access-tokens","Webhook Relay access tokens: permissions and subscription scopes",{"_path":20,"title":21},"/docs/clawhub","Webhook Relay on ClawHub",{"_path":23,"title":24},"/docs/email","Receive emails as webhooks",{"_path":26,"title":27},"/docs/email/payload","Email webhook payload",{"_path":29,"title":30},"/docs/email/filtering-and-policy","Sender filtering & policy",{"_path":32,"title":33},"/docs/email/cli","Create & poll email addresses from the CLI",{"_path":35,"title":36},"/docs","Getting Started",{"_path":38,"title":39},"/docs/installation/cli","CLI",{"_path":41,"title":42},"/docs/installation/docker","Docker container",{"_path":44,"title":45},"/docs/installation/docker-compose","Docker Compose",{"_path":47,"title":48},"/docs/installation/kubernetes","Kubernetes",{"_path":50,"title":51},"/docs/installation/autostart-windows","Autostart (Windows)",{"_path":53,"title":54},"/docs/installation/autostart-linux","Autostart (Linux)",{"_path":56,"title":57},"/docs/installation/autostart-macos","Autostart (MacOS)",{"_path":59,"title":60},"/docs/installation/behind-proxy","HTTP proxy configuration",{"_path":62,"title":63},"/docs/mcp","MCP Server",{"_path":65,"title":66},"/docs/outbound","Outbound Gateway: send webhooks to your customers",{"_path":68,"title":69},"/docs/outbound/setup","Set up the Outbound Gateway",{"_path":71,"title":72},"/docs/outbound/receiving","Receive and verify outbound webhooks",{"_path":74,"title":75},"/docs/outbound/operating","Monitor, retry and recover deliveries",{"_path":77,"title":78},"/docs/outbound/portal","Embed the customer portal",{"_path":80,"title":81},"/docs/outbound/migrate","Migrate to the Outbound Gateway",{"_path":83,"title":84},"/docs/outbound/migrate/svix","Migrate from Svix",{"_path":86,"title":87},"/docs/outbound/migrate/hookdeck-outpost","Migrate from Hookdeck Outpost",{"_path":89,"title":90},"/docs/outbound/migrate/convoy","Migrate from Convoy",{"_path":92,"title":93},"/docs/outbound/migrate/hook0","Migrate from Hook0",{"_path":95,"title":96},"/docs/outbound/migrate/diy","Migrate a homegrown webhook sender",{"_path":98,"title":99},"/docs/security","Security & Tech",{"_path":101,"title":102},"/docs/service-connections","Service Connections",{"_path":104,"title":105},"/docs/service-connections/ai-providers","AI provider connections",{"_path":107,"title":108},"/docs/service-connections/aws_s3","AWS S3",{"_path":110,"title":111},"/docs/service-connections/aws_sns","AWS SNS",{"_path":113,"title":114},"/docs/service-connections/aws_sqs","AWS SQS",{"_path":116,"title":117},"/docs/service-connections/azure","Azure",{"_path":119,"title":120},"/docs/service-connections/gcp_gcs","GCP Cloud Storage",{"_path":122,"title":123},"/docs/service-connections/gcp_pubsub","GCP Pub/Sub",{"_path":125,"title":126},"/docs/service-connections/secrets","Secrets",{"_path":128,"title":129},"/docs/skills","Agent Skills",{"_path":131,"title":132},"/docs/skills-cli","skills.sh — the Agent Skills CLI",{"_path":134,"title":135},"/docs/tunnels/demoing-your-website","Demoing your website",{"_path":137,"title":138},"/docs/tunnels/regions","Regions",{"_path":140,"title":141},"/docs/tutorials/cicd/jenkins-bitbucket","Jenkins and Bitbucket",{"_path":143,"title":144},"/docs/tutorials/cicd/jenkins-generic-webhook-trigger","Jenkins Generic Webhook Trigger with Bitbucket",{"_path":146,"title":147},"/docs/tutorials/cicd/jenkins-github","Jenkins and GitHub",{"_path":149,"title":150},"/docs/tutorials/cicd/jenkins-plugin","Jenkins Plugin",{"_path":152,"title":153},"/docs/tutorials/cicd/jenkins-plugin-multibranch","Jenkins Multibranch Pipelines",{"_path":155,"title":156},"/docs/tutorials/cicd/kubernetes-operator","Kubernetes Operator",{"_path":158,"title":159},"/docs/tutorials/cicd/terraform-atlantis","Terraform Atlantis",{"_path":161,"title":162},"/docs/tutorials/cicd/webhook-exec","Execute scripts on webhook",{"_path":164,"title":165},"/docs/tutorials/edge/home-assistant","Home Assistant",{"_path":167,"title":168},"/docs/tutorials/edge/javascript-app","JavaScript app",{"_path":170,"title":171},"/docs/tutorials/edge/node-red","Node-RED",{"_path":173,"title":174},"/docs/tutorials/email/airtable","Email to Airtable",{"_path":176,"title":177},"/docs/tutorials/email/api","Email to API",{"_path":179,"title":180},"/docs/tutorials/email/database","Email to Database",{"_path":182,"title":183},"/docs/tutorials/email/discord","Email to Discord",{"_path":185,"title":186},"/docs/tutorials/email/google-sheets","Email to Google Sheets",{"_path":188,"title":189},"/docs/tutorials/email/microsoft-teams","Email to Microsoft Teams",{"_path":191,"title":192},"/docs/tutorials/email/notion","Email to Notion",{"_path":194,"title":195},"/docs/tutorials/email/slack","Email to Slack",{"_path":197,"title":198},"/docs/tutorials","Tutorials",{"_path":200,"title":201},"/docs/tutorials/n8n/email-trigger","n8n Email Trigger (Inbound Email)",{"_path":203,"title":204},"/docs/tutorials/n8n/webhook-trigger","n8n Webhook Trigger (No Public IP)",{"_path":206,"title":207},"/docs/tutorials/n8n/whatsapp-cloud-api-webhook","n8n WhatsApp Cloud API Webhook Setup",{"_path":209,"title":210},"/docs/tutorials/outbound/send-webhooks-nodejs","Send webhooks to your customers from a Node.js / TypeScript app",{"_path":212,"title":213},"/docs/tutorials/outbound/send-webhooks-go","Send webhooks to your customers from a Go service",{"_path":215,"title":216},"/docs/tutorials/outbound/nextjs-saas-webhooks","Add webhooks to a Next.js SaaS app",{"_path":218,"title":219},"/docs/tutorials/transform/docker-to-slack","DockerHub webhook to Slack notification",{"_path":221,"title":222},"/docs/tutorials/transform/enrich-webhooks","Enrich webhooks from APIs",{"_path":224,"title":225},"/docs/tutorials/transform/stripe-to-plain","Sync Stripe subscriptions to Plain.com tenants",{"_path":227,"title":228},"/docs/tutorials/warehouse/bigquery","GCP BigQuery",{"_path":230,"title":231},"/docs/webhooks/alerts","Alerts",{"_path":233,"title":234},"/docs/webhooks/auth/username-password","Username and password",{"_path":236,"title":237},"/docs/webhooks/auth/hmac","HMAC",{"_path":239,"title":240},"/docs/webhooks/auth/jwt","JWT authentication",{"_path":242,"title":243},"/docs/webhooks/auth/http-method","Auth using request method",{"_path":245,"title":246},"/docs/webhooks/auth/ip-allowlist","Source IP allowlist",{"_path":248,"title":249},"/docs/webhooks/cors","CORS for webhooks",{"_path":251,"title":252},"/docs/webhooks/cron/using-cron-webhooks","Schedule recurring webhooks",{"_path":254,"title":255},"/docs/webhooks/custom-domains","Custom webhook domains",{"_path":257,"title":258},"/docs/webhooks/custom-subdomains","Custom webhook subdomains",{"_path":260,"title":261},"/docs/webhooks/custom-webhook-response","Custom response to webhooks",{"_path":263,"title":264},"/docs/webhooks/durable-webhooks","Durable webhooks: reliable delivery with automatic retries",{"_path":266,"title":267},"/docs/webhooks/functions/manipulating-json","JSON encoding",{"_path":269,"title":270},"/docs/webhooks/functions/make-http-request","Make HTTP request",{"_path":272,"title":273},"/docs/webhooks/functions/modify-request","Modify webhook headers, body, method and path",{"_path":275,"title":276},"/docs/webhooks/functions/multipart-form-data","Multipart form to JSON",{"_path":278,"title":279},"/docs/webhooks/functions/url-encoded-data","URL Encoded Form",{"_path":281,"title":282},"/docs/webhooks/functions/working-with-time","Working with time",{"_path":284,"title":285},"/docs/webhooks/functions/send-emails","Sending emails",{"_path":287,"title":288},"/docs/webhooks/functions/crypto-functions","Base64, encryption",{"_path":290,"title":291},"/docs/webhooks/functions/integrate-into-cicd","Integrating into CI/CD",{"_path":293,"title":228},"/docs/webhooks/functions/big-query",{"_path":295,"title":296},"/docs/webhooks/functions/accessing-metadata","Accessing metadata",{"_path":298,"title":299},"/docs/webhooks/functions/response-functions","Response (post-delivery) functions",{"_path":301,"title":302},"/docs/webhooks/functions/alerting","Alerting from functions",{"_path":304,"title":305},"/docs/webhooks/functions/helper-libraries","Helper libraries",{"_path":307,"title":308},"/docs/webhooks/functions/transform-webhook-payload","Transform a webhook payload and headers before forwarding",{"_path":310,"title":311},"/docs/webhooks/functions/filter-webhooks","Filter or drop webhooks before forwarding",{"_path":313,"title":314},"/docs/webhooks/functions/provider-helpers","Provider-aware function helpers",{"_path":316,"title":317},"/docs/webhooks/functions/kv-store","KV store for functions: persist state, dedupe and cache with TTL",{"_path":319,"title":320},"/docs/webhooks/functions/file-store","File store for functions: save files and share pre-signed URLs",{"_path":322,"title":323},"/docs/webhooks/functions","Webhook transformations (functions): modify body, headers, method and path",{"_path":325,"title":326},"/docs/webhooks/internal/localhost","Receive webhooks on localhost with the relay CLI",{"_path":328,"title":329},"/docs/webhooks/large-webhooks","Large Webhooks",{"_path":331,"title":332},"/docs/webhooks/outbound-throttling","Outbound throttling: control webhook delivery speed",{"_path":334,"title":335},"/docs/webhooks/polling-webhooks","Polling webhooks with /v1/events",{"_path":337,"title":338},"/docs/webhooks/public/public-destination","Forward to public URL",{"_path":340,"title":341},"/docs/webhooks/public/multiple-destination-urls","Forward webhooks to multiple destinations",{"_path":343,"title":344},"/docs/webhooks/replay-on-agent-connect","Webhook replay on agent connect: recover missed webhooks",{"_path":346,"title":347},"/docs/webhooks/static-ip-address","Static IP Address",{"_path":349,"title":350},"/docs/webhooks/tls-ssl-errors","Fix TLS/SSL handshake errors: unsupported protocol, wrong version number, handshake failure",{"_path":352,"title":353},"/docs/webhooks/websocket-server","Connecting to websocket server",{"_path":355,"title":356},"/docs/webhooks/zero-retention-buckets","Zero Retention Buckets",{"_path":77,"_dir":358,"_draft":359,"_partial":359,"_locale":360,"title":78,"description":361,"intro":362,"layout":363,"tags":364,"faq":370,"head":386,"body":388,"_type":8915,"_id":8916,"_source":8917,"_file":8918,"_stem":8919,"_extension":8920,"sitemap":8921},"outbound",false,"","Give each of your customers a branded webhook portal inside your SaaS app: mint a single-use portal session on your server (Node.js, Go, Python or curl), embed it in an iframe or redirect to it, and configure branding and allowed origins.","The customer portal is a hosted page where one of your customers manages its own webhook endpoints and reads its own deliveries. Your server mints a single-use link for the signed-in customer; your app shows it in an iframe or redirects to it.","doc",[365,366,367,368,369],"Outbound webhooks","Customer portal","Webhook portal","Embedded portal","Outbound Gateway",[371,374,377,380,383],{"q":372,"a":373},"Does Webhook Relay have an embeddable webhook portal for my customers?","Yes. The Outbound Gateway includes a customer portal on every plan, Free included. Your backend creates a portal session for one consumer with POST /v1/outbound/consumers/{id}/portal-sessions and gets a single-use URL. You show that URL in an iframe in your app, or redirect to it. In the portal, the customer adds and edits its endpoints, reveals or rotates signing secrets, sends test events, browses your event catalog and reads, retries and recovers its own deliveries.",{"q":375,"a":376},"How do I embed the Webhook Relay portal in an iframe?","Add your app's https origin to the portal settings' allowed origins, for example https://app.example.com or https://*.example.com. Then, on each page load, have your server create a portal session for the signed-in customer and return its url to the browser. Set that url as the iframe's src, with allow=clipboard-write so customers can copy their signing secret. The portal page is served with a frame-ancestors policy that names only your allowed origins.",{"q":378,"a":379},"How long does a portal link last?","The link is single-use and must be opened within 15 minutes. After it is opened, the session lasts the ttl you asked for: 1 hour to 7 days, 12 hours by default. An expired session shows a message and, if you set a refresh URL, a button back to your app so it can create a new link. You can end a customer's sessions early with POST /v1/outbound/consumers/{id}/portal-sessions/expire, for example when your user signs out.",{"q":381,"a":382},"Can I give a customer read-only access to the portal?","Yes. Create the session with capabilities set to read. A read session can browse endpoints, the event catalog and delivery history but can't add, change, pause, delete, test or recover anything. The default, manage, allows all of those.",{"q":384,"a":385},"Can I brand the portal?","Yes. Portal settings set the name shown in the header, a logo URL, an accent colour for buttons and links, and the theme (follow the visitor, light or dark). The portal shows your branding with a small 'Delivered by Webhook Relay' footer link. A custom portal domain isn't available yet.",{"description":387},"Embed a branded webhook portal in your SaaS app. Create single-use portal sessions in Node.js, Go or Python, then show them in an iframe.",{"type":389,"children":390,"toc":8899},"root",[391,414,424,431,609,630,636,718,723,727,733,745,928,936,957,1139,1189,1195,1231,4789,4801,4883,4907,5086,5190,5254,5260,5273,6432,6437,7371,7390,7397,7403,7423,8095,8106,8112,8131,8374,8379,8383,8389,8394,8401,8419,8426,8459,8466,8472,8496,8502,8521,8628,8633,8639,8697,8703,8831,8851,8857,8893],{"type":392,"tag":393,"props":394,"children":395},"element","p",{},[396,403,405,412],{"type":392,"tag":397,"props":398,"children":399},"strong",{},[400],{"type":401,"value":402},"text","The customer portal lets each of your customers manage its own webhook endpoints and debug its own deliveries, without you building a settings page.",{"type":401,"value":404}," Your server asks Webhook Relay for a single-use portal link for the signed-in customer (an outbound ",{"type":392,"tag":406,"props":407,"children":409},"a",{"href":408},"/docs/outbound/setup/#create-a-consumer",[410],{"type":401,"value":411},"consumer",{"type":401,"value":413},"). Your app shows that link in an iframe or redirects to it. The portal carries your name, logo and colours, and it acts only on that one customer's endpoints and messages. It is included on every plan, Free included.",{"type":392,"tag":415,"props":416,"children":423},"screenshot",{"alt":417,"caption":418,"height":419,"src":420,"url":421,"width":422},"Customer portal branded as Lumen Billing showing Acme Corp's endpoint with Send test event, Edit, Pause and Delete buttons, signing secret controls and a list of delivered invoice events","The portal as your customer sees it: their endpoint, its signing secret, a test button and every delivery.",640,"/images/docs/outbound/portal-endpoint-detail.webp","my.webhookrelay.com/portal/…",1440,[],{"type":392,"tag":425,"props":426,"children":428},"h2",{"id":427},"what-your-customers-can-do",[429],{"type":401,"value":430},"What your customers can do",{"type":392,"tag":432,"props":433,"children":434},"table",{},[435,472],{"type":392,"tag":436,"props":437,"children":438},"thead",{},[439],{"type":392,"tag":440,"props":441,"children":442},"tr",{},[443,449,461],{"type":392,"tag":444,"props":445,"children":446},"th",{},[447],{"type":401,"value":448},"In the portal",{"type":392,"tag":444,"props":450,"children":451},{},[452,459],{"type":392,"tag":453,"props":454,"children":456},"code",{"className":455},[],[457],{"type":401,"value":458},"manage",{"type":401,"value":460}," session (default)",{"type":392,"tag":444,"props":462,"children":463},{},[464,470],{"type":392,"tag":453,"props":465,"children":467},{"className":466},[],[468],{"type":401,"value":469},"read",{"type":401,"value":471}," session",{"type":392,"tag":473,"props":474,"children":475},"tbody",{},[476,494,510,526,541,564,579,594],{"type":392,"tag":440,"props":477,"children":478},{},[479,485,490],{"type":392,"tag":480,"props":481,"children":482},"td",{},[483],{"type":401,"value":484},"See endpoints, their state and failure rate",{"type":392,"tag":480,"props":486,"children":487},{},[488],{"type":401,"value":489},"✓",{"type":392,"tag":480,"props":491,"children":492},{},[493],{"type":401,"value":489},{"type":392,"tag":440,"props":495,"children":496},{},[497,502,506],{"type":392,"tag":480,"props":498,"children":499},{},[500],{"type":401,"value":501},"Browse your event catalog with example payloads",{"type":392,"tag":480,"props":503,"children":504},{},[505],{"type":401,"value":489},{"type":392,"tag":480,"props":507,"children":508},{},[509],{"type":401,"value":489},{"type":392,"tag":440,"props":511,"children":512},{},[513,518,522],{"type":392,"tag":480,"props":514,"children":515},{},[516],{"type":401,"value":517},"Read deliveries, attempts and responses for each message",{"type":392,"tag":480,"props":519,"children":520},{},[521],{"type":401,"value":489},{"type":392,"tag":480,"props":523,"children":524},{},[525],{"type":401,"value":489},{"type":392,"tag":440,"props":527,"children":528},{},[529,534,538],{"type":392,"tag":480,"props":530,"children":531},{},[532],{"type":401,"value":533},"Add, edit, pause, resume and delete endpoints",{"type":392,"tag":480,"props":535,"children":536},{},[537],{"type":401,"value":489},{"type":392,"tag":480,"props":539,"children":540},{},[],{"type":392,"tag":440,"props":542,"children":543},{},[544,557,561],{"type":392,"tag":480,"props":545,"children":546},{},[547,549,555],{"type":401,"value":548},"Choose event types, ",{"type":392,"tag":406,"props":550,"children":552},{"href":551},"/docs/outbound/setup/#route-with-channels-and-payload-filters",[553],{"type":401,"value":554},"channels and a payload filter",{"type":401,"value":556}," per endpoint",{"type":392,"tag":480,"props":558,"children":559},{},[560],{"type":401,"value":489},{"type":392,"tag":480,"props":562,"children":563},{},[],{"type":392,"tag":440,"props":565,"children":566},{},[567,572,576],{"type":392,"tag":480,"props":568,"children":569},{},[570],{"type":401,"value":571},"Deliver to an HTTPS URL, or to their own AWS SQS, SNS, S3, Google Pub/Sub or Cloud Storage",{"type":392,"tag":480,"props":573,"children":574},{},[575],{"type":401,"value":489},{"type":392,"tag":480,"props":577,"children":578},{},[],{"type":392,"tag":440,"props":580,"children":581},{},[582,587,591],{"type":392,"tag":480,"props":583,"children":584},{},[585],{"type":401,"value":586},"Reveal and rotate the signing secret, or import an existing one",{"type":392,"tag":480,"props":588,"children":589},{},[590],{"type":401,"value":489},{"type":392,"tag":480,"props":592,"children":593},{},[],{"type":392,"tag":440,"props":595,"children":596},{},[597,602,606],{"type":392,"tag":480,"props":598,"children":599},{},[600],{"type":401,"value":601},"Send a test event, retry a delivery, recover failures, replay skipped messages",{"type":392,"tag":480,"props":603,"children":604},{},[605],{"type":401,"value":489},{"type":392,"tag":480,"props":607,"children":608},{},[],{"type":392,"tag":393,"props":610,"children":611},{},[612,614,620,622,628],{"type":401,"value":613},"A customer can't attach your ",{"type":392,"tag":406,"props":615,"children":617},{"href":616},"/docs/outbound/operating/#transform-or-drop-payloads-with-functions",[618],{"type":401,"value":619},"Functions",{"type":401,"value":621}," or do anything your own API would refuse: portal changes go through the same validation and plan limits. Every portal change is recorded in your account's audit log with the source ",{"type":392,"tag":453,"props":623,"children":625},{"className":624},[],[626],{"type":401,"value":627},"portal",{"type":401,"value":629},", the consumer and who created the link. Writes are rate-limited per consumer. Test sends and recoveries are limited more tightly, because they use your account's daily test-event allowance and its recovery slots.",{"type":392,"tag":425,"props":631,"children":633},{"id":632},"how-it-works",[634],{"type":401,"value":635},"How it works",{"type":392,"tag":637,"props":638,"children":639},"ol",{},[640,667,700],{"type":392,"tag":641,"props":642,"children":643},"li",{},[644,649,651,657,659,665],{"type":392,"tag":397,"props":645,"children":646},{},[647],{"type":401,"value":648},"Your server mints a link.",{"type":401,"value":650}," When a signed-in user opens your \"Webhooks\" settings page, your backend calls ",{"type":392,"tag":453,"props":652,"children":654},{"className":653},[],[655],{"type":401,"value":656},"POST /v1/outbound/consumers/{id}/portal-sessions",{"type":401,"value":658}," with your Webhook Relay credentials and gets back a ",{"type":392,"tag":453,"props":660,"children":662},{"className":661},[],[663],{"type":401,"value":664},"url",{"type":401,"value":666},".",{"type":392,"tag":641,"props":668,"children":669},{},[670,675,677,682,684,690,692,698],{"type":392,"tag":397,"props":671,"children":672},{},[673],{"type":401,"value":674},"The browser opens it.",{"type":401,"value":676}," Your page puts the ",{"type":392,"tag":453,"props":678,"children":680},{"className":679},[],[681],{"type":401,"value":664},{"type":401,"value":683}," in an iframe (or redirects to it). The link carries a one-time token in its ",{"type":392,"tag":453,"props":685,"children":687},{"className":686},[],[688],{"type":401,"value":689},"#fragment",{"type":401,"value":691},", so the token never reaches a server log or a ",{"type":392,"tag":453,"props":693,"children":695},{"className":694},[],[696],{"type":401,"value":697},"Referer",{"type":401,"value":699}," header.",{"type":392,"tag":641,"props":701,"children":702},{},[703,708,710,716],{"type":392,"tag":397,"props":704,"children":705},{},[706],{"type":401,"value":707},"The portal exchanges the token.",{"type":401,"value":709}," The portal page swaps the one-time token for a session that only works on the ",{"type":392,"tag":453,"props":711,"children":713},{"className":712},[],[714],{"type":401,"value":715},"/v1/portal",{"type":401,"value":717}," API and only for that consumer. A used or expired link can't be opened again, so mint a fresh one on every page load.",{"type":392,"tag":393,"props":719,"children":720},{},[721],{"type":401,"value":722},"Your Webhook Relay credentials never reach the browser. Only the single-use link does.",{"type":392,"tag":724,"props":725,"children":726},"steps",{},[],{"type":392,"tag":425,"props":728,"children":730},{"id":729},"configure-the-portal",[731],{"type":401,"value":732},"Configure the portal",{"type":392,"tag":393,"props":734,"children":735},{},[736,738,743],{"type":401,"value":737},"Open ",{"type":392,"tag":397,"props":739,"children":740},{},[741],{"type":401,"value":742},"Outbound webhooks → Portal",{"type":401,"value":744}," in the dashboard and set:",{"type":392,"tag":432,"props":746,"children":747},{},[748,764],{"type":392,"tag":436,"props":749,"children":750},{},[751],{"type":392,"tag":440,"props":752,"children":753},{},[754,759],{"type":392,"tag":444,"props":755,"children":756},{},[757],{"type":401,"value":758},"Setting",{"type":392,"tag":444,"props":760,"children":761},{},[762],{"type":401,"value":763},"What it does",{"type":392,"tag":473,"props":765,"children":766},{},[767,783,807,829,868,906],{"type":392,"tag":440,"props":768,"children":769},{},[770,778],{"type":392,"tag":480,"props":771,"children":772},{},[773],{"type":392,"tag":397,"props":774,"children":775},{},[776],{"type":401,"value":777},"Name",{"type":392,"tag":480,"props":779,"children":780},{},[781],{"type":401,"value":782},"Shown in the portal header, for example your product name.",{"type":392,"tag":440,"props":784,"children":785},{},[786,794],{"type":392,"tag":480,"props":787,"children":788},{},[789],{"type":392,"tag":397,"props":790,"children":791},{},[792],{"type":401,"value":793},"Logo URL",{"type":392,"tag":480,"props":795,"children":796},{},[797,799,805],{"type":401,"value":798},"An ",{"type":392,"tag":453,"props":800,"children":802},{"className":801},[],[803],{"type":401,"value":804},"https",{"type":401,"value":806}," image shown next to the name.",{"type":392,"tag":440,"props":808,"children":809},{},[810,818],{"type":392,"tag":480,"props":811,"children":812},{},[813],{"type":392,"tag":397,"props":814,"children":815},{},[816],{"type":401,"value":817},"Accent colour",{"type":392,"tag":480,"props":819,"children":820},{},[821,827],{"type":392,"tag":453,"props":822,"children":824},{"className":823},[],[825],{"type":401,"value":826},"#RRGGBB",{"type":401,"value":828}," used for buttons, links and the active tab.",{"type":392,"tag":440,"props":830,"children":831},{},[832,840],{"type":392,"tag":480,"props":833,"children":834},{},[835],{"type":392,"tag":397,"props":836,"children":837},{},[838],{"type":401,"value":839},"Theme",{"type":392,"tag":480,"props":841,"children":842},{},[843,845,851,853,859,861,867],{"type":401,"value":844},"Follow the visitor's system setting (",{"type":392,"tag":453,"props":846,"children":848},{"className":847},[],[849],{"type":401,"value":850},"auto",{"type":401,"value":852},", the default), or force ",{"type":392,"tag":453,"props":854,"children":856},{"className":855},[],[857],{"type":401,"value":858},"light",{"type":401,"value":860}," or ",{"type":392,"tag":453,"props":862,"children":864},{"className":863},[],[865],{"type":401,"value":866},"dark",{"type":401,"value":666},{"type":392,"tag":440,"props":869,"children":870},{},[871,879],{"type":392,"tag":480,"props":872,"children":873},{},[874],{"type":392,"tag":397,"props":875,"children":876},{},[877],{"type":401,"value":878},"Sites allowed to embed the portal",{"type":392,"tag":480,"props":880,"children":881},{},[882,884,889,891,897,898,904],{"type":401,"value":883},"The ",{"type":392,"tag":453,"props":885,"children":887},{"className":886},[],[888],{"type":401,"value":804},{"type":401,"value":890}," origins that may show the portal in an iframe, one per line, for example ",{"type":392,"tag":453,"props":892,"children":894},{"className":893},[],[895],{"type":401,"value":896},"https://app.example.com",{"type":401,"value":860},{"type":392,"tag":453,"props":899,"children":901},{"className":900},[],[902],{"type":401,"value":903},"https://*.example.com",{"type":401,"value":905}," (up to 20). Leave it empty if you only redirect.",{"type":392,"tag":440,"props":907,"children":908},{},[909,917],{"type":392,"tag":480,"props":910,"children":911},{},[912],{"type":392,"tag":397,"props":913,"children":914},{},[915],{"type":401,"value":916},"Refresh URL",{"type":392,"tag":480,"props":918,"children":919},{},[920,921,926],{"type":401,"value":798},{"type":392,"tag":453,"props":922,"children":924},{"className":923},[],[925],{"type":401,"value":804},{"type":401,"value":927}," page in your app that mints a new link. An expired session shows a button that opens it.",{"type":392,"tag":415,"props":929,"children":935},{"alt":930,"caption":931,"height":932,"src":933,"url":934,"width":422},"Portal tab in the Webhook Relay dashboard with name Lumen Billing, accent colour #7c3aed, theme Follow the visitor, allowed origin https://app.lumen.example, a refresh URL, and an Embed it section with a curl and iframe snippet","Outbound webhooks → Portal: branding, allowed origins and the refresh URL. The Embed it section repeats the two snippets you need.",810,"/images/docs/outbound/portal-settings.webp","my.webhookrelay.com/outbound?tab=portal",[],{"type":392,"tag":393,"props":937,"children":938},{},[939,941,947,949,955],{"type":401,"value":940},"Settings belong to the account and apply to every ",{"type":392,"tag":406,"props":942,"children":944},{"href":943},"/docs/outbound/setup/#choose-an-environment",[945],{"type":401,"value":946},"environment",{"type":401,"value":948},". From code, ",{"type":392,"tag":453,"props":950,"children":952},{"className":951},[],[953],{"type":401,"value":954},"PUT /v1/outbound/portal-settings",{"type":401,"value":956}," replaces all of them, so send every field you want to keep:",{"type":392,"tag":958,"props":959,"children":960},"code-block",{},[961],{"type":392,"tag":962,"props":963,"children":967},"pre",{"className":964,"code":965,"language":966,"meta":360,"style":360},"language-bash shiki shiki-themes github-dark","curl --user \"$RELAY_KEY:$RELAY_SECRET\" \\\n  -H 'Content-Type: application/json' \\\n  -X PUT https://my.webhookrelay.com/v1/outbound/portal-settings \\\n  -d '{\n    \"name\": \"Lumen Billing\",\n    \"logo_url\": \"https://app.lumen.example/logo.svg\",\n    \"accent_color\": \"#7c3aed\",\n    \"theme\": \"auto\",\n    \"allowed_origins\": [\"https://app.lumen.example\", \"https://*.lumen.example\"],\n    \"refresh_url\": \"https://app.lumen.example/settings/webhooks\"\n  }'\n","bash",[968],{"type":392,"tag":453,"props":969,"children":970},{"__ignoreMap":360},[971,1021,1039,1062,1076,1085,1094,1103,1112,1121,1130],{"type":392,"tag":972,"props":973,"children":976},"span",{"class":974,"line":975},"line",1,[977,983,989,995,1001,1006,1011,1016],{"type":392,"tag":972,"props":978,"children":980},{"style":979},"--shiki-default:#B392F0",[981],{"type":401,"value":982},"curl",{"type":392,"tag":972,"props":984,"children":986},{"style":985},"--shiki-default:#79B8FF",[987],{"type":401,"value":988}," --user",{"type":392,"tag":972,"props":990,"children":992},{"style":991},"--shiki-default:#9ECBFF",[993],{"type":401,"value":994}," \"",{"type":392,"tag":972,"props":996,"children":998},{"style":997},"--shiki-default:#E1E4E8",[999],{"type":401,"value":1000},"$RELAY_KEY",{"type":392,"tag":972,"props":1002,"children":1003},{"style":991},[1004],{"type":401,"value":1005},":",{"type":392,"tag":972,"props":1007,"children":1008},{"style":997},[1009],{"type":401,"value":1010},"$RELAY_SECRET",{"type":392,"tag":972,"props":1012,"children":1013},{"style":991},[1014],{"type":401,"value":1015},"\"",{"type":392,"tag":972,"props":1017,"children":1018},{"style":985},[1019],{"type":401,"value":1020}," \\\n",{"type":392,"tag":972,"props":1022,"children":1024},{"class":974,"line":1023},2,[1025,1030,1035],{"type":392,"tag":972,"props":1026,"children":1027},{"style":985},[1028],{"type":401,"value":1029},"  -H",{"type":392,"tag":972,"props":1031,"children":1032},{"style":991},[1033],{"type":401,"value":1034}," 'Content-Type: application/json'",{"type":392,"tag":972,"props":1036,"children":1037},{"style":985},[1038],{"type":401,"value":1020},{"type":392,"tag":972,"props":1040,"children":1042},{"class":974,"line":1041},3,[1043,1048,1053,1058],{"type":392,"tag":972,"props":1044,"children":1045},{"style":985},[1046],{"type":401,"value":1047},"  -X",{"type":392,"tag":972,"props":1049,"children":1050},{"style":991},[1051],{"type":401,"value":1052}," PUT",{"type":392,"tag":972,"props":1054,"children":1055},{"style":991},[1056],{"type":401,"value":1057}," https://my.webhookrelay.com/v1/outbound/portal-settings",{"type":392,"tag":972,"props":1059,"children":1060},{"style":985},[1061],{"type":401,"value":1020},{"type":392,"tag":972,"props":1063,"children":1065},{"class":974,"line":1064},4,[1066,1071],{"type":392,"tag":972,"props":1067,"children":1068},{"style":985},[1069],{"type":401,"value":1070},"  -d",{"type":392,"tag":972,"props":1072,"children":1073},{"style":991},[1074],{"type":401,"value":1075}," '{\n",{"type":392,"tag":972,"props":1077,"children":1079},{"class":974,"line":1078},5,[1080],{"type":392,"tag":972,"props":1081,"children":1082},{"style":991},[1083],{"type":401,"value":1084},"    \"name\": \"Lumen Billing\",\n",{"type":392,"tag":972,"props":1086,"children":1088},{"class":974,"line":1087},6,[1089],{"type":392,"tag":972,"props":1090,"children":1091},{"style":991},[1092],{"type":401,"value":1093},"    \"logo_url\": \"https://app.lumen.example/logo.svg\",\n",{"type":392,"tag":972,"props":1095,"children":1097},{"class":974,"line":1096},7,[1098],{"type":392,"tag":972,"props":1099,"children":1100},{"style":991},[1101],{"type":401,"value":1102},"    \"accent_color\": \"#7c3aed\",\n",{"type":392,"tag":972,"props":1104,"children":1106},{"class":974,"line":1105},8,[1107],{"type":392,"tag":972,"props":1108,"children":1109},{"style":991},[1110],{"type":401,"value":1111},"    \"theme\": \"auto\",\n",{"type":392,"tag":972,"props":1113,"children":1115},{"class":974,"line":1114},9,[1116],{"type":392,"tag":972,"props":1117,"children":1118},{"style":991},[1119],{"type":401,"value":1120},"    \"allowed_origins\": [\"https://app.lumen.example\", \"https://*.lumen.example\"],\n",{"type":392,"tag":972,"props":1122,"children":1124},{"class":974,"line":1123},10,[1125],{"type":392,"tag":972,"props":1126,"children":1127},{"style":991},[1128],{"type":401,"value":1129},"    \"refresh_url\": \"https://app.lumen.example/settings/webhooks\"\n",{"type":392,"tag":972,"props":1131,"children":1133},{"class":974,"line":1132},11,[1134],{"type":392,"tag":972,"props":1135,"children":1136},{"style":991},[1137],{"type":401,"value":1138},"  }'\n",{"type":392,"tag":393,"props":1140,"children":1141},{},[1142,1148,1150,1156,1158,1163,1165,1171,1173,1179,1181,1187],{"type":392,"tag":453,"props":1143,"children":1145},{"className":1144},[],[1146],{"type":401,"value":1147},"GET /v1/outbound/portal-settings",{"type":401,"value":1149}," returns them, together with your ",{"type":392,"tag":453,"props":1151,"children":1153},{"className":1152},[],[1154],{"type":401,"value":1155},"portal_id",{"type":401,"value":1157},". The portal ID is public: it picks the branding and framing policy and grants no access. An origin that isn't ",{"type":392,"tag":453,"props":1159,"children":1161},{"className":1160},[],[1162],{"type":401,"value":804},{"type":401,"value":1164}," is refused with ",{"type":392,"tag":453,"props":1166,"children":1168},{"className":1167},[],[1169],{"type":401,"value":1170},"400",{"type":401,"value":1172},". For local development, open the portal as its own page (see ",{"type":392,"tag":406,"props":1174,"children":1176},{"href":1175},"#redirect-instead-of-embedding",[1177],{"type":401,"value":1178},"Redirect instead of embedding",{"type":401,"value":1180},"), or put your dev server behind an ",{"type":392,"tag":406,"props":1182,"children":1184},{"href":1183},"/tunnels/",[1185],{"type":401,"value":1186},"https tunnel",{"type":401,"value":1188}," and allow that origin.",{"type":392,"tag":425,"props":1190,"children":1192},{"id":1191},"create-a-portal-session-on-your-server",[1193],{"type":401,"value":1194},"Create a portal session on your server",{"type":392,"tag":393,"props":1196,"children":1197},{},[1198,1200,1206,1208,1213,1215,1221,1223,1229],{"type":401,"value":1199},"Mint a link each time a signed-in user opens the page. Use the consumer ID you registered for that user's organization. The examples authenticate with an ",{"type":392,"tag":406,"props":1201,"children":1203},{"href":1202},"/docs/outbound/setup/#create-an-access-token",[1204],{"type":401,"value":1205},"access token",{"type":401,"value":1207}," restricted to ",{"type":392,"tag":397,"props":1209,"children":1210},{},[1211],{"type":401,"value":1212},"Outbound: manage",{"type":401,"value":1214}," (",{"type":392,"tag":453,"props":1216,"children":1218},{"className":1217},[],[1219],{"type":401,"value":1220},"RELAY_KEY",{"type":401,"value":1222}," and ",{"type":392,"tag":453,"props":1224,"children":1226},{"className":1225},[],[1227],{"type":401,"value":1228},"RELAY_SECRET",{"type":401,"value":1230},"). A restricted token can only reach outbound routes, so a leak exposes less.",{"type":392,"tag":1232,"props":1233,"children":1236},"code-tabs",{"group":1234,"tabs":1235},"portal-lang","node:Node.js / TypeScript,go:Go,python:Python,curl:curl",[1237,2431,4066,4696],{"type":392,"tag":1238,"props":1239,"children":1240},"template",{"v-slot:node":360},[1241],{"type":392,"tag":962,"props":1242,"children":1246},{"className":1243,"code":1244,"language":1245,"meta":360,"style":360},"language-ts shiki shiki-themes github-dark","// portal.ts — Node.js 18+ (built-in fetch)\nconst RELAY_API = \"https://my.webhookrelay.com/v1/outbound\";\nconst RELAY_AUTH =\n  \"Basic \" + Buffer.from(`${process.env.RELAY_KEY}:${process.env.RELAY_SECRET}`).toString(\"base64\");\n\ntype PortalLink = { url: string; expires_at: string; token_expires_at: string };\n\n// Mint a single-use portal link for one of your customers (an outbound consumer).\nexport async function createPortalSession(\n  consumerId: string,\n  options: { capabilities?: \"manage\" | \"read\"; ttl?: number; next?: string; session_id?: string } = {},\n): Promise\u003CPortalLink> {\n  const res = await fetch(`${RELAY_API}/consumers/${encodeURIComponent(consumerId)}/portal-sessions`, {\n    method: \"POST\",\n    headers: { Authorization: RELAY_AUTH, \"Content-Type\": \"application/json\" },\n    body: JSON.stringify(options),\n  });\n  if (!res.ok) throw new Error(`portal session failed: ${res.status} ${await res.text()}`);\n  return (await res.json()) as PortalLink;\n}\n\n// End a customer's open portal sessions (all of them, or one session_id), e.g. on sign-out.\nexport async function endPortalSessions(consumerId: string, sessionId?: string): Promise\u003Cnumber> {\n  const res = await fetch(`${RELAY_API}/consumers/${encodeURIComponent(consumerId)}/portal-sessions/expire`, {\n    method: \"POST\",\n    headers: { Authorization: RELAY_AUTH, \"Content-Type\": \"application/json\" },\n    body: JSON.stringify(sessionId ? { session_id: sessionId } : {}),\n  });\n  if (!res.ok) throw new Error(`end portal sessions failed: ${res.status} ${await res.text()}`);\n  return ((await res.json()) as { ended: number }).ended;\n}\n","ts",[1247],{"type":392,"tag":453,"props":1248,"children":1249},{"__ignoreMap":360},[1250,1259,1288,1305,1414,1423,1499,1506,1514,1542,1563,1671,1704,1778,1796,1835,1863,1872,1968,2013,2022,2030,2039,2118,2183,2199,2231,2275,2283,2368,2423],{"type":392,"tag":972,"props":1251,"children":1252},{"class":974,"line":975},[1253],{"type":392,"tag":972,"props":1254,"children":1256},{"style":1255},"--shiki-default:#6A737D",[1257],{"type":401,"value":1258},"// portal.ts — Node.js 18+ (built-in fetch)\n",{"type":392,"tag":972,"props":1260,"children":1261},{"class":974,"line":1023},[1262,1268,1273,1278,1283],{"type":392,"tag":972,"props":1263,"children":1265},{"style":1264},"--shiki-default:#F97583",[1266],{"type":401,"value":1267},"const",{"type":392,"tag":972,"props":1269,"children":1270},{"style":985},[1271],{"type":401,"value":1272}," RELAY_API",{"type":392,"tag":972,"props":1274,"children":1275},{"style":1264},[1276],{"type":401,"value":1277}," =",{"type":392,"tag":972,"props":1279,"children":1280},{"style":991},[1281],{"type":401,"value":1282}," \"https://my.webhookrelay.com/v1/outbound\"",{"type":392,"tag":972,"props":1284,"children":1285},{"style":997},[1286],{"type":401,"value":1287},";\n",{"type":392,"tag":972,"props":1289,"children":1290},{"class":974,"line":1041},[1291,1295,1300],{"type":392,"tag":972,"props":1292,"children":1293},{"style":1264},[1294],{"type":401,"value":1267},{"type":392,"tag":972,"props":1296,"children":1297},{"style":985},[1298],{"type":401,"value":1299}," RELAY_AUTH",{"type":392,"tag":972,"props":1301,"children":1302},{"style":1264},[1303],{"type":401,"value":1304}," =\n",{"type":392,"tag":972,"props":1306,"children":1307},{"class":974,"line":1064},[1308,1313,1318,1323,1328,1333,1338,1343,1347,1352,1356,1360,1365,1369,1373,1377,1381,1385,1390,1395,1400,1404,1409],{"type":392,"tag":972,"props":1309,"children":1310},{"style":991},[1311],{"type":401,"value":1312},"  \"Basic \"",{"type":392,"tag":972,"props":1314,"children":1315},{"style":1264},[1316],{"type":401,"value":1317}," +",{"type":392,"tag":972,"props":1319,"children":1320},{"style":997},[1321],{"type":401,"value":1322}," Buffer.",{"type":392,"tag":972,"props":1324,"children":1325},{"style":979},[1326],{"type":401,"value":1327},"from",{"type":392,"tag":972,"props":1329,"children":1330},{"style":997},[1331],{"type":401,"value":1332},"(",{"type":392,"tag":972,"props":1334,"children":1335},{"style":991},[1336],{"type":401,"value":1337},"`${",{"type":392,"tag":972,"props":1339,"children":1340},{"style":997},[1341],{"type":401,"value":1342},"process",{"type":392,"tag":972,"props":1344,"children":1345},{"style":991},[1346],{"type":401,"value":666},{"type":392,"tag":972,"props":1348,"children":1349},{"style":997},[1350],{"type":401,"value":1351},"env",{"type":392,"tag":972,"props":1353,"children":1354},{"style":991},[1355],{"type":401,"value":666},{"type":392,"tag":972,"props":1357,"children":1358},{"style":985},[1359],{"type":401,"value":1220},{"type":392,"tag":972,"props":1361,"children":1362},{"style":991},[1363],{"type":401,"value":1364},"}:${",{"type":392,"tag":972,"props":1366,"children":1367},{"style":997},[1368],{"type":401,"value":1342},{"type":392,"tag":972,"props":1370,"children":1371},{"style":991},[1372],{"type":401,"value":666},{"type":392,"tag":972,"props":1374,"children":1375},{"style":997},[1376],{"type":401,"value":1351},{"type":392,"tag":972,"props":1378,"children":1379},{"style":991},[1380],{"type":401,"value":666},{"type":392,"tag":972,"props":1382,"children":1383},{"style":985},[1384],{"type":401,"value":1228},{"type":392,"tag":972,"props":1386,"children":1387},{"style":991},[1388],{"type":401,"value":1389},"}`",{"type":392,"tag":972,"props":1391,"children":1392},{"style":997},[1393],{"type":401,"value":1394},").",{"type":392,"tag":972,"props":1396,"children":1397},{"style":979},[1398],{"type":401,"value":1399},"toString",{"type":392,"tag":972,"props":1401,"children":1402},{"style":997},[1403],{"type":401,"value":1332},{"type":392,"tag":972,"props":1405,"children":1406},{"style":991},[1407],{"type":401,"value":1408},"\"base64\"",{"type":392,"tag":972,"props":1410,"children":1411},{"style":997},[1412],{"type":401,"value":1413},");\n",{"type":392,"tag":972,"props":1415,"children":1416},{"class":974,"line":1078},[1417],{"type":392,"tag":972,"props":1418,"children":1420},{"emptyLinePlaceholder":1419},true,[1421],{"type":401,"value":1422},"\n",{"type":392,"tag":972,"props":1424,"children":1425},{"class":974,"line":1087},[1426,1431,1436,1440,1445,1450,1454,1459,1464,1469,1473,1477,1481,1486,1490,1494],{"type":392,"tag":972,"props":1427,"children":1428},{"style":1264},[1429],{"type":401,"value":1430},"type",{"type":392,"tag":972,"props":1432,"children":1433},{"style":979},[1434],{"type":401,"value":1435}," PortalLink",{"type":392,"tag":972,"props":1437,"children":1438},{"style":1264},[1439],{"type":401,"value":1277},{"type":392,"tag":972,"props":1441,"children":1442},{"style":997},[1443],{"type":401,"value":1444}," { ",{"type":392,"tag":972,"props":1446,"children":1448},{"style":1447},"--shiki-default:#FFAB70",[1449],{"type":401,"value":664},{"type":392,"tag":972,"props":1451,"children":1452},{"style":1264},[1453],{"type":401,"value":1005},{"type":392,"tag":972,"props":1455,"children":1456},{"style":985},[1457],{"type":401,"value":1458}," string",{"type":392,"tag":972,"props":1460,"children":1461},{"style":997},[1462],{"type":401,"value":1463},"; ",{"type":392,"tag":972,"props":1465,"children":1466},{"style":1447},[1467],{"type":401,"value":1468},"expires_at",{"type":392,"tag":972,"props":1470,"children":1471},{"style":1264},[1472],{"type":401,"value":1005},{"type":392,"tag":972,"props":1474,"children":1475},{"style":985},[1476],{"type":401,"value":1458},{"type":392,"tag":972,"props":1478,"children":1479},{"style":997},[1480],{"type":401,"value":1463},{"type":392,"tag":972,"props":1482,"children":1483},{"style":1447},[1484],{"type":401,"value":1485},"token_expires_at",{"type":392,"tag":972,"props":1487,"children":1488},{"style":1264},[1489],{"type":401,"value":1005},{"type":392,"tag":972,"props":1491,"children":1492},{"style":985},[1493],{"type":401,"value":1458},{"type":392,"tag":972,"props":1495,"children":1496},{"style":997},[1497],{"type":401,"value":1498}," };\n",{"type":392,"tag":972,"props":1500,"children":1501},{"class":974,"line":1096},[1502],{"type":392,"tag":972,"props":1503,"children":1504},{"emptyLinePlaceholder":1419},[1505],{"type":401,"value":1422},{"type":392,"tag":972,"props":1507,"children":1508},{"class":974,"line":1105},[1509],{"type":392,"tag":972,"props":1510,"children":1511},{"style":1255},[1512],{"type":401,"value":1513},"// Mint a single-use portal link for one of your customers (an outbound consumer).\n",{"type":392,"tag":972,"props":1515,"children":1516},{"class":974,"line":1114},[1517,1522,1527,1532,1537],{"type":392,"tag":972,"props":1518,"children":1519},{"style":1264},[1520],{"type":401,"value":1521},"export",{"type":392,"tag":972,"props":1523,"children":1524},{"style":1264},[1525],{"type":401,"value":1526}," async",{"type":392,"tag":972,"props":1528,"children":1529},{"style":1264},[1530],{"type":401,"value":1531}," function",{"type":392,"tag":972,"props":1533,"children":1534},{"style":979},[1535],{"type":401,"value":1536}," createPortalSession",{"type":392,"tag":972,"props":1538,"children":1539},{"style":997},[1540],{"type":401,"value":1541},"(\n",{"type":392,"tag":972,"props":1543,"children":1544},{"class":974,"line":1123},[1545,1550,1554,1558],{"type":392,"tag":972,"props":1546,"children":1547},{"style":1447},[1548],{"type":401,"value":1549},"  consumerId",{"type":392,"tag":972,"props":1551,"children":1552},{"style":1264},[1553],{"type":401,"value":1005},{"type":392,"tag":972,"props":1555,"children":1556},{"style":985},[1557],{"type":401,"value":1458},{"type":392,"tag":972,"props":1559,"children":1560},{"style":997},[1561],{"type":401,"value":1562},",\n",{"type":392,"tag":972,"props":1564,"children":1565},{"class":974,"line":1132},[1566,1571,1575,1579,1584,1589,1594,1599,1604,1608,1613,1617,1622,1626,1631,1635,1639,1643,1648,1652,1656,1661,1666],{"type":392,"tag":972,"props":1567,"children":1568},{"style":1447},[1569],{"type":401,"value":1570},"  options",{"type":392,"tag":972,"props":1572,"children":1573},{"style":1264},[1574],{"type":401,"value":1005},{"type":392,"tag":972,"props":1576,"children":1577},{"style":997},[1578],{"type":401,"value":1444},{"type":392,"tag":972,"props":1580,"children":1581},{"style":1447},[1582],{"type":401,"value":1583},"capabilities",{"type":392,"tag":972,"props":1585,"children":1586},{"style":1264},[1587],{"type":401,"value":1588},"?:",{"type":392,"tag":972,"props":1590,"children":1591},{"style":991},[1592],{"type":401,"value":1593}," \"manage\"",{"type":392,"tag":972,"props":1595,"children":1596},{"style":1264},[1597],{"type":401,"value":1598}," |",{"type":392,"tag":972,"props":1600,"children":1601},{"style":991},[1602],{"type":401,"value":1603}," \"read\"",{"type":392,"tag":972,"props":1605,"children":1606},{"style":997},[1607],{"type":401,"value":1463},{"type":392,"tag":972,"props":1609,"children":1610},{"style":1447},[1611],{"type":401,"value":1612},"ttl",{"type":392,"tag":972,"props":1614,"children":1615},{"style":1264},[1616],{"type":401,"value":1588},{"type":392,"tag":972,"props":1618,"children":1619},{"style":985},[1620],{"type":401,"value":1621}," number",{"type":392,"tag":972,"props":1623,"children":1624},{"style":997},[1625],{"type":401,"value":1463},{"type":392,"tag":972,"props":1627,"children":1628},{"style":1447},[1629],{"type":401,"value":1630},"next",{"type":392,"tag":972,"props":1632,"children":1633},{"style":1264},[1634],{"type":401,"value":1588},{"type":392,"tag":972,"props":1636,"children":1637},{"style":985},[1638],{"type":401,"value":1458},{"type":392,"tag":972,"props":1640,"children":1641},{"style":997},[1642],{"type":401,"value":1463},{"type":392,"tag":972,"props":1644,"children":1645},{"style":1447},[1646],{"type":401,"value":1647},"session_id",{"type":392,"tag":972,"props":1649,"children":1650},{"style":1264},[1651],{"type":401,"value":1588},{"type":392,"tag":972,"props":1653,"children":1654},{"style":985},[1655],{"type":401,"value":1458},{"type":392,"tag":972,"props":1657,"children":1658},{"style":997},[1659],{"type":401,"value":1660}," } ",{"type":392,"tag":972,"props":1662,"children":1663},{"style":1264},[1664],{"type":401,"value":1665},"=",{"type":392,"tag":972,"props":1667,"children":1668},{"style":997},[1669],{"type":401,"value":1670}," {},\n",{"type":392,"tag":972,"props":1672,"children":1674},{"class":974,"line":1673},12,[1675,1680,1684,1689,1694,1699],{"type":392,"tag":972,"props":1676,"children":1677},{"style":997},[1678],{"type":401,"value":1679},")",{"type":392,"tag":972,"props":1681,"children":1682},{"style":1264},[1683],{"type":401,"value":1005},{"type":392,"tag":972,"props":1685,"children":1686},{"style":979},[1687],{"type":401,"value":1688}," Promise",{"type":392,"tag":972,"props":1690,"children":1691},{"style":997},[1692],{"type":401,"value":1693},"\u003C",{"type":392,"tag":972,"props":1695,"children":1696},{"style":979},[1697],{"type":401,"value":1698},"PortalLink",{"type":392,"tag":972,"props":1700,"children":1701},{"style":997},[1702],{"type":401,"value":1703},"> {\n",{"type":392,"tag":972,"props":1705,"children":1707},{"class":974,"line":1706},13,[1708,1713,1718,1722,1727,1732,1736,1740,1745,1750,1755,1759,1764,1768,1773],{"type":392,"tag":972,"props":1709,"children":1710},{"style":1264},[1711],{"type":401,"value":1712},"  const",{"type":392,"tag":972,"props":1714,"children":1715},{"style":985},[1716],{"type":401,"value":1717}," res",{"type":392,"tag":972,"props":1719,"children":1720},{"style":1264},[1721],{"type":401,"value":1277},{"type":392,"tag":972,"props":1723,"children":1724},{"style":1264},[1725],{"type":401,"value":1726}," await",{"type":392,"tag":972,"props":1728,"children":1729},{"style":979},[1730],{"type":401,"value":1731}," fetch",{"type":392,"tag":972,"props":1733,"children":1734},{"style":997},[1735],{"type":401,"value":1332},{"type":392,"tag":972,"props":1737,"children":1738},{"style":991},[1739],{"type":401,"value":1337},{"type":392,"tag":972,"props":1741,"children":1742},{"style":985},[1743],{"type":401,"value":1744},"RELAY_API",{"type":392,"tag":972,"props":1746,"children":1747},{"style":991},[1748],{"type":401,"value":1749},"}/consumers/${",{"type":392,"tag":972,"props":1751,"children":1752},{"style":979},[1753],{"type":401,"value":1754},"encodeURIComponent",{"type":392,"tag":972,"props":1756,"children":1757},{"style":991},[1758],{"type":401,"value":1332},{"type":392,"tag":972,"props":1760,"children":1761},{"style":997},[1762],{"type":401,"value":1763},"consumerId",{"type":392,"tag":972,"props":1765,"children":1766},{"style":991},[1767],{"type":401,"value":1679},{"type":392,"tag":972,"props":1769,"children":1770},{"style":991},[1771],{"type":401,"value":1772},"}/portal-sessions`",{"type":392,"tag":972,"props":1774,"children":1775},{"style":997},[1776],{"type":401,"value":1777},", {\n",{"type":392,"tag":972,"props":1779,"children":1781},{"class":974,"line":1780},14,[1782,1787,1792],{"type":392,"tag":972,"props":1783,"children":1784},{"style":997},[1785],{"type":401,"value":1786},"    method: ",{"type":392,"tag":972,"props":1788,"children":1789},{"style":991},[1790],{"type":401,"value":1791},"\"POST\"",{"type":392,"tag":972,"props":1793,"children":1794},{"style":997},[1795],{"type":401,"value":1562},{"type":392,"tag":972,"props":1797,"children":1799},{"class":974,"line":1798},15,[1800,1805,1810,1815,1820,1825,1830],{"type":392,"tag":972,"props":1801,"children":1802},{"style":997},[1803],{"type":401,"value":1804},"    headers: { Authorization: ",{"type":392,"tag":972,"props":1806,"children":1807},{"style":985},[1808],{"type":401,"value":1809},"RELAY_AUTH",{"type":392,"tag":972,"props":1811,"children":1812},{"style":997},[1813],{"type":401,"value":1814},", ",{"type":392,"tag":972,"props":1816,"children":1817},{"style":991},[1818],{"type":401,"value":1819},"\"Content-Type\"",{"type":392,"tag":972,"props":1821,"children":1822},{"style":997},[1823],{"type":401,"value":1824},": ",{"type":392,"tag":972,"props":1826,"children":1827},{"style":991},[1828],{"type":401,"value":1829},"\"application/json\"",{"type":392,"tag":972,"props":1831,"children":1832},{"style":997},[1833],{"type":401,"value":1834}," },\n",{"type":392,"tag":972,"props":1836,"children":1838},{"class":974,"line":1837},16,[1839,1844,1849,1853,1858],{"type":392,"tag":972,"props":1840,"children":1841},{"style":997},[1842],{"type":401,"value":1843},"    body: ",{"type":392,"tag":972,"props":1845,"children":1846},{"style":985},[1847],{"type":401,"value":1848},"JSON",{"type":392,"tag":972,"props":1850,"children":1851},{"style":997},[1852],{"type":401,"value":666},{"type":392,"tag":972,"props":1854,"children":1855},{"style":979},[1856],{"type":401,"value":1857},"stringify",{"type":392,"tag":972,"props":1859,"children":1860},{"style":997},[1861],{"type":401,"value":1862},"(options),\n",{"type":392,"tag":972,"props":1864,"children":1866},{"class":974,"line":1865},17,[1867],{"type":392,"tag":972,"props":1868,"children":1869},{"style":997},[1870],{"type":401,"value":1871},"  });\n",{"type":392,"tag":972,"props":1873,"children":1875},{"class":974,"line":1874},18,[1876,1881,1885,1890,1895,1900,1905,1910,1914,1919,1924,1928,1933,1938,1943,1947,1951,1955,1960,1964],{"type":392,"tag":972,"props":1877,"children":1878},{"style":1264},[1879],{"type":401,"value":1880},"  if",{"type":392,"tag":972,"props":1882,"children":1883},{"style":997},[1884],{"type":401,"value":1214},{"type":392,"tag":972,"props":1886,"children":1887},{"style":1264},[1888],{"type":401,"value":1889},"!",{"type":392,"tag":972,"props":1891,"children":1892},{"style":997},[1893],{"type":401,"value":1894},"res.ok) ",{"type":392,"tag":972,"props":1896,"children":1897},{"style":1264},[1898],{"type":401,"value":1899},"throw",{"type":392,"tag":972,"props":1901,"children":1902},{"style":1264},[1903],{"type":401,"value":1904}," new",{"type":392,"tag":972,"props":1906,"children":1907},{"style":979},[1908],{"type":401,"value":1909}," Error",{"type":392,"tag":972,"props":1911,"children":1912},{"style":997},[1913],{"type":401,"value":1332},{"type":392,"tag":972,"props":1915,"children":1916},{"style":991},[1917],{"type":401,"value":1918},"`portal session failed: ${",{"type":392,"tag":972,"props":1920,"children":1921},{"style":997},[1922],{"type":401,"value":1923},"res",{"type":392,"tag":972,"props":1925,"children":1926},{"style":991},[1927],{"type":401,"value":666},{"type":392,"tag":972,"props":1929,"children":1930},{"style":997},[1931],{"type":401,"value":1932},"status",{"type":392,"tag":972,"props":1934,"children":1935},{"style":991},[1936],{"type":401,"value":1937},"} ${",{"type":392,"tag":972,"props":1939,"children":1940},{"style":1264},[1941],{"type":401,"value":1942},"await",{"type":392,"tag":972,"props":1944,"children":1945},{"style":997},[1946],{"type":401,"value":1717},{"type":392,"tag":972,"props":1948,"children":1949},{"style":991},[1950],{"type":401,"value":666},{"type":392,"tag":972,"props":1952,"children":1953},{"style":979},[1954],{"type":401,"value":401},{"type":392,"tag":972,"props":1956,"children":1957},{"style":991},[1958],{"type":401,"value":1959},"()",{"type":392,"tag":972,"props":1961,"children":1962},{"style":991},[1963],{"type":401,"value":1389},{"type":392,"tag":972,"props":1965,"children":1966},{"style":997},[1967],{"type":401,"value":1413},{"type":392,"tag":972,"props":1969,"children":1971},{"class":974,"line":1970},19,[1972,1977,1981,1985,1990,1995,2000,2005,2009],{"type":392,"tag":972,"props":1973,"children":1974},{"style":1264},[1975],{"type":401,"value":1976},"  return",{"type":392,"tag":972,"props":1978,"children":1979},{"style":997},[1980],{"type":401,"value":1214},{"type":392,"tag":972,"props":1982,"children":1983},{"style":1264},[1984],{"type":401,"value":1942},{"type":392,"tag":972,"props":1986,"children":1987},{"style":997},[1988],{"type":401,"value":1989}," res.",{"type":392,"tag":972,"props":1991,"children":1992},{"style":979},[1993],{"type":401,"value":1994},"json",{"type":392,"tag":972,"props":1996,"children":1997},{"style":997},[1998],{"type":401,"value":1999},"()) ",{"type":392,"tag":972,"props":2001,"children":2002},{"style":1264},[2003],{"type":401,"value":2004},"as",{"type":392,"tag":972,"props":2006,"children":2007},{"style":979},[2008],{"type":401,"value":1435},{"type":392,"tag":972,"props":2010,"children":2011},{"style":997},[2012],{"type":401,"value":1287},{"type":392,"tag":972,"props":2014,"children":2016},{"class":974,"line":2015},20,[2017],{"type":392,"tag":972,"props":2018,"children":2019},{"style":997},[2020],{"type":401,"value":2021},"}\n",{"type":392,"tag":972,"props":2023,"children":2025},{"class":974,"line":2024},21,[2026],{"type":392,"tag":972,"props":2027,"children":2028},{"emptyLinePlaceholder":1419},[2029],{"type":401,"value":1422},{"type":392,"tag":972,"props":2031,"children":2033},{"class":974,"line":2032},22,[2034],{"type":392,"tag":972,"props":2035,"children":2036},{"style":1255},[2037],{"type":401,"value":2038},"// End a customer's open portal sessions (all of them, or one session_id), e.g. on sign-out.\n",{"type":392,"tag":972,"props":2040,"children":2042},{"class":974,"line":2041},23,[2043,2047,2051,2055,2060,2064,2068,2072,2076,2080,2085,2089,2093,2097,2101,2105,2109,2114],{"type":392,"tag":972,"props":2044,"children":2045},{"style":1264},[2046],{"type":401,"value":1521},{"type":392,"tag":972,"props":2048,"children":2049},{"style":1264},[2050],{"type":401,"value":1526},{"type":392,"tag":972,"props":2052,"children":2053},{"style":1264},[2054],{"type":401,"value":1531},{"type":392,"tag":972,"props":2056,"children":2057},{"style":979},[2058],{"type":401,"value":2059}," endPortalSessions",{"type":392,"tag":972,"props":2061,"children":2062},{"style":997},[2063],{"type":401,"value":1332},{"type":392,"tag":972,"props":2065,"children":2066},{"style":1447},[2067],{"type":401,"value":1763},{"type":392,"tag":972,"props":2069,"children":2070},{"style":1264},[2071],{"type":401,"value":1005},{"type":392,"tag":972,"props":2073,"children":2074},{"style":985},[2075],{"type":401,"value":1458},{"type":392,"tag":972,"props":2077,"children":2078},{"style":997},[2079],{"type":401,"value":1814},{"type":392,"tag":972,"props":2081,"children":2082},{"style":1447},[2083],{"type":401,"value":2084},"sessionId",{"type":392,"tag":972,"props":2086,"children":2087},{"style":1264},[2088],{"type":401,"value":1588},{"type":392,"tag":972,"props":2090,"children":2091},{"style":985},[2092],{"type":401,"value":1458},{"type":392,"tag":972,"props":2094,"children":2095},{"style":997},[2096],{"type":401,"value":1679},{"type":392,"tag":972,"props":2098,"children":2099},{"style":1264},[2100],{"type":401,"value":1005},{"type":392,"tag":972,"props":2102,"children":2103},{"style":979},[2104],{"type":401,"value":1688},{"type":392,"tag":972,"props":2106,"children":2107},{"style":997},[2108],{"type":401,"value":1693},{"type":392,"tag":972,"props":2110,"children":2111},{"style":985},[2112],{"type":401,"value":2113},"number",{"type":392,"tag":972,"props":2115,"children":2116},{"style":997},[2117],{"type":401,"value":1703},{"type":392,"tag":972,"props":2119,"children":2121},{"class":974,"line":2120},24,[2122,2126,2130,2134,2138,2142,2146,2150,2154,2158,2162,2166,2170,2174,2179],{"type":392,"tag":972,"props":2123,"children":2124},{"style":1264},[2125],{"type":401,"value":1712},{"type":392,"tag":972,"props":2127,"children":2128},{"style":985},[2129],{"type":401,"value":1717},{"type":392,"tag":972,"props":2131,"children":2132},{"style":1264},[2133],{"type":401,"value":1277},{"type":392,"tag":972,"props":2135,"children":2136},{"style":1264},[2137],{"type":401,"value":1726},{"type":392,"tag":972,"props":2139,"children":2140},{"style":979},[2141],{"type":401,"value":1731},{"type":392,"tag":972,"props":2143,"children":2144},{"style":997},[2145],{"type":401,"value":1332},{"type":392,"tag":972,"props":2147,"children":2148},{"style":991},[2149],{"type":401,"value":1337},{"type":392,"tag":972,"props":2151,"children":2152},{"style":985},[2153],{"type":401,"value":1744},{"type":392,"tag":972,"props":2155,"children":2156},{"style":991},[2157],{"type":401,"value":1749},{"type":392,"tag":972,"props":2159,"children":2160},{"style":979},[2161],{"type":401,"value":1754},{"type":392,"tag":972,"props":2163,"children":2164},{"style":991},[2165],{"type":401,"value":1332},{"type":392,"tag":972,"props":2167,"children":2168},{"style":997},[2169],{"type":401,"value":1763},{"type":392,"tag":972,"props":2171,"children":2172},{"style":991},[2173],{"type":401,"value":1679},{"type":392,"tag":972,"props":2175,"children":2176},{"style":991},[2177],{"type":401,"value":2178},"}/portal-sessions/expire`",{"type":392,"tag":972,"props":2180,"children":2181},{"style":997},[2182],{"type":401,"value":1777},{"type":392,"tag":972,"props":2184,"children":2186},{"class":974,"line":2185},25,[2187,2191,2195],{"type":392,"tag":972,"props":2188,"children":2189},{"style":997},[2190],{"type":401,"value":1786},{"type":392,"tag":972,"props":2192,"children":2193},{"style":991},[2194],{"type":401,"value":1791},{"type":392,"tag":972,"props":2196,"children":2197},{"style":997},[2198],{"type":401,"value":1562},{"type":392,"tag":972,"props":2200,"children":2202},{"class":974,"line":2201},26,[2203,2207,2211,2215,2219,2223,2227],{"type":392,"tag":972,"props":2204,"children":2205},{"style":997},[2206],{"type":401,"value":1804},{"type":392,"tag":972,"props":2208,"children":2209},{"style":985},[2210],{"type":401,"value":1809},{"type":392,"tag":972,"props":2212,"children":2213},{"style":997},[2214],{"type":401,"value":1814},{"type":392,"tag":972,"props":2216,"children":2217},{"style":991},[2218],{"type":401,"value":1819},{"type":392,"tag":972,"props":2220,"children":2221},{"style":997},[2222],{"type":401,"value":1824},{"type":392,"tag":972,"props":2224,"children":2225},{"style":991},[2226],{"type":401,"value":1829},{"type":392,"tag":972,"props":2228,"children":2229},{"style":997},[2230],{"type":401,"value":1834},{"type":392,"tag":972,"props":2232,"children":2234},{"class":974,"line":2233},27,[2235,2239,2243,2247,2251,2256,2261,2266,2270],{"type":392,"tag":972,"props":2236,"children":2237},{"style":997},[2238],{"type":401,"value":1843},{"type":392,"tag":972,"props":2240,"children":2241},{"style":985},[2242],{"type":401,"value":1848},{"type":392,"tag":972,"props":2244,"children":2245},{"style":997},[2246],{"type":401,"value":666},{"type":392,"tag":972,"props":2248,"children":2249},{"style":979},[2250],{"type":401,"value":1857},{"type":392,"tag":972,"props":2252,"children":2253},{"style":997},[2254],{"type":401,"value":2255},"(sessionId ",{"type":392,"tag":972,"props":2257,"children":2258},{"style":1264},[2259],{"type":401,"value":2260},"?",{"type":392,"tag":972,"props":2262,"children":2263},{"style":997},[2264],{"type":401,"value":2265}," { session_id: sessionId } ",{"type":392,"tag":972,"props":2267,"children":2268},{"style":1264},[2269],{"type":401,"value":1005},{"type":392,"tag":972,"props":2271,"children":2272},{"style":997},[2273],{"type":401,"value":2274}," {}),\n",{"type":392,"tag":972,"props":2276,"children":2278},{"class":974,"line":2277},28,[2279],{"type":392,"tag":972,"props":2280,"children":2281},{"style":997},[2282],{"type":401,"value":1871},{"type":392,"tag":972,"props":2284,"children":2286},{"class":974,"line":2285},29,[2287,2291,2295,2299,2303,2307,2311,2315,2319,2324,2328,2332,2336,2340,2344,2348,2352,2356,2360,2364],{"type":392,"tag":972,"props":2288,"children":2289},{"style":1264},[2290],{"type":401,"value":1880},{"type":392,"tag":972,"props":2292,"children":2293},{"style":997},[2294],{"type":401,"value":1214},{"type":392,"tag":972,"props":2296,"children":2297},{"style":1264},[2298],{"type":401,"value":1889},{"type":392,"tag":972,"props":2300,"children":2301},{"style":997},[2302],{"type":401,"value":1894},{"type":392,"tag":972,"props":2304,"children":2305},{"style":1264},[2306],{"type":401,"value":1899},{"type":392,"tag":972,"props":2308,"children":2309},{"style":1264},[2310],{"type":401,"value":1904},{"type":392,"tag":972,"props":2312,"children":2313},{"style":979},[2314],{"type":401,"value":1909},{"type":392,"tag":972,"props":2316,"children":2317},{"style":997},[2318],{"type":401,"value":1332},{"type":392,"tag":972,"props":2320,"children":2321},{"style":991},[2322],{"type":401,"value":2323},"`end portal sessions failed: ${",{"type":392,"tag":972,"props":2325,"children":2326},{"style":997},[2327],{"type":401,"value":1923},{"type":392,"tag":972,"props":2329,"children":2330},{"style":991},[2331],{"type":401,"value":666},{"type":392,"tag":972,"props":2333,"children":2334},{"style":997},[2335],{"type":401,"value":1932},{"type":392,"tag":972,"props":2337,"children":2338},{"style":991},[2339],{"type":401,"value":1937},{"type":392,"tag":972,"props":2341,"children":2342},{"style":1264},[2343],{"type":401,"value":1942},{"type":392,"tag":972,"props":2345,"children":2346},{"style":997},[2347],{"type":401,"value":1717},{"type":392,"tag":972,"props":2349,"children":2350},{"style":991},[2351],{"type":401,"value":666},{"type":392,"tag":972,"props":2353,"children":2354},{"style":979},[2355],{"type":401,"value":401},{"type":392,"tag":972,"props":2357,"children":2358},{"style":991},[2359],{"type":401,"value":1959},{"type":392,"tag":972,"props":2361,"children":2362},{"style":991},[2363],{"type":401,"value":1389},{"type":392,"tag":972,"props":2365,"children":2366},{"style":997},[2367],{"type":401,"value":1413},{"type":392,"tag":972,"props":2369,"children":2371},{"class":974,"line":2370},30,[2372,2376,2381,2385,2389,2393,2397,2401,2405,2410,2414,2418],{"type":392,"tag":972,"props":2373,"children":2374},{"style":1264},[2375],{"type":401,"value":1976},{"type":392,"tag":972,"props":2377,"children":2378},{"style":997},[2379],{"type":401,"value":2380}," ((",{"type":392,"tag":972,"props":2382,"children":2383},{"style":1264},[2384],{"type":401,"value":1942},{"type":392,"tag":972,"props":2386,"children":2387},{"style":997},[2388],{"type":401,"value":1989},{"type":392,"tag":972,"props":2390,"children":2391},{"style":979},[2392],{"type":401,"value":1994},{"type":392,"tag":972,"props":2394,"children":2395},{"style":997},[2396],{"type":401,"value":1999},{"type":392,"tag":972,"props":2398,"children":2399},{"style":1264},[2400],{"type":401,"value":2004},{"type":392,"tag":972,"props":2402,"children":2403},{"style":997},[2404],{"type":401,"value":1444},{"type":392,"tag":972,"props":2406,"children":2407},{"style":1447},[2408],{"type":401,"value":2409},"ended",{"type":392,"tag":972,"props":2411,"children":2412},{"style":1264},[2413],{"type":401,"value":1005},{"type":392,"tag":972,"props":2415,"children":2416},{"style":985},[2417],{"type":401,"value":1621},{"type":392,"tag":972,"props":2419,"children":2420},{"style":997},[2421],{"type":401,"value":2422}," }).ended;\n",{"type":392,"tag":972,"props":2424,"children":2426},{"class":974,"line":2425},31,[2427],{"type":392,"tag":972,"props":2428,"children":2429},{"style":997},[2430],{"type":401,"value":2021},{"type":392,"tag":1238,"props":2432,"children":2433},{"v-slot:go":360},[2434],{"type":392,"tag":962,"props":2435,"children":2439},{"className":2436,"code":2437,"language":2438,"meta":360,"style":360},"language-go shiki shiki-themes github-dark","// portal.go\npackage portal\n\nimport (\n    \"bytes\"\n    \"context\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n    \"os\"\n    \"time\"\n)\n\nconst relayAPI = \"https://my.webhookrelay.com/v1/outbound\"\n\ntype PortalSessionOptions struct {\n    Capabilities string `json:\"capabilities,omitempty\"` // \"manage\" (default) or \"read\"\n    TTL          int    `json:\"ttl,omitempty\"`          // seconds, 3600-604800; 0 = 12 hours\n    Next         string `json:\"next,omitempty\"`         // e.g. \"endpoints/new\"\n    SessionID    string `json:\"session_id,omitempty\"`   // your tag, to end it later\n}\n\ntype PortalLink struct {\n    URL            string    `json:\"url\"`\n    ExpiresAt      time.Time `json:\"expires_at\"`\n    TokenExpiresAt time.Time `json:\"token_expires_at\"`\n}\n\nfunc relayPost(ctx context.Context, path string, body, out any) error {\n    payload, err := json.Marshal(body)\n    if err != nil {\n        return err\n    }\n    req, err := http.NewRequestWithContext(ctx, http.MethodPost, relayAPI+path, bytes.NewReader(payload))\n    if err != nil {\n        return err\n    }\n    req.SetBasicAuth(os.Getenv(\"RELAY_KEY\"), os.Getenv(\"RELAY_SECRET\"))\n    req.Header.Set(\"Content-Type\", \"application/json\")\n    resp, err := http.DefaultClient.Do(req)\n    if err != nil {\n        return err\n    }\n    defer resp.Body.Close()\n    if resp.StatusCode >= 300 {\n        msg, _ := io.ReadAll(io.LimitReader(resp.Body, 4096))\n        return fmt.Errorf(\"webhook relay %s: %s %s\", path, resp.Status, msg)\n    }\n    return json.NewDecoder(resp.Body).Decode(out)\n}\n\n// CreatePortalSession mints a single-use portal link for one consumer.\nfunc CreatePortalSession(ctx context.Context, consumerID string, opts PortalSessionOptions) (*PortalLink, error) {\n    var link PortalLink\n    err := relayPost(ctx, \"/consumers/\"+url.PathEscape(consumerID)+\"/portal-sessions\", opts, &link)\n    return &link, err\n}\n\n// EndPortalSessions ends a consumer's open sessions; an empty sessionID ends all of them.\nfunc EndPortalSessions(ctx context.Context, consumerID, sessionID string) (int64, error) {\n    var out struct {\n        Ended int64 `json:\"ended\"`\n    }\n    body := map[string]string{}\n    if sessionID != \"\" {\n        body[\"session_id\"] = sessionID\n    }\n    err := relayPost(ctx, \"/consumers/\"+url.PathEscape(consumerID)+\"/portal-sessions/expire\", body, &out)\n    return out.Ended, err\n}\n","go",[2440],{"type":392,"tag":453,"props":2441,"children":2442},{"__ignoreMap":360},[2443,2451,2464,2471,2484,2502,2518,2534,2550,2566,2582,2598,2614,2630,2638,2645,2666,2673,2695,2718,2741,2763,2785,2792,2799,2818,2835,2861,2886,2893,2900,2986,3015,3043,3057,3066,3114,3138,3150,3158,3214,3248,3276,3300,3312,3320,3344,3371,3418,3472,3480,3513,3521,3529,3538,3624,3643,3713,3731,3739,3747,3756,3831,3853,3871,3879,3920,3946,3974,3982,4045,4058],{"type":392,"tag":972,"props":2444,"children":2445},{"class":974,"line":975},[2446],{"type":392,"tag":972,"props":2447,"children":2448},{"style":1255},[2449],{"type":401,"value":2450},"// portal.go\n",{"type":392,"tag":972,"props":2452,"children":2453},{"class":974,"line":1023},[2454,2459],{"type":392,"tag":972,"props":2455,"children":2456},{"style":1264},[2457],{"type":401,"value":2458},"package",{"type":392,"tag":972,"props":2460,"children":2461},{"style":979},[2462],{"type":401,"value":2463}," portal\n",{"type":392,"tag":972,"props":2465,"children":2466},{"class":974,"line":1041},[2467],{"type":392,"tag":972,"props":2468,"children":2469},{"emptyLinePlaceholder":1419},[2470],{"type":401,"value":1422},{"type":392,"tag":972,"props":2472,"children":2473},{"class":974,"line":1064},[2474,2479],{"type":392,"tag":972,"props":2475,"children":2476},{"style":1264},[2477],{"type":401,"value":2478},"import",{"type":392,"tag":972,"props":2480,"children":2481},{"style":997},[2482],{"type":401,"value":2483}," (\n",{"type":392,"tag":972,"props":2485,"children":2486},{"class":974,"line":1078},[2487,2492,2497],{"type":392,"tag":972,"props":2488,"children":2489},{"style":991},[2490],{"type":401,"value":2491},"    \"",{"type":392,"tag":972,"props":2493,"children":2494},{"style":979},[2495],{"type":401,"value":2496},"bytes",{"type":392,"tag":972,"props":2498,"children":2499},{"style":991},[2500],{"type":401,"value":2501},"\"\n",{"type":392,"tag":972,"props":2503,"children":2504},{"class":974,"line":1087},[2505,2509,2514],{"type":392,"tag":972,"props":2506,"children":2507},{"style":991},[2508],{"type":401,"value":2491},{"type":392,"tag":972,"props":2510,"children":2511},{"style":979},[2512],{"type":401,"value":2513},"context",{"type":392,"tag":972,"props":2515,"children":2516},{"style":991},[2517],{"type":401,"value":2501},{"type":392,"tag":972,"props":2519,"children":2520},{"class":974,"line":1096},[2521,2525,2530],{"type":392,"tag":972,"props":2522,"children":2523},{"style":991},[2524],{"type":401,"value":2491},{"type":392,"tag":972,"props":2526,"children":2527},{"style":979},[2528],{"type":401,"value":2529},"encoding/json",{"type":392,"tag":972,"props":2531,"children":2532},{"style":991},[2533],{"type":401,"value":2501},{"type":392,"tag":972,"props":2535,"children":2536},{"class":974,"line":1105},[2537,2541,2546],{"type":392,"tag":972,"props":2538,"children":2539},{"style":991},[2540],{"type":401,"value":2491},{"type":392,"tag":972,"props":2542,"children":2543},{"style":979},[2544],{"type":401,"value":2545},"fmt",{"type":392,"tag":972,"props":2547,"children":2548},{"style":991},[2549],{"type":401,"value":2501},{"type":392,"tag":972,"props":2551,"children":2552},{"class":974,"line":1114},[2553,2557,2562],{"type":392,"tag":972,"props":2554,"children":2555},{"style":991},[2556],{"type":401,"value":2491},{"type":392,"tag":972,"props":2558,"children":2559},{"style":979},[2560],{"type":401,"value":2561},"io",{"type":392,"tag":972,"props":2563,"children":2564},{"style":991},[2565],{"type":401,"value":2501},{"type":392,"tag":972,"props":2567,"children":2568},{"class":974,"line":1123},[2569,2573,2578],{"type":392,"tag":972,"props":2570,"children":2571},{"style":991},[2572],{"type":401,"value":2491},{"type":392,"tag":972,"props":2574,"children":2575},{"style":979},[2576],{"type":401,"value":2577},"net/http",{"type":392,"tag":972,"props":2579,"children":2580},{"style":991},[2581],{"type":401,"value":2501},{"type":392,"tag":972,"props":2583,"children":2584},{"class":974,"line":1132},[2585,2589,2594],{"type":392,"tag":972,"props":2586,"children":2587},{"style":991},[2588],{"type":401,"value":2491},{"type":392,"tag":972,"props":2590,"children":2591},{"style":979},[2592],{"type":401,"value":2593},"net/url",{"type":392,"tag":972,"props":2595,"children":2596},{"style":991},[2597],{"type":401,"value":2501},{"type":392,"tag":972,"props":2599,"children":2600},{"class":974,"line":1673},[2601,2605,2610],{"type":392,"tag":972,"props":2602,"children":2603},{"style":991},[2604],{"type":401,"value":2491},{"type":392,"tag":972,"props":2606,"children":2607},{"style":979},[2608],{"type":401,"value":2609},"os",{"type":392,"tag":972,"props":2611,"children":2612},{"style":991},[2613],{"type":401,"value":2501},{"type":392,"tag":972,"props":2615,"children":2616},{"class":974,"line":1706},[2617,2621,2626],{"type":392,"tag":972,"props":2618,"children":2619},{"style":991},[2620],{"type":401,"value":2491},{"type":392,"tag":972,"props":2622,"children":2623},{"style":979},[2624],{"type":401,"value":2625},"time",{"type":392,"tag":972,"props":2627,"children":2628},{"style":991},[2629],{"type":401,"value":2501},{"type":392,"tag":972,"props":2631,"children":2632},{"class":974,"line":1780},[2633],{"type":392,"tag":972,"props":2634,"children":2635},{"style":997},[2636],{"type":401,"value":2637},")\n",{"type":392,"tag":972,"props":2639,"children":2640},{"class":974,"line":1798},[2641],{"type":392,"tag":972,"props":2642,"children":2643},{"emptyLinePlaceholder":1419},[2644],{"type":401,"value":1422},{"type":392,"tag":972,"props":2646,"children":2647},{"class":974,"line":1837},[2648,2652,2657,2661],{"type":392,"tag":972,"props":2649,"children":2650},{"style":1264},[2651],{"type":401,"value":1267},{"type":392,"tag":972,"props":2653,"children":2654},{"style":985},[2655],{"type":401,"value":2656}," relayAPI",{"type":392,"tag":972,"props":2658,"children":2659},{"style":1264},[2660],{"type":401,"value":1277},{"type":392,"tag":972,"props":2662,"children":2663},{"style":991},[2664],{"type":401,"value":2665}," \"https://my.webhookrelay.com/v1/outbound\"\n",{"type":392,"tag":972,"props":2667,"children":2668},{"class":974,"line":1865},[2669],{"type":392,"tag":972,"props":2670,"children":2671},{"emptyLinePlaceholder":1419},[2672],{"type":401,"value":1422},{"type":392,"tag":972,"props":2674,"children":2675},{"class":974,"line":1874},[2676,2680,2685,2690],{"type":392,"tag":972,"props":2677,"children":2678},{"style":1264},[2679],{"type":401,"value":1430},{"type":392,"tag":972,"props":2681,"children":2682},{"style":979},[2683],{"type":401,"value":2684}," PortalSessionOptions",{"type":392,"tag":972,"props":2686,"children":2687},{"style":1264},[2688],{"type":401,"value":2689}," struct",{"type":392,"tag":972,"props":2691,"children":2692},{"style":997},[2693],{"type":401,"value":2694}," {\n",{"type":392,"tag":972,"props":2696,"children":2697},{"class":974,"line":1970},[2698,2703,2708,2713],{"type":392,"tag":972,"props":2699,"children":2700},{"style":997},[2701],{"type":401,"value":2702},"    Capabilities ",{"type":392,"tag":972,"props":2704,"children":2705},{"style":1264},[2706],{"type":401,"value":2707},"string",{"type":392,"tag":972,"props":2709,"children":2710},{"style":991},[2711],{"type":401,"value":2712}," `json:\"capabilities,omitempty\"`",{"type":392,"tag":972,"props":2714,"children":2715},{"style":1255},[2716],{"type":401,"value":2717}," // \"manage\" (default) or \"read\"\n",{"type":392,"tag":972,"props":2719,"children":2720},{"class":974,"line":2015},[2721,2726,2731,2736],{"type":392,"tag":972,"props":2722,"children":2723},{"style":997},[2724],{"type":401,"value":2725},"    TTL          ",{"type":392,"tag":972,"props":2727,"children":2728},{"style":1264},[2729],{"type":401,"value":2730},"int",{"type":392,"tag":972,"props":2732,"children":2733},{"style":991},[2734],{"type":401,"value":2735},"    `json:\"ttl,omitempty\"`",{"type":392,"tag":972,"props":2737,"children":2738},{"style":1255},[2739],{"type":401,"value":2740},"          // seconds, 3600-604800; 0 = 12 hours\n",{"type":392,"tag":972,"props":2742,"children":2743},{"class":974,"line":2024},[2744,2749,2753,2758],{"type":392,"tag":972,"props":2745,"children":2746},{"style":997},[2747],{"type":401,"value":2748},"    Next         ",{"type":392,"tag":972,"props":2750,"children":2751},{"style":1264},[2752],{"type":401,"value":2707},{"type":392,"tag":972,"props":2754,"children":2755},{"style":991},[2756],{"type":401,"value":2757}," `json:\"next,omitempty\"`",{"type":392,"tag":972,"props":2759,"children":2760},{"style":1255},[2761],{"type":401,"value":2762},"         // e.g. \"endpoints/new\"\n",{"type":392,"tag":972,"props":2764,"children":2765},{"class":974,"line":2032},[2766,2771,2775,2780],{"type":392,"tag":972,"props":2767,"children":2768},{"style":997},[2769],{"type":401,"value":2770},"    SessionID    ",{"type":392,"tag":972,"props":2772,"children":2773},{"style":1264},[2774],{"type":401,"value":2707},{"type":392,"tag":972,"props":2776,"children":2777},{"style":991},[2778],{"type":401,"value":2779}," `json:\"session_id,omitempty\"`",{"type":392,"tag":972,"props":2781,"children":2782},{"style":1255},[2783],{"type":401,"value":2784},"   // your tag, to end it later\n",{"type":392,"tag":972,"props":2786,"children":2787},{"class":974,"line":2041},[2788],{"type":392,"tag":972,"props":2789,"children":2790},{"style":997},[2791],{"type":401,"value":2021},{"type":392,"tag":972,"props":2793,"children":2794},{"class":974,"line":2120},[2795],{"type":392,"tag":972,"props":2796,"children":2797},{"emptyLinePlaceholder":1419},[2798],{"type":401,"value":1422},{"type":392,"tag":972,"props":2800,"children":2801},{"class":974,"line":2185},[2802,2806,2810,2814],{"type":392,"tag":972,"props":2803,"children":2804},{"style":1264},[2805],{"type":401,"value":1430},{"type":392,"tag":972,"props":2807,"children":2808},{"style":979},[2809],{"type":401,"value":1435},{"type":392,"tag":972,"props":2811,"children":2812},{"style":1264},[2813],{"type":401,"value":2689},{"type":392,"tag":972,"props":2815,"children":2816},{"style":997},[2817],{"type":401,"value":2694},{"type":392,"tag":972,"props":2819,"children":2820},{"class":974,"line":2201},[2821,2826,2830],{"type":392,"tag":972,"props":2822,"children":2823},{"style":997},[2824],{"type":401,"value":2825},"    URL            ",{"type":392,"tag":972,"props":2827,"children":2828},{"style":1264},[2829],{"type":401,"value":2707},{"type":392,"tag":972,"props":2831,"children":2832},{"style":991},[2833],{"type":401,"value":2834},"    `json:\"url\"`\n",{"type":392,"tag":972,"props":2836,"children":2837},{"class":974,"line":2233},[2838,2843,2847,2851,2856],{"type":392,"tag":972,"props":2839,"children":2840},{"style":997},[2841],{"type":401,"value":2842},"    ExpiresAt      ",{"type":392,"tag":972,"props":2844,"children":2845},{"style":979},[2846],{"type":401,"value":2625},{"type":392,"tag":972,"props":2848,"children":2849},{"style":997},[2850],{"type":401,"value":666},{"type":392,"tag":972,"props":2852,"children":2853},{"style":979},[2854],{"type":401,"value":2855},"Time",{"type":392,"tag":972,"props":2857,"children":2858},{"style":991},[2859],{"type":401,"value":2860}," `json:\"expires_at\"`\n",{"type":392,"tag":972,"props":2862,"children":2863},{"class":974,"line":2277},[2864,2869,2873,2877,2881],{"type":392,"tag":972,"props":2865,"children":2866},{"style":997},[2867],{"type":401,"value":2868},"    TokenExpiresAt ",{"type":392,"tag":972,"props":2870,"children":2871},{"style":979},[2872],{"type":401,"value":2625},{"type":392,"tag":972,"props":2874,"children":2875},{"style":997},[2876],{"type":401,"value":666},{"type":392,"tag":972,"props":2878,"children":2879},{"style":979},[2880],{"type":401,"value":2855},{"type":392,"tag":972,"props":2882,"children":2883},{"style":991},[2884],{"type":401,"value":2885}," `json:\"token_expires_at\"`\n",{"type":392,"tag":972,"props":2887,"children":2888},{"class":974,"line":2285},[2889],{"type":392,"tag":972,"props":2890,"children":2891},{"style":997},[2892],{"type":401,"value":2021},{"type":392,"tag":972,"props":2894,"children":2895},{"class":974,"line":2370},[2896],{"type":392,"tag":972,"props":2897,"children":2898},{"emptyLinePlaceholder":1419},[2899],{"type":401,"value":1422},{"type":392,"tag":972,"props":2901,"children":2902},{"class":974,"line":2425},[2903,2908,2913,2917,2922,2927,2931,2936,2940,2945,2949,2953,2958,2962,2967,2972,2977,2982],{"type":392,"tag":972,"props":2904,"children":2905},{"style":1264},[2906],{"type":401,"value":2907},"func",{"type":392,"tag":972,"props":2909,"children":2910},{"style":979},[2911],{"type":401,"value":2912}," relayPost",{"type":392,"tag":972,"props":2914,"children":2915},{"style":997},[2916],{"type":401,"value":1332},{"type":392,"tag":972,"props":2918,"children":2919},{"style":1447},[2920],{"type":401,"value":2921},"ctx",{"type":392,"tag":972,"props":2923,"children":2924},{"style":979},[2925],{"type":401,"value":2926}," context",{"type":392,"tag":972,"props":2928,"children":2929},{"style":997},[2930],{"type":401,"value":666},{"type":392,"tag":972,"props":2932,"children":2933},{"style":979},[2934],{"type":401,"value":2935},"Context",{"type":392,"tag":972,"props":2937,"children":2938},{"style":997},[2939],{"type":401,"value":1814},{"type":392,"tag":972,"props":2941,"children":2942},{"style":1447},[2943],{"type":401,"value":2944},"path",{"type":392,"tag":972,"props":2946,"children":2947},{"style":1264},[2948],{"type":401,"value":1458},{"type":392,"tag":972,"props":2950,"children":2951},{"style":997},[2952],{"type":401,"value":1814},{"type":392,"tag":972,"props":2954,"children":2955},{"style":1447},[2956],{"type":401,"value":2957},"body",{"type":392,"tag":972,"props":2959,"children":2960},{"style":997},[2961],{"type":401,"value":1814},{"type":392,"tag":972,"props":2963,"children":2964},{"style":1447},[2965],{"type":401,"value":2966},"out",{"type":392,"tag":972,"props":2968,"children":2969},{"style":979},[2970],{"type":401,"value":2971}," any",{"type":392,"tag":972,"props":2973,"children":2974},{"style":997},[2975],{"type":401,"value":2976},") ",{"type":392,"tag":972,"props":2978,"children":2979},{"style":1264},[2980],{"type":401,"value":2981},"error",{"type":392,"tag":972,"props":2983,"children":2984},{"style":997},[2985],{"type":401,"value":2694},{"type":392,"tag":972,"props":2987,"children":2989},{"class":974,"line":2988},32,[2990,2995,3000,3005,3010],{"type":392,"tag":972,"props":2991,"children":2992},{"style":997},[2993],{"type":401,"value":2994},"    payload, err ",{"type":392,"tag":972,"props":2996,"children":2997},{"style":1264},[2998],{"type":401,"value":2999},":=",{"type":392,"tag":972,"props":3001,"children":3002},{"style":997},[3003],{"type":401,"value":3004}," json.",{"type":392,"tag":972,"props":3006,"children":3007},{"style":979},[3008],{"type":401,"value":3009},"Marshal",{"type":392,"tag":972,"props":3011,"children":3012},{"style":997},[3013],{"type":401,"value":3014},"(body)\n",{"type":392,"tag":972,"props":3016,"children":3018},{"class":974,"line":3017},33,[3019,3024,3029,3034,3039],{"type":392,"tag":972,"props":3020,"children":3021},{"style":1264},[3022],{"type":401,"value":3023},"    if",{"type":392,"tag":972,"props":3025,"children":3026},{"style":997},[3027],{"type":401,"value":3028}," err ",{"type":392,"tag":972,"props":3030,"children":3031},{"style":1264},[3032],{"type":401,"value":3033},"!=",{"type":392,"tag":972,"props":3035,"children":3036},{"style":985},[3037],{"type":401,"value":3038}," nil",{"type":392,"tag":972,"props":3040,"children":3041},{"style":997},[3042],{"type":401,"value":2694},{"type":392,"tag":972,"props":3044,"children":3046},{"class":974,"line":3045},34,[3047,3052],{"type":392,"tag":972,"props":3048,"children":3049},{"style":1264},[3050],{"type":401,"value":3051},"        return",{"type":392,"tag":972,"props":3053,"children":3054},{"style":997},[3055],{"type":401,"value":3056}," err\n",{"type":392,"tag":972,"props":3058,"children":3060},{"class":974,"line":3059},35,[3061],{"type":392,"tag":972,"props":3062,"children":3063},{"style":997},[3064],{"type":401,"value":3065},"    }\n",{"type":392,"tag":972,"props":3067,"children":3069},{"class":974,"line":3068},36,[3070,3075,3079,3084,3089,3094,3099,3104,3109],{"type":392,"tag":972,"props":3071,"children":3072},{"style":997},[3073],{"type":401,"value":3074},"    req, err ",{"type":392,"tag":972,"props":3076,"children":3077},{"style":1264},[3078],{"type":401,"value":2999},{"type":392,"tag":972,"props":3080,"children":3081},{"style":997},[3082],{"type":401,"value":3083}," http.",{"type":392,"tag":972,"props":3085,"children":3086},{"style":979},[3087],{"type":401,"value":3088},"NewRequestWithContext",{"type":392,"tag":972,"props":3090,"children":3091},{"style":997},[3092],{"type":401,"value":3093},"(ctx, http.MethodPost, relayAPI",{"type":392,"tag":972,"props":3095,"children":3096},{"style":1264},[3097],{"type":401,"value":3098},"+",{"type":392,"tag":972,"props":3100,"children":3101},{"style":997},[3102],{"type":401,"value":3103},"path, bytes.",{"type":392,"tag":972,"props":3105,"children":3106},{"style":979},[3107],{"type":401,"value":3108},"NewReader",{"type":392,"tag":972,"props":3110,"children":3111},{"style":997},[3112],{"type":401,"value":3113},"(payload))\n",{"type":392,"tag":972,"props":3115,"children":3117},{"class":974,"line":3116},37,[3118,3122,3126,3130,3134],{"type":392,"tag":972,"props":3119,"children":3120},{"style":1264},[3121],{"type":401,"value":3023},{"type":392,"tag":972,"props":3123,"children":3124},{"style":997},[3125],{"type":401,"value":3028},{"type":392,"tag":972,"props":3127,"children":3128},{"style":1264},[3129],{"type":401,"value":3033},{"type":392,"tag":972,"props":3131,"children":3132},{"style":985},[3133],{"type":401,"value":3038},{"type":392,"tag":972,"props":3135,"children":3136},{"style":997},[3137],{"type":401,"value":2694},{"type":392,"tag":972,"props":3139,"children":3141},{"class":974,"line":3140},38,[3142,3146],{"type":392,"tag":972,"props":3143,"children":3144},{"style":1264},[3145],{"type":401,"value":3051},{"type":392,"tag":972,"props":3147,"children":3148},{"style":997},[3149],{"type":401,"value":3056},{"type":392,"tag":972,"props":3151,"children":3153},{"class":974,"line":3152},39,[3154],{"type":392,"tag":972,"props":3155,"children":3156},{"style":997},[3157],{"type":401,"value":3065},{"type":392,"tag":972,"props":3159,"children":3161},{"class":974,"line":3160},40,[3162,3167,3172,3177,3182,3186,3191,3196,3200,3204,3209],{"type":392,"tag":972,"props":3163,"children":3164},{"style":997},[3165],{"type":401,"value":3166},"    req.",{"type":392,"tag":972,"props":3168,"children":3169},{"style":979},[3170],{"type":401,"value":3171},"SetBasicAuth",{"type":392,"tag":972,"props":3173,"children":3174},{"style":997},[3175],{"type":401,"value":3176},"(os.",{"type":392,"tag":972,"props":3178,"children":3179},{"style":979},[3180],{"type":401,"value":3181},"Getenv",{"type":392,"tag":972,"props":3183,"children":3184},{"style":997},[3185],{"type":401,"value":1332},{"type":392,"tag":972,"props":3187,"children":3188},{"style":991},[3189],{"type":401,"value":3190},"\"RELAY_KEY\"",{"type":392,"tag":972,"props":3192,"children":3193},{"style":997},[3194],{"type":401,"value":3195},"), os.",{"type":392,"tag":972,"props":3197,"children":3198},{"style":979},[3199],{"type":401,"value":3181},{"type":392,"tag":972,"props":3201,"children":3202},{"style":997},[3203],{"type":401,"value":1332},{"type":392,"tag":972,"props":3205,"children":3206},{"style":991},[3207],{"type":401,"value":3208},"\"RELAY_SECRET\"",{"type":392,"tag":972,"props":3210,"children":3211},{"style":997},[3212],{"type":401,"value":3213},"))\n",{"type":392,"tag":972,"props":3215,"children":3217},{"class":974,"line":3216},41,[3218,3223,3228,3232,3236,3240,3244],{"type":392,"tag":972,"props":3219,"children":3220},{"style":997},[3221],{"type":401,"value":3222},"    req.Header.",{"type":392,"tag":972,"props":3224,"children":3225},{"style":979},[3226],{"type":401,"value":3227},"Set",{"type":392,"tag":972,"props":3229,"children":3230},{"style":997},[3231],{"type":401,"value":1332},{"type":392,"tag":972,"props":3233,"children":3234},{"style":991},[3235],{"type":401,"value":1819},{"type":392,"tag":972,"props":3237,"children":3238},{"style":997},[3239],{"type":401,"value":1814},{"type":392,"tag":972,"props":3241,"children":3242},{"style":991},[3243],{"type":401,"value":1829},{"type":392,"tag":972,"props":3245,"children":3246},{"style":997},[3247],{"type":401,"value":2637},{"type":392,"tag":972,"props":3249,"children":3251},{"class":974,"line":3250},42,[3252,3257,3261,3266,3271],{"type":392,"tag":972,"props":3253,"children":3254},{"style":997},[3255],{"type":401,"value":3256},"    resp, err ",{"type":392,"tag":972,"props":3258,"children":3259},{"style":1264},[3260],{"type":401,"value":2999},{"type":392,"tag":972,"props":3262,"children":3263},{"style":997},[3264],{"type":401,"value":3265}," http.DefaultClient.",{"type":392,"tag":972,"props":3267,"children":3268},{"style":979},[3269],{"type":401,"value":3270},"Do",{"type":392,"tag":972,"props":3272,"children":3273},{"style":997},[3274],{"type":401,"value":3275},"(req)\n",{"type":392,"tag":972,"props":3277,"children":3279},{"class":974,"line":3278},43,[3280,3284,3288,3292,3296],{"type":392,"tag":972,"props":3281,"children":3282},{"style":1264},[3283],{"type":401,"value":3023},{"type":392,"tag":972,"props":3285,"children":3286},{"style":997},[3287],{"type":401,"value":3028},{"type":392,"tag":972,"props":3289,"children":3290},{"style":1264},[3291],{"type":401,"value":3033},{"type":392,"tag":972,"props":3293,"children":3294},{"style":985},[3295],{"type":401,"value":3038},{"type":392,"tag":972,"props":3297,"children":3298},{"style":997},[3299],{"type":401,"value":2694},{"type":392,"tag":972,"props":3301,"children":3303},{"class":974,"line":3302},44,[3304,3308],{"type":392,"tag":972,"props":3305,"children":3306},{"style":1264},[3307],{"type":401,"value":3051},{"type":392,"tag":972,"props":3309,"children":3310},{"style":997},[3311],{"type":401,"value":3056},{"type":392,"tag":972,"props":3313,"children":3315},{"class":974,"line":3314},45,[3316],{"type":392,"tag":972,"props":3317,"children":3318},{"style":997},[3319],{"type":401,"value":3065},{"type":392,"tag":972,"props":3321,"children":3323},{"class":974,"line":3322},46,[3324,3329,3334,3339],{"type":392,"tag":972,"props":3325,"children":3326},{"style":1264},[3327],{"type":401,"value":3328},"    defer",{"type":392,"tag":972,"props":3330,"children":3331},{"style":997},[3332],{"type":401,"value":3333}," resp.Body.",{"type":392,"tag":972,"props":3335,"children":3336},{"style":979},[3337],{"type":401,"value":3338},"Close",{"type":392,"tag":972,"props":3340,"children":3341},{"style":997},[3342],{"type":401,"value":3343},"()\n",{"type":392,"tag":972,"props":3345,"children":3347},{"class":974,"line":3346},47,[3348,3352,3357,3362,3367],{"type":392,"tag":972,"props":3349,"children":3350},{"style":1264},[3351],{"type":401,"value":3023},{"type":392,"tag":972,"props":3353,"children":3354},{"style":997},[3355],{"type":401,"value":3356}," resp.StatusCode ",{"type":392,"tag":972,"props":3358,"children":3359},{"style":1264},[3360],{"type":401,"value":3361},">=",{"type":392,"tag":972,"props":3363,"children":3364},{"style":985},[3365],{"type":401,"value":3366}," 300",{"type":392,"tag":972,"props":3368,"children":3369},{"style":997},[3370],{"type":401,"value":2694},{"type":392,"tag":972,"props":3372,"children":3374},{"class":974,"line":3373},48,[3375,3380,3384,3389,3394,3399,3404,3409,3414],{"type":392,"tag":972,"props":3376,"children":3377},{"style":997},[3378],{"type":401,"value":3379},"        msg, _ ",{"type":392,"tag":972,"props":3381,"children":3382},{"style":1264},[3383],{"type":401,"value":2999},{"type":392,"tag":972,"props":3385,"children":3386},{"style":997},[3387],{"type":401,"value":3388}," io.",{"type":392,"tag":972,"props":3390,"children":3391},{"style":979},[3392],{"type":401,"value":3393},"ReadAll",{"type":392,"tag":972,"props":3395,"children":3396},{"style":997},[3397],{"type":401,"value":3398},"(io.",{"type":392,"tag":972,"props":3400,"children":3401},{"style":979},[3402],{"type":401,"value":3403},"LimitReader",{"type":392,"tag":972,"props":3405,"children":3406},{"style":997},[3407],{"type":401,"value":3408},"(resp.Body, ",{"type":392,"tag":972,"props":3410,"children":3411},{"style":985},[3412],{"type":401,"value":3413},"4096",{"type":392,"tag":972,"props":3415,"children":3416},{"style":997},[3417],{"type":401,"value":3213},{"type":392,"tag":972,"props":3419,"children":3421},{"class":974,"line":3420},49,[3422,3426,3431,3436,3440,3445,3450,3454,3458,3463,3467],{"type":392,"tag":972,"props":3423,"children":3424},{"style":1264},[3425],{"type":401,"value":3051},{"type":392,"tag":972,"props":3427,"children":3428},{"style":997},[3429],{"type":401,"value":3430}," fmt.",{"type":392,"tag":972,"props":3432,"children":3433},{"style":979},[3434],{"type":401,"value":3435},"Errorf",{"type":392,"tag":972,"props":3437,"children":3438},{"style":997},[3439],{"type":401,"value":1332},{"type":392,"tag":972,"props":3441,"children":3442},{"style":991},[3443],{"type":401,"value":3444},"\"webhook relay ",{"type":392,"tag":972,"props":3446,"children":3447},{"style":985},[3448],{"type":401,"value":3449},"%s",{"type":392,"tag":972,"props":3451,"children":3452},{"style":991},[3453],{"type":401,"value":1824},{"type":392,"tag":972,"props":3455,"children":3456},{"style":985},[3457],{"type":401,"value":3449},{"type":392,"tag":972,"props":3459,"children":3460},{"style":985},[3461],{"type":401,"value":3462}," %s",{"type":392,"tag":972,"props":3464,"children":3465},{"style":991},[3466],{"type":401,"value":1015},{"type":392,"tag":972,"props":3468,"children":3469},{"style":997},[3470],{"type":401,"value":3471},", path, resp.Status, msg)\n",{"type":392,"tag":972,"props":3473,"children":3475},{"class":974,"line":3474},50,[3476],{"type":392,"tag":972,"props":3477,"children":3478},{"style":997},[3479],{"type":401,"value":3065},{"type":392,"tag":972,"props":3481,"children":3483},{"class":974,"line":3482},51,[3484,3489,3493,3498,3503,3508],{"type":392,"tag":972,"props":3485,"children":3486},{"style":1264},[3487],{"type":401,"value":3488},"    return",{"type":392,"tag":972,"props":3490,"children":3491},{"style":997},[3492],{"type":401,"value":3004},{"type":392,"tag":972,"props":3494,"children":3495},{"style":979},[3496],{"type":401,"value":3497},"NewDecoder",{"type":392,"tag":972,"props":3499,"children":3500},{"style":997},[3501],{"type":401,"value":3502},"(resp.Body).",{"type":392,"tag":972,"props":3504,"children":3505},{"style":979},[3506],{"type":401,"value":3507},"Decode",{"type":392,"tag":972,"props":3509,"children":3510},{"style":997},[3511],{"type":401,"value":3512},"(out)\n",{"type":392,"tag":972,"props":3514,"children":3516},{"class":974,"line":3515},52,[3517],{"type":392,"tag":972,"props":3518,"children":3519},{"style":997},[3520],{"type":401,"value":2021},{"type":392,"tag":972,"props":3522,"children":3524},{"class":974,"line":3523},53,[3525],{"type":392,"tag":972,"props":3526,"children":3527},{"emptyLinePlaceholder":1419},[3528],{"type":401,"value":1422},{"type":392,"tag":972,"props":3530,"children":3532},{"class":974,"line":3531},54,[3533],{"type":392,"tag":972,"props":3534,"children":3535},{"style":1255},[3536],{"type":401,"value":3537},"// CreatePortalSession mints a single-use portal link for one consumer.\n",{"type":392,"tag":972,"props":3539,"children":3541},{"class":974,"line":3540},55,[3542,3546,3551,3555,3559,3563,3567,3571,3575,3580,3584,3588,3593,3597,3602,3607,3611,3615,3619],{"type":392,"tag":972,"props":3543,"children":3544},{"style":1264},[3545],{"type":401,"value":2907},{"type":392,"tag":972,"props":3547,"children":3548},{"style":979},[3549],{"type":401,"value":3550}," CreatePortalSession",{"type":392,"tag":972,"props":3552,"children":3553},{"style":997},[3554],{"type":401,"value":1332},{"type":392,"tag":972,"props":3556,"children":3557},{"style":1447},[3558],{"type":401,"value":2921},{"type":392,"tag":972,"props":3560,"children":3561},{"style":979},[3562],{"type":401,"value":2926},{"type":392,"tag":972,"props":3564,"children":3565},{"style":997},[3566],{"type":401,"value":666},{"type":392,"tag":972,"props":3568,"children":3569},{"style":979},[3570],{"type":401,"value":2935},{"type":392,"tag":972,"props":3572,"children":3573},{"style":997},[3574],{"type":401,"value":1814},{"type":392,"tag":972,"props":3576,"children":3577},{"style":1447},[3578],{"type":401,"value":3579},"consumerID",{"type":392,"tag":972,"props":3581,"children":3582},{"style":1264},[3583],{"type":401,"value":1458},{"type":392,"tag":972,"props":3585,"children":3586},{"style":997},[3587],{"type":401,"value":1814},{"type":392,"tag":972,"props":3589,"children":3590},{"style":1447},[3591],{"type":401,"value":3592},"opts",{"type":392,"tag":972,"props":3594,"children":3595},{"style":979},[3596],{"type":401,"value":2684},{"type":392,"tag":972,"props":3598,"children":3599},{"style":997},[3600],{"type":401,"value":3601},") (",{"type":392,"tag":972,"props":3603,"children":3604},{"style":1264},[3605],{"type":401,"value":3606},"*",{"type":392,"tag":972,"props":3608,"children":3609},{"style":979},[3610],{"type":401,"value":1698},{"type":392,"tag":972,"props":3612,"children":3613},{"style":997},[3614],{"type":401,"value":1814},{"type":392,"tag":972,"props":3616,"children":3617},{"style":1264},[3618],{"type":401,"value":2981},{"type":392,"tag":972,"props":3620,"children":3621},{"style":997},[3622],{"type":401,"value":3623},") {\n",{"type":392,"tag":972,"props":3625,"children":3627},{"class":974,"line":3626},56,[3628,3633,3638],{"type":392,"tag":972,"props":3629,"children":3630},{"style":1264},[3631],{"type":401,"value":3632},"    var",{"type":392,"tag":972,"props":3634,"children":3635},{"style":997},[3636],{"type":401,"value":3637}," link ",{"type":392,"tag":972,"props":3639,"children":3640},{"style":979},[3641],{"type":401,"value":3642},"PortalLink\n",{"type":392,"tag":972,"props":3644,"children":3646},{"class":974,"line":3645},57,[3647,3652,3656,3660,3665,3670,3674,3679,3684,3689,3693,3698,3703,3708],{"type":392,"tag":972,"props":3648,"children":3649},{"style":997},[3650],{"type":401,"value":3651},"    err ",{"type":392,"tag":972,"props":3653,"children":3654},{"style":1264},[3655],{"type":401,"value":2999},{"type":392,"tag":972,"props":3657,"children":3658},{"style":979},[3659],{"type":401,"value":2912},{"type":392,"tag":972,"props":3661,"children":3662},{"style":997},[3663],{"type":401,"value":3664},"(ctx, ",{"type":392,"tag":972,"props":3666,"children":3667},{"style":991},[3668],{"type":401,"value":3669},"\"/consumers/\"",{"type":392,"tag":972,"props":3671,"children":3672},{"style":1264},[3673],{"type":401,"value":3098},{"type":392,"tag":972,"props":3675,"children":3676},{"style":997},[3677],{"type":401,"value":3678},"url.",{"type":392,"tag":972,"props":3680,"children":3681},{"style":979},[3682],{"type":401,"value":3683},"PathEscape",{"type":392,"tag":972,"props":3685,"children":3686},{"style":997},[3687],{"type":401,"value":3688},"(consumerID)",{"type":392,"tag":972,"props":3690,"children":3691},{"style":1264},[3692],{"type":401,"value":3098},{"type":392,"tag":972,"props":3694,"children":3695},{"style":991},[3696],{"type":401,"value":3697},"\"/portal-sessions\"",{"type":392,"tag":972,"props":3699,"children":3700},{"style":997},[3701],{"type":401,"value":3702},", opts, ",{"type":392,"tag":972,"props":3704,"children":3705},{"style":1264},[3706],{"type":401,"value":3707},"&",{"type":392,"tag":972,"props":3709,"children":3710},{"style":997},[3711],{"type":401,"value":3712},"link)\n",{"type":392,"tag":972,"props":3714,"children":3716},{"class":974,"line":3715},58,[3717,3721,3726],{"type":392,"tag":972,"props":3718,"children":3719},{"style":1264},[3720],{"type":401,"value":3488},{"type":392,"tag":972,"props":3722,"children":3723},{"style":1264},[3724],{"type":401,"value":3725}," &",{"type":392,"tag":972,"props":3727,"children":3728},{"style":997},[3729],{"type":401,"value":3730},"link, err\n",{"type":392,"tag":972,"props":3732,"children":3734},{"class":974,"line":3733},59,[3735],{"type":392,"tag":972,"props":3736,"children":3737},{"style":997},[3738],{"type":401,"value":2021},{"type":392,"tag":972,"props":3740,"children":3742},{"class":974,"line":3741},60,[3743],{"type":392,"tag":972,"props":3744,"children":3745},{"emptyLinePlaceholder":1419},[3746],{"type":401,"value":1422},{"type":392,"tag":972,"props":3748,"children":3750},{"class":974,"line":3749},61,[3751],{"type":392,"tag":972,"props":3752,"children":3753},{"style":1255},[3754],{"type":401,"value":3755},"// EndPortalSessions ends a consumer's open sessions; an empty sessionID ends all of them.\n",{"type":392,"tag":972,"props":3757,"children":3759},{"class":974,"line":3758},62,[3760,3764,3769,3773,3777,3781,3785,3789,3793,3797,3801,3806,3810,3814,3819,3823,3827],{"type":392,"tag":972,"props":3761,"children":3762},{"style":1264},[3763],{"type":401,"value":2907},{"type":392,"tag":972,"props":3765,"children":3766},{"style":979},[3767],{"type":401,"value":3768}," EndPortalSessions",{"type":392,"tag":972,"props":3770,"children":3771},{"style":997},[3772],{"type":401,"value":1332},{"type":392,"tag":972,"props":3774,"children":3775},{"style":1447},[3776],{"type":401,"value":2921},{"type":392,"tag":972,"props":3778,"children":3779},{"style":979},[3780],{"type":401,"value":2926},{"type":392,"tag":972,"props":3782,"children":3783},{"style":997},[3784],{"type":401,"value":666},{"type":392,"tag":972,"props":3786,"children":3787},{"style":979},[3788],{"type":401,"value":2935},{"type":392,"tag":972,"props":3790,"children":3791},{"style":997},[3792],{"type":401,"value":1814},{"type":392,"tag":972,"props":3794,"children":3795},{"style":1447},[3796],{"type":401,"value":3579},{"type":392,"tag":972,"props":3798,"children":3799},{"style":997},[3800],{"type":401,"value":1814},{"type":392,"tag":972,"props":3802,"children":3803},{"style":1447},[3804],{"type":401,"value":3805},"sessionID",{"type":392,"tag":972,"props":3807,"children":3808},{"style":1264},[3809],{"type":401,"value":1458},{"type":392,"tag":972,"props":3811,"children":3812},{"style":997},[3813],{"type":401,"value":3601},{"type":392,"tag":972,"props":3815,"children":3816},{"style":1264},[3817],{"type":401,"value":3818},"int64",{"type":392,"tag":972,"props":3820,"children":3821},{"style":997},[3822],{"type":401,"value":1814},{"type":392,"tag":972,"props":3824,"children":3825},{"style":1264},[3826],{"type":401,"value":2981},{"type":392,"tag":972,"props":3828,"children":3829},{"style":997},[3830],{"type":401,"value":3623},{"type":392,"tag":972,"props":3832,"children":3834},{"class":974,"line":3833},63,[3835,3839,3844,3849],{"type":392,"tag":972,"props":3836,"children":3837},{"style":1264},[3838],{"type":401,"value":3632},{"type":392,"tag":972,"props":3840,"children":3841},{"style":997},[3842],{"type":401,"value":3843}," out ",{"type":392,"tag":972,"props":3845,"children":3846},{"style":1264},[3847],{"type":401,"value":3848},"struct",{"type":392,"tag":972,"props":3850,"children":3851},{"style":997},[3852],{"type":401,"value":2694},{"type":392,"tag":972,"props":3854,"children":3856},{"class":974,"line":3855},64,[3857,3862,3866],{"type":392,"tag":972,"props":3858,"children":3859},{"style":997},[3860],{"type":401,"value":3861},"        Ended ",{"type":392,"tag":972,"props":3863,"children":3864},{"style":1264},[3865],{"type":401,"value":3818},{"type":392,"tag":972,"props":3867,"children":3868},{"style":991},[3869],{"type":401,"value":3870}," `json:\"ended\"`\n",{"type":392,"tag":972,"props":3872,"children":3874},{"class":974,"line":3873},65,[3875],{"type":392,"tag":972,"props":3876,"children":3877},{"style":997},[3878],{"type":401,"value":3065},{"type":392,"tag":972,"props":3880,"children":3882},{"class":974,"line":3881},66,[3883,3888,3892,3897,3902,3906,3911,3915],{"type":392,"tag":972,"props":3884,"children":3885},{"style":997},[3886],{"type":401,"value":3887},"    body ",{"type":392,"tag":972,"props":3889,"children":3890},{"style":1264},[3891],{"type":401,"value":2999},{"type":392,"tag":972,"props":3893,"children":3894},{"style":1264},[3895],{"type":401,"value":3896}," map",{"type":392,"tag":972,"props":3898,"children":3899},{"style":997},[3900],{"type":401,"value":3901},"[",{"type":392,"tag":972,"props":3903,"children":3904},{"style":1264},[3905],{"type":401,"value":2707},{"type":392,"tag":972,"props":3907,"children":3908},{"style":997},[3909],{"type":401,"value":3910},"]",{"type":392,"tag":972,"props":3912,"children":3913},{"style":1264},[3914],{"type":401,"value":2707},{"type":392,"tag":972,"props":3916,"children":3917},{"style":997},[3918],{"type":401,"value":3919},"{}\n",{"type":392,"tag":972,"props":3921,"children":3923},{"class":974,"line":3922},67,[3924,3928,3933,3937,3942],{"type":392,"tag":972,"props":3925,"children":3926},{"style":1264},[3927],{"type":401,"value":3023},{"type":392,"tag":972,"props":3929,"children":3930},{"style":997},[3931],{"type":401,"value":3932}," sessionID ",{"type":392,"tag":972,"props":3934,"children":3935},{"style":1264},[3936],{"type":401,"value":3033},{"type":392,"tag":972,"props":3938,"children":3939},{"style":991},[3940],{"type":401,"value":3941}," \"\"",{"type":392,"tag":972,"props":3943,"children":3944},{"style":997},[3945],{"type":401,"value":2694},{"type":392,"tag":972,"props":3947,"children":3949},{"class":974,"line":3948},68,[3950,3955,3960,3965,3969],{"type":392,"tag":972,"props":3951,"children":3952},{"style":997},[3953],{"type":401,"value":3954},"        body[",{"type":392,"tag":972,"props":3956,"children":3957},{"style":991},[3958],{"type":401,"value":3959},"\"session_id\"",{"type":392,"tag":972,"props":3961,"children":3962},{"style":997},[3963],{"type":401,"value":3964},"] ",{"type":392,"tag":972,"props":3966,"children":3967},{"style":1264},[3968],{"type":401,"value":1665},{"type":392,"tag":972,"props":3970,"children":3971},{"style":997},[3972],{"type":401,"value":3973}," sessionID\n",{"type":392,"tag":972,"props":3975,"children":3977},{"class":974,"line":3976},69,[3978],{"type":392,"tag":972,"props":3979,"children":3980},{"style":997},[3981],{"type":401,"value":3065},{"type":392,"tag":972,"props":3983,"children":3985},{"class":974,"line":3984},70,[3986,3990,3994,3998,4002,4006,4010,4014,4018,4022,4026,4031,4036,4040],{"type":392,"tag":972,"props":3987,"children":3988},{"style":997},[3989],{"type":401,"value":3651},{"type":392,"tag":972,"props":3991,"children":3992},{"style":1264},[3993],{"type":401,"value":2999},{"type":392,"tag":972,"props":3995,"children":3996},{"style":979},[3997],{"type":401,"value":2912},{"type":392,"tag":972,"props":3999,"children":4000},{"style":997},[4001],{"type":401,"value":3664},{"type":392,"tag":972,"props":4003,"children":4004},{"style":991},[4005],{"type":401,"value":3669},{"type":392,"tag":972,"props":4007,"children":4008},{"style":1264},[4009],{"type":401,"value":3098},{"type":392,"tag":972,"props":4011,"children":4012},{"style":997},[4013],{"type":401,"value":3678},{"type":392,"tag":972,"props":4015,"children":4016},{"style":979},[4017],{"type":401,"value":3683},{"type":392,"tag":972,"props":4019,"children":4020},{"style":997},[4021],{"type":401,"value":3688},{"type":392,"tag":972,"props":4023,"children":4024},{"style":1264},[4025],{"type":401,"value":3098},{"type":392,"tag":972,"props":4027,"children":4028},{"style":991},[4029],{"type":401,"value":4030},"\"/portal-sessions/expire\"",{"type":392,"tag":972,"props":4032,"children":4033},{"style":997},[4034],{"type":401,"value":4035},", body, ",{"type":392,"tag":972,"props":4037,"children":4038},{"style":1264},[4039],{"type":401,"value":3707},{"type":392,"tag":972,"props":4041,"children":4042},{"style":997},[4043],{"type":401,"value":4044},"out)\n",{"type":392,"tag":972,"props":4046,"children":4048},{"class":974,"line":4047},71,[4049,4053],{"type":392,"tag":972,"props":4050,"children":4051},{"style":1264},[4052],{"type":401,"value":3488},{"type":392,"tag":972,"props":4054,"children":4055},{"style":997},[4056],{"type":401,"value":4057}," out.Ended, err\n",{"type":392,"tag":972,"props":4059,"children":4061},{"class":974,"line":4060},72,[4062],{"type":392,"tag":972,"props":4063,"children":4064},{"style":997},[4065],{"type":401,"value":2021},{"type":392,"tag":1238,"props":4067,"children":4068},{"v-slot:python":360},[4069],{"type":392,"tag":962,"props":4070,"children":4074},{"className":4071,"code":4072,"language":4073,"meta":360,"style":360},"language-python shiki shiki-themes github-dark","# portal.py — pip install requests\nimport os\nfrom urllib.parse import quote\n\nimport requests\n\nRELAY_API = \"https://my.webhookrelay.com/v1/outbound\"\nRELAY_AUTH = (os.environ[\"RELAY_KEY\"], os.environ[\"RELAY_SECRET\"])\n\n\ndef create_portal_session(consumer_id: str, **options) -> dict:\n    \"\"\"Mint a single-use portal link. options: capabilities, ttl, next, session_id.\"\"\"\n    resp = requests.post(\n        f\"{RELAY_API}/consumers/{quote(consumer_id, safe='')}/portal-sessions\",\n        json=options,\n        auth=RELAY_AUTH,\n        timeout=10,\n    )\n    resp.raise_for_status()\n    return resp.json()  # {\"url\": ..., \"expires_at\": ..., \"token_expires_at\": ...}\n\n\ndef end_portal_sessions(consumer_id: str, session_id: str | None = None) -> int:\n    resp = requests.post(\n        f\"{RELAY_API}/consumers/{quote(consumer_id, safe='')}/portal-sessions/expire\",\n        json={\"session_id\": session_id} if session_id else {},\n        auth=RELAY_AUTH,\n        timeout=10,\n    )\n    resp.raise_for_status()\n    return resp.json()[\"ended\"]\n","python",[4075],{"type":392,"tag":453,"props":4076,"children":4077},{"__ignoreMap":360},[4078,4086,4098,4119,4126,4138,4145,4160,4194,4201,4208,4255,4263,4280,4344,4361,4381,4402,4410,4418,4435,4442,4449,4508,4523,4579,4622,4641,4660,4667,4674],{"type":392,"tag":972,"props":4079,"children":4080},{"class":974,"line":975},[4081],{"type":392,"tag":972,"props":4082,"children":4083},{"style":1255},[4084],{"type":401,"value":4085},"# portal.py — pip install requests\n",{"type":392,"tag":972,"props":4087,"children":4088},{"class":974,"line":1023},[4089,4093],{"type":392,"tag":972,"props":4090,"children":4091},{"style":1264},[4092],{"type":401,"value":2478},{"type":392,"tag":972,"props":4094,"children":4095},{"style":997},[4096],{"type":401,"value":4097}," os\n",{"type":392,"tag":972,"props":4099,"children":4100},{"class":974,"line":1041},[4101,4105,4110,4114],{"type":392,"tag":972,"props":4102,"children":4103},{"style":1264},[4104],{"type":401,"value":1327},{"type":392,"tag":972,"props":4106,"children":4107},{"style":997},[4108],{"type":401,"value":4109}," urllib.parse ",{"type":392,"tag":972,"props":4111,"children":4112},{"style":1264},[4113],{"type":401,"value":2478},{"type":392,"tag":972,"props":4115,"children":4116},{"style":997},[4117],{"type":401,"value":4118}," quote\n",{"type":392,"tag":972,"props":4120,"children":4121},{"class":974,"line":1064},[4122],{"type":392,"tag":972,"props":4123,"children":4124},{"emptyLinePlaceholder":1419},[4125],{"type":401,"value":1422},{"type":392,"tag":972,"props":4127,"children":4128},{"class":974,"line":1078},[4129,4133],{"type":392,"tag":972,"props":4130,"children":4131},{"style":1264},[4132],{"type":401,"value":2478},{"type":392,"tag":972,"props":4134,"children":4135},{"style":997},[4136],{"type":401,"value":4137}," requests\n",{"type":392,"tag":972,"props":4139,"children":4140},{"class":974,"line":1087},[4141],{"type":392,"tag":972,"props":4142,"children":4143},{"emptyLinePlaceholder":1419},[4144],{"type":401,"value":1422},{"type":392,"tag":972,"props":4146,"children":4147},{"class":974,"line":1096},[4148,4152,4156],{"type":392,"tag":972,"props":4149,"children":4150},{"style":985},[4151],{"type":401,"value":1744},{"type":392,"tag":972,"props":4153,"children":4154},{"style":1264},[4155],{"type":401,"value":1277},{"type":392,"tag":972,"props":4157,"children":4158},{"style":991},[4159],{"type":401,"value":2665},{"type":392,"tag":972,"props":4161,"children":4162},{"class":974,"line":1105},[4163,4167,4171,4176,4180,4185,4189],{"type":392,"tag":972,"props":4164,"children":4165},{"style":985},[4166],{"type":401,"value":1809},{"type":392,"tag":972,"props":4168,"children":4169},{"style":1264},[4170],{"type":401,"value":1277},{"type":392,"tag":972,"props":4172,"children":4173},{"style":997},[4174],{"type":401,"value":4175}," (os.environ[",{"type":392,"tag":972,"props":4177,"children":4178},{"style":991},[4179],{"type":401,"value":3190},{"type":392,"tag":972,"props":4181,"children":4182},{"style":997},[4183],{"type":401,"value":4184},"], os.environ[",{"type":392,"tag":972,"props":4186,"children":4187},{"style":991},[4188],{"type":401,"value":3208},{"type":392,"tag":972,"props":4190,"children":4191},{"style":997},[4192],{"type":401,"value":4193},"])\n",{"type":392,"tag":972,"props":4195,"children":4196},{"class":974,"line":1114},[4197],{"type":392,"tag":972,"props":4198,"children":4199},{"emptyLinePlaceholder":1419},[4200],{"type":401,"value":1422},{"type":392,"tag":972,"props":4202,"children":4203},{"class":974,"line":1123},[4204],{"type":392,"tag":972,"props":4205,"children":4206},{"emptyLinePlaceholder":1419},[4207],{"type":401,"value":1422},{"type":392,"tag":972,"props":4209,"children":4210},{"class":974,"line":1132},[4211,4216,4221,4226,4231,4235,4240,4245,4250],{"type":392,"tag":972,"props":4212,"children":4213},{"style":1264},[4214],{"type":401,"value":4215},"def",{"type":392,"tag":972,"props":4217,"children":4218},{"style":979},[4219],{"type":401,"value":4220}," create_portal_session",{"type":392,"tag":972,"props":4222,"children":4223},{"style":997},[4224],{"type":401,"value":4225},"(consumer_id: ",{"type":392,"tag":972,"props":4227,"children":4228},{"style":985},[4229],{"type":401,"value":4230},"str",{"type":392,"tag":972,"props":4232,"children":4233},{"style":997},[4234],{"type":401,"value":1814},{"type":392,"tag":972,"props":4236,"children":4237},{"style":1264},[4238],{"type":401,"value":4239},"**",{"type":392,"tag":972,"props":4241,"children":4242},{"style":997},[4243],{"type":401,"value":4244},"options) -> ",{"type":392,"tag":972,"props":4246,"children":4247},{"style":985},[4248],{"type":401,"value":4249},"dict",{"type":392,"tag":972,"props":4251,"children":4252},{"style":997},[4253],{"type":401,"value":4254},":\n",{"type":392,"tag":972,"props":4256,"children":4257},{"class":974,"line":1673},[4258],{"type":392,"tag":972,"props":4259,"children":4260},{"style":991},[4261],{"type":401,"value":4262},"    \"\"\"Mint a single-use portal link. options: capabilities, ttl, next, session_id.\"\"\"\n",{"type":392,"tag":972,"props":4264,"children":4265},{"class":974,"line":1706},[4266,4271,4275],{"type":392,"tag":972,"props":4267,"children":4268},{"style":997},[4269],{"type":401,"value":4270},"    resp ",{"type":392,"tag":972,"props":4272,"children":4273},{"style":1264},[4274],{"type":401,"value":1665},{"type":392,"tag":972,"props":4276,"children":4277},{"style":997},[4278],{"type":401,"value":4279}," requests.post(\n",{"type":392,"tag":972,"props":4281,"children":4282},{"class":974,"line":1780},[4283,4288,4292,4297,4302,4307,4312,4317,4321,4326,4330,4335,4340],{"type":392,"tag":972,"props":4284,"children":4285},{"style":1264},[4286],{"type":401,"value":4287},"        f",{"type":392,"tag":972,"props":4289,"children":4290},{"style":991},[4291],{"type":401,"value":1015},{"type":392,"tag":972,"props":4293,"children":4294},{"style":985},[4295],{"type":401,"value":4296},"{RELAY_API}",{"type":392,"tag":972,"props":4298,"children":4299},{"style":991},[4300],{"type":401,"value":4301},"/consumers/",{"type":392,"tag":972,"props":4303,"children":4304},{"style":985},[4305],{"type":401,"value":4306},"{",{"type":392,"tag":972,"props":4308,"children":4309},{"style":997},[4310],{"type":401,"value":4311},"quote(consumer_id, ",{"type":392,"tag":972,"props":4313,"children":4314},{"style":1447},[4315],{"type":401,"value":4316},"safe",{"type":392,"tag":972,"props":4318,"children":4319},{"style":1264},[4320],{"type":401,"value":1665},{"type":392,"tag":972,"props":4322,"children":4323},{"style":991},[4324],{"type":401,"value":4325},"''",{"type":392,"tag":972,"props":4327,"children":4328},{"style":997},[4329],{"type":401,"value":1679},{"type":392,"tag":972,"props":4331,"children":4332},{"style":985},[4333],{"type":401,"value":4334},"}",{"type":392,"tag":972,"props":4336,"children":4337},{"style":991},[4338],{"type":401,"value":4339},"/portal-sessions\"",{"type":392,"tag":972,"props":4341,"children":4342},{"style":997},[4343],{"type":401,"value":1562},{"type":392,"tag":972,"props":4345,"children":4346},{"class":974,"line":1798},[4347,4352,4356],{"type":392,"tag":972,"props":4348,"children":4349},{"style":1447},[4350],{"type":401,"value":4351},"        json",{"type":392,"tag":972,"props":4353,"children":4354},{"style":1264},[4355],{"type":401,"value":1665},{"type":392,"tag":972,"props":4357,"children":4358},{"style":997},[4359],{"type":401,"value":4360},"options,\n",{"type":392,"tag":972,"props":4362,"children":4363},{"class":974,"line":1837},[4364,4369,4373,4377],{"type":392,"tag":972,"props":4365,"children":4366},{"style":1447},[4367],{"type":401,"value":4368},"        auth",{"type":392,"tag":972,"props":4370,"children":4371},{"style":1264},[4372],{"type":401,"value":1665},{"type":392,"tag":972,"props":4374,"children":4375},{"style":985},[4376],{"type":401,"value":1809},{"type":392,"tag":972,"props":4378,"children":4379},{"style":997},[4380],{"type":401,"value":1562},{"type":392,"tag":972,"props":4382,"children":4383},{"class":974,"line":1865},[4384,4389,4393,4398],{"type":392,"tag":972,"props":4385,"children":4386},{"style":1447},[4387],{"type":401,"value":4388},"        timeout",{"type":392,"tag":972,"props":4390,"children":4391},{"style":1264},[4392],{"type":401,"value":1665},{"type":392,"tag":972,"props":4394,"children":4395},{"style":985},[4396],{"type":401,"value":4397},"10",{"type":392,"tag":972,"props":4399,"children":4400},{"style":997},[4401],{"type":401,"value":1562},{"type":392,"tag":972,"props":4403,"children":4404},{"class":974,"line":1874},[4405],{"type":392,"tag":972,"props":4406,"children":4407},{"style":997},[4408],{"type":401,"value":4409},"    )\n",{"type":392,"tag":972,"props":4411,"children":4412},{"class":974,"line":1970},[4413],{"type":392,"tag":972,"props":4414,"children":4415},{"style":997},[4416],{"type":401,"value":4417},"    resp.raise_for_status()\n",{"type":392,"tag":972,"props":4419,"children":4420},{"class":974,"line":2015},[4421,4425,4430],{"type":392,"tag":972,"props":4422,"children":4423},{"style":1264},[4424],{"type":401,"value":3488},{"type":392,"tag":972,"props":4426,"children":4427},{"style":997},[4428],{"type":401,"value":4429}," resp.json()  ",{"type":392,"tag":972,"props":4431,"children":4432},{"style":1255},[4433],{"type":401,"value":4434},"# {\"url\": ..., \"expires_at\": ..., \"token_expires_at\": ...}\n",{"type":392,"tag":972,"props":4436,"children":4437},{"class":974,"line":2024},[4438],{"type":392,"tag":972,"props":4439,"children":4440},{"emptyLinePlaceholder":1419},[4441],{"type":401,"value":1422},{"type":392,"tag":972,"props":4443,"children":4444},{"class":974,"line":2032},[4445],{"type":392,"tag":972,"props":4446,"children":4447},{"emptyLinePlaceholder":1419},[4448],{"type":401,"value":1422},{"type":392,"tag":972,"props":4450,"children":4451},{"class":974,"line":2041},[4452,4456,4461,4465,4469,4474,4478,4482,4487,4491,4495,4500,4504],{"type":392,"tag":972,"props":4453,"children":4454},{"style":1264},[4455],{"type":401,"value":4215},{"type":392,"tag":972,"props":4457,"children":4458},{"style":979},[4459],{"type":401,"value":4460}," end_portal_sessions",{"type":392,"tag":972,"props":4462,"children":4463},{"style":997},[4464],{"type":401,"value":4225},{"type":392,"tag":972,"props":4466,"children":4467},{"style":985},[4468],{"type":401,"value":4230},{"type":392,"tag":972,"props":4470,"children":4471},{"style":997},[4472],{"type":401,"value":4473},", session_id: ",{"type":392,"tag":972,"props":4475,"children":4476},{"style":985},[4477],{"type":401,"value":4230},{"type":392,"tag":972,"props":4479,"children":4480},{"style":1264},[4481],{"type":401,"value":1598},{"type":392,"tag":972,"props":4483,"children":4484},{"style":985},[4485],{"type":401,"value":4486}," None",{"type":392,"tag":972,"props":4488,"children":4489},{"style":1264},[4490],{"type":401,"value":1277},{"type":392,"tag":972,"props":4492,"children":4493},{"style":985},[4494],{"type":401,"value":4486},{"type":392,"tag":972,"props":4496,"children":4497},{"style":997},[4498],{"type":401,"value":4499},") -> ",{"type":392,"tag":972,"props":4501,"children":4502},{"style":985},[4503],{"type":401,"value":2730},{"type":392,"tag":972,"props":4505,"children":4506},{"style":997},[4507],{"type":401,"value":4254},{"type":392,"tag":972,"props":4509,"children":4510},{"class":974,"line":2120},[4511,4515,4519],{"type":392,"tag":972,"props":4512,"children":4513},{"style":997},[4514],{"type":401,"value":4270},{"type":392,"tag":972,"props":4516,"children":4517},{"style":1264},[4518],{"type":401,"value":1665},{"type":392,"tag":972,"props":4520,"children":4521},{"style":997},[4522],{"type":401,"value":4279},{"type":392,"tag":972,"props":4524,"children":4525},{"class":974,"line":2185},[4526,4530,4534,4538,4542,4546,4550,4554,4558,4562,4566,4570,4575],{"type":392,"tag":972,"props":4527,"children":4528},{"style":1264},[4529],{"type":401,"value":4287},{"type":392,"tag":972,"props":4531,"children":4532},{"style":991},[4533],{"type":401,"value":1015},{"type":392,"tag":972,"props":4535,"children":4536},{"style":985},[4537],{"type":401,"value":4296},{"type":392,"tag":972,"props":4539,"children":4540},{"style":991},[4541],{"type":401,"value":4301},{"type":392,"tag":972,"props":4543,"children":4544},{"style":985},[4545],{"type":401,"value":4306},{"type":392,"tag":972,"props":4547,"children":4548},{"style":997},[4549],{"type":401,"value":4311},{"type":392,"tag":972,"props":4551,"children":4552},{"style":1447},[4553],{"type":401,"value":4316},{"type":392,"tag":972,"props":4555,"children":4556},{"style":1264},[4557],{"type":401,"value":1665},{"type":392,"tag":972,"props":4559,"children":4560},{"style":991},[4561],{"type":401,"value":4325},{"type":392,"tag":972,"props":4563,"children":4564},{"style":997},[4565],{"type":401,"value":1679},{"type":392,"tag":972,"props":4567,"children":4568},{"style":985},[4569],{"type":401,"value":4334},{"type":392,"tag":972,"props":4571,"children":4572},{"style":991},[4573],{"type":401,"value":4574},"/portal-sessions/expire\"",{"type":392,"tag":972,"props":4576,"children":4577},{"style":997},[4578],{"type":401,"value":1562},{"type":392,"tag":972,"props":4580,"children":4581},{"class":974,"line":2201},[4582,4586,4590,4594,4598,4603,4608,4613,4618],{"type":392,"tag":972,"props":4583,"children":4584},{"style":1447},[4585],{"type":401,"value":4351},{"type":392,"tag":972,"props":4587,"children":4588},{"style":1264},[4589],{"type":401,"value":1665},{"type":392,"tag":972,"props":4591,"children":4592},{"style":997},[4593],{"type":401,"value":4306},{"type":392,"tag":972,"props":4595,"children":4596},{"style":991},[4597],{"type":401,"value":3959},{"type":392,"tag":972,"props":4599,"children":4600},{"style":997},[4601],{"type":401,"value":4602},": session_id} ",{"type":392,"tag":972,"props":4604,"children":4605},{"style":1264},[4606],{"type":401,"value":4607},"if",{"type":392,"tag":972,"props":4609,"children":4610},{"style":997},[4611],{"type":401,"value":4612}," session_id ",{"type":392,"tag":972,"props":4614,"children":4615},{"style":1264},[4616],{"type":401,"value":4617},"else",{"type":392,"tag":972,"props":4619,"children":4620},{"style":997},[4621],{"type":401,"value":1670},{"type":392,"tag":972,"props":4623,"children":4624},{"class":974,"line":2233},[4625,4629,4633,4637],{"type":392,"tag":972,"props":4626,"children":4627},{"style":1447},[4628],{"type":401,"value":4368},{"type":392,"tag":972,"props":4630,"children":4631},{"style":1264},[4632],{"type":401,"value":1665},{"type":392,"tag":972,"props":4634,"children":4635},{"style":985},[4636],{"type":401,"value":1809},{"type":392,"tag":972,"props":4638,"children":4639},{"style":997},[4640],{"type":401,"value":1562},{"type":392,"tag":972,"props":4642,"children":4643},{"class":974,"line":2277},[4644,4648,4652,4656],{"type":392,"tag":972,"props":4645,"children":4646},{"style":1447},[4647],{"type":401,"value":4388},{"type":392,"tag":972,"props":4649,"children":4650},{"style":1264},[4651],{"type":401,"value":1665},{"type":392,"tag":972,"props":4653,"children":4654},{"style":985},[4655],{"type":401,"value":4397},{"type":392,"tag":972,"props":4657,"children":4658},{"style":997},[4659],{"type":401,"value":1562},{"type":392,"tag":972,"props":4661,"children":4662},{"class":974,"line":2285},[4663],{"type":392,"tag":972,"props":4664,"children":4665},{"style":997},[4666],{"type":401,"value":4409},{"type":392,"tag":972,"props":4668,"children":4669},{"class":974,"line":2370},[4670],{"type":392,"tag":972,"props":4671,"children":4672},{"style":997},[4673],{"type":401,"value":4417},{"type":392,"tag":972,"props":4675,"children":4676},{"class":974,"line":2425},[4677,4681,4686,4691],{"type":392,"tag":972,"props":4678,"children":4679},{"style":1264},[4680],{"type":401,"value":3488},{"type":392,"tag":972,"props":4682,"children":4683},{"style":997},[4684],{"type":401,"value":4685}," resp.json()[",{"type":392,"tag":972,"props":4687,"children":4688},{"style":991},[4689],{"type":401,"value":4690},"\"ended\"",{"type":392,"tag":972,"props":4692,"children":4693},{"style":997},[4694],{"type":401,"value":4695},"]\n",{"type":392,"tag":1238,"props":4697,"children":4698},{"v-slot:curl":360},[4699],{"type":392,"tag":962,"props":4700,"children":4702},{"className":964,"code":4701,"language":966,"meta":360,"style":360},"curl --user \"$RELAY_KEY:$RELAY_SECRET\" \\\n  -H 'Content-Type: application/json' \\\n  -X POST https://my.webhookrelay.com/v1/outbound/consumers/acme_corp/portal-sessions \\\n  -d '{\"capabilities\": \"manage\", \"session_id\": \"user-123\"}'\n",[4703],{"type":392,"tag":453,"props":4704,"children":4705},{"__ignoreMap":360},[4706,4741,4756,4777],{"type":392,"tag":972,"props":4707,"children":4708},{"class":974,"line":975},[4709,4713,4717,4721,4725,4729,4733,4737],{"type":392,"tag":972,"props":4710,"children":4711},{"style":979},[4712],{"type":401,"value":982},{"type":392,"tag":972,"props":4714,"children":4715},{"style":985},[4716],{"type":401,"value":988},{"type":392,"tag":972,"props":4718,"children":4719},{"style":991},[4720],{"type":401,"value":994},{"type":392,"tag":972,"props":4722,"children":4723},{"style":997},[4724],{"type":401,"value":1000},{"type":392,"tag":972,"props":4726,"children":4727},{"style":991},[4728],{"type":401,"value":1005},{"type":392,"tag":972,"props":4730,"children":4731},{"style":997},[4732],{"type":401,"value":1010},{"type":392,"tag":972,"props":4734,"children":4735},{"style":991},[4736],{"type":401,"value":1015},{"type":392,"tag":972,"props":4738,"children":4739},{"style":985},[4740],{"type":401,"value":1020},{"type":392,"tag":972,"props":4742,"children":4743},{"class":974,"line":1023},[4744,4748,4752],{"type":392,"tag":972,"props":4745,"children":4746},{"style":985},[4747],{"type":401,"value":1029},{"type":392,"tag":972,"props":4749,"children":4750},{"style":991},[4751],{"type":401,"value":1034},{"type":392,"tag":972,"props":4753,"children":4754},{"style":985},[4755],{"type":401,"value":1020},{"type":392,"tag":972,"props":4757,"children":4758},{"class":974,"line":1041},[4759,4763,4768,4773],{"type":392,"tag":972,"props":4760,"children":4761},{"style":985},[4762],{"type":401,"value":1047},{"type":392,"tag":972,"props":4764,"children":4765},{"style":991},[4766],{"type":401,"value":4767}," POST",{"type":392,"tag":972,"props":4769,"children":4770},{"style":991},[4771],{"type":401,"value":4772}," https://my.webhookrelay.com/v1/outbound/consumers/acme_corp/portal-sessions",{"type":392,"tag":972,"props":4774,"children":4775},{"style":985},[4776],{"type":401,"value":1020},{"type":392,"tag":972,"props":4778,"children":4779},{"class":974,"line":1064},[4780,4784],{"type":392,"tag":972,"props":4781,"children":4782},{"style":985},[4783],{"type":401,"value":1070},{"type":392,"tag":972,"props":4785,"children":4786},{"style":991},[4787],{"type":401,"value":4788}," '{\"capabilities\": \"manage\", \"session_id\": \"user-123\"}'\n",{"type":392,"tag":393,"props":4790,"children":4791},{},[4792,4794,4800],{"type":401,"value":4793},"The response is ",{"type":392,"tag":453,"props":4795,"children":4797},{"className":4796},[],[4798],{"type":401,"value":4799},"201 Created",{"type":401,"value":1005},{"type":392,"tag":962,"props":4802,"children":4805},{"className":4803,"code":4804,"language":1994,"meta":360,"style":360},"language-json shiki shiki-themes github-dark","{\n  \"url\": \"https://my.webhookrelay.com/portal/8e003056-845f-492b-8701-6cd9c9108611#token=wrpt_…\",\n  \"expires_at\": \"2026-11-26T18:11:00Z\",\n  \"token_expires_at\": \"2026-11-26T06:26:00Z\"\n}\n",[4806],{"type":392,"tag":453,"props":4807,"children":4808},{"__ignoreMap":360},[4809,4817,4838,4859,4876],{"type":392,"tag":972,"props":4810,"children":4811},{"class":974,"line":975},[4812],{"type":392,"tag":972,"props":4813,"children":4814},{"style":997},[4815],{"type":401,"value":4816},"{\n",{"type":392,"tag":972,"props":4818,"children":4819},{"class":974,"line":1023},[4820,4825,4829,4834],{"type":392,"tag":972,"props":4821,"children":4822},{"style":985},[4823],{"type":401,"value":4824},"  \"url\"",{"type":392,"tag":972,"props":4826,"children":4827},{"style":997},[4828],{"type":401,"value":1824},{"type":392,"tag":972,"props":4830,"children":4831},{"style":991},[4832],{"type":401,"value":4833},"\"https://my.webhookrelay.com/portal/8e003056-845f-492b-8701-6cd9c9108611#token=wrpt_…\"",{"type":392,"tag":972,"props":4835,"children":4836},{"style":997},[4837],{"type":401,"value":1562},{"type":392,"tag":972,"props":4839,"children":4840},{"class":974,"line":1041},[4841,4846,4850,4855],{"type":392,"tag":972,"props":4842,"children":4843},{"style":985},[4844],{"type":401,"value":4845},"  \"expires_at\"",{"type":392,"tag":972,"props":4847,"children":4848},{"style":997},[4849],{"type":401,"value":1824},{"type":392,"tag":972,"props":4851,"children":4852},{"style":991},[4853],{"type":401,"value":4854},"\"2026-11-26T18:11:00Z\"",{"type":392,"tag":972,"props":4856,"children":4857},{"style":997},[4858],{"type":401,"value":1562},{"type":392,"tag":972,"props":4860,"children":4861},{"class":974,"line":1064},[4862,4867,4871],{"type":392,"tag":972,"props":4863,"children":4864},{"style":985},[4865],{"type":401,"value":4866},"  \"token_expires_at\"",{"type":392,"tag":972,"props":4868,"children":4869},{"style":997},[4870],{"type":401,"value":1824},{"type":392,"tag":972,"props":4872,"children":4873},{"style":991},[4874],{"type":401,"value":4875},"\"2026-11-26T06:26:00Z\"\n",{"type":392,"tag":972,"props":4877,"children":4878},{"class":974,"line":1078},[4879],{"type":392,"tag":972,"props":4880,"children":4881},{"style":997},[4882],{"type":401,"value":2021},{"type":392,"tag":393,"props":4884,"children":4885},{},[4886,4891,4893,4898,4900,4905],{"type":392,"tag":453,"props":4887,"children":4889},{"className":4888},[],[4890],{"type":401,"value":1485},{"type":401,"value":4892}," is the deadline for opening the link (15 minutes). ",{"type":392,"tag":453,"props":4894,"children":4896},{"className":4895},[],[4897],{"type":401,"value":1468},{"type":401,"value":4899}," is when the session ends once it's open. Treat ",{"type":392,"tag":453,"props":4901,"children":4903},{"className":4902},[],[4904],{"type":401,"value":664},{"type":401,"value":4906}," like a password until it's used: return it only to the signed-in user, never log it, and don't cache the response.",{"type":392,"tag":432,"props":4908,"children":4909},{},[4910,4931],{"type":392,"tag":436,"props":4911,"children":4912},{},[4913],{"type":392,"tag":440,"props":4914,"children":4915},{},[4916,4921,4926],{"type":392,"tag":444,"props":4917,"children":4918},{},[4919],{"type":401,"value":4920},"Option",{"type":392,"tag":444,"props":4922,"children":4923},{},[4924],{"type":401,"value":4925},"Default",{"type":392,"tag":444,"props":4927,"children":4928},{},[4929],{"type":401,"value":4930},"Notes",{"type":392,"tag":473,"props":4932,"children":4933},{},[4934,4970,4997,5057],{"type":392,"tag":440,"props":4935,"children":4936},{},[4937,4945,4953],{"type":392,"tag":480,"props":4938,"children":4939},{},[4940],{"type":392,"tag":453,"props":4941,"children":4943},{"className":4942},[],[4944],{"type":401,"value":1583},{"type":392,"tag":480,"props":4946,"children":4947},{},[4948],{"type":392,"tag":453,"props":4949,"children":4951},{"className":4950},[],[4952],{"type":401,"value":458},{"type":392,"tag":480,"props":4954,"children":4955},{},[4956,4961,4963,4968],{"type":392,"tag":453,"props":4957,"children":4959},{"className":4958},[],[4960],{"type":401,"value":458},{"type":401,"value":4962}," lets the customer change endpoints, send tests and recover deliveries; ",{"type":392,"tag":453,"props":4964,"children":4966},{"className":4965},[],[4967],{"type":401,"value":469},{"type":401,"value":4969}," only browses. Pick per user role.",{"type":392,"tag":440,"props":4971,"children":4972},{},[4973,4981,4986],{"type":392,"tag":480,"props":4974,"children":4975},{},[4976],{"type":392,"tag":453,"props":4977,"children":4979},{"className":4978},[],[4980],{"type":401,"value":1612},{"type":392,"tag":480,"props":4982,"children":4983},{},[4984],{"type":401,"value":4985},"43200 (12 hours)",{"type":392,"tag":480,"props":4987,"children":4988},{},[4989,4991,4996],{"type":401,"value":4990},"Session lifetime in seconds after the link is opened, from 3600 (1 hour) to 604800 (7 days). Out of range is ",{"type":392,"tag":453,"props":4992,"children":4994},{"className":4993},[],[4995],{"type":401,"value":1170},{"type":401,"value":666},{"type":392,"tag":440,"props":4998,"children":4999},{},[5000,5008,5017],{"type":392,"tag":480,"props":5001,"children":5002},{},[5003],{"type":392,"tag":453,"props":5004,"children":5006},{"className":5005},[],[5007],{"type":401,"value":1630},{"type":392,"tag":480,"props":5009,"children":5010},{},[5011],{"type":392,"tag":453,"props":5012,"children":5014},{"className":5013},[],[5015],{"type":401,"value":5016},"endpoints",{"type":392,"tag":480,"props":5018,"children":5019},{},[5020,5022,5027,5028,5034,5035,5041,5042,5048,5049,5055],{"type":401,"value":5021},"The page to open: ",{"type":392,"tag":453,"props":5023,"children":5025},{"className":5024},[],[5026],{"type":401,"value":5016},{"type":401,"value":1814},{"type":392,"tag":453,"props":5029,"children":5031},{"className":5030},[],[5032],{"type":401,"value":5033},"endpoints/new",{"type":401,"value":1814},{"type":392,"tag":453,"props":5036,"children":5038},{"className":5037},[],[5039],{"type":401,"value":5040},"endpoints/\u003Cid>",{"type":401,"value":1814},{"type":392,"tag":453,"props":5043,"children":5045},{"className":5044},[],[5046],{"type":401,"value":5047},"event-types",{"type":401,"value":860},{"type":392,"tag":453,"props":5050,"children":5052},{"className":5051},[],[5053],{"type":401,"value":5054},"messages/\u003Cid>",{"type":401,"value":5056},". Useful for deep links such as \"Add your first endpoint\".",{"type":392,"tag":440,"props":5058,"children":5059},{},[5060,5068,5073],{"type":392,"tag":480,"props":5061,"children":5062},{},[5063],{"type":392,"tag":453,"props":5064,"children":5066},{"className":5065},[],[5067],{"type":401,"value":1647},{"type":392,"tag":480,"props":5069,"children":5070},{},[5071],{"type":401,"value":5072},"none",{"type":392,"tag":480,"props":5074,"children":5075},{},[5076,5078,5084],{"type":401,"value":5077},"Your own tag, up to 128 characters, such as ",{"type":392,"tag":453,"props":5079,"children":5081},{"className":5080},[],[5082],{"type":401,"value":5083},"user-123",{"type":401,"value":5085},". Use it to end that user's sessions later.",{"type":392,"tag":432,"props":5087,"children":5088},{},[5089,5105],{"type":392,"tag":436,"props":5090,"children":5091},{},[5092],{"type":392,"tag":440,"props":5093,"children":5094},{},[5095,5100],{"type":392,"tag":444,"props":5096,"children":5097},{},[5098],{"type":401,"value":5099},"Response",{"type":392,"tag":444,"props":5101,"children":5102},{},[5103],{"type":401,"value":5104},"Meaning",{"type":392,"tag":473,"props":5106,"children":5107},{},[5108,5125,5148,5173],{"type":392,"tag":440,"props":5109,"children":5110},{},[5111,5120],{"type":392,"tag":480,"props":5112,"children":5113},{},[5114],{"type":392,"tag":453,"props":5115,"children":5117},{"className":5116},[],[5118],{"type":401,"value":5119},"201",{"type":392,"tag":480,"props":5121,"children":5122},{},[5123],{"type":401,"value":5124},"The link was created.",{"type":392,"tag":440,"props":5126,"children":5127},{},[5128,5136],{"type":392,"tag":480,"props":5129,"children":5130},{},[5131],{"type":392,"tag":453,"props":5132,"children":5134},{"className":5133},[],[5135],{"type":401,"value":1170},{"type":392,"tag":480,"props":5137,"children":5138},{},[5139,5141,5146],{"type":401,"value":5140},"An invalid option, such as ",{"type":392,"tag":453,"props":5142,"children":5144},{"className":5143},[],[5145],{"type":401,"value":1612},{"type":401,"value":5147}," out of range.",{"type":392,"tag":440,"props":5149,"children":5150},{},[5151,5168],{"type":392,"tag":480,"props":5152,"children":5153},{},[5154,5160,5162],{"type":392,"tag":453,"props":5155,"children":5157},{"className":5156},[],[5158],{"type":401,"value":5159},"401",{"type":401,"value":5161}," / ",{"type":392,"tag":453,"props":5163,"children":5165},{"className":5164},[],[5166],{"type":401,"value":5167},"403",{"type":392,"tag":480,"props":5169,"children":5170},{},[5171],{"type":401,"value":5172},"Missing or wrong credentials, or a token without outbound access, or bound to another environment.",{"type":392,"tag":440,"props":5174,"children":5175},{},[5176,5185],{"type":392,"tag":480,"props":5177,"children":5178},{},[5179],{"type":392,"tag":453,"props":5180,"children":5182},{"className":5181},[],[5183],{"type":401,"value":5184},"404",{"type":392,"tag":480,"props":5186,"children":5187},{},[5188],{"type":401,"value":5189},"No consumer with that ID in this environment, or an unknown environment.",{"type":392,"tag":5191,"props":5192,"children":5194},"callout",{"label":5193},"SDK support",[5195],{"type":392,"tag":393,"props":5196,"children":5197},{},[5198,5200,5206,5207,5213,5215,5221,5223,5229,5231,5237,5238,5244,5246,5252],{"type":401,"value":5199},"The TypeScript and Go SDKs add portal helpers in their next releases: ",{"type":392,"tag":453,"props":5201,"children":5203},{"className":5202},[],[5204],{"type":401,"value":5205},"relay.outbound.portalSessions.create()",{"type":401,"value":5161},{"type":392,"tag":453,"props":5208,"children":5210},{"className":5209},[],[5211],{"type":401,"value":5212},".expire()",{"type":401,"value":5214}," and a React ",{"type":392,"tag":453,"props":5216,"children":5218},{"className":5217},[],[5219],{"type":401,"value":5220},"\u003CWebhookRelayPortal url={url} />",{"type":401,"value":5222}," component in ",{"type":392,"tag":453,"props":5224,"children":5226},{"className":5225},[],[5227],{"type":401,"value":5228},"@webhookrelay/sdk",{"type":401,"value":5230},", and ",{"type":392,"tag":453,"props":5232,"children":5234},{"className":5233},[],[5235],{"type":401,"value":5236},"CreateOutboundPortalSession",{"type":401,"value":5161},{"type":392,"tag":453,"props":5239,"children":5241},{"className":5240},[],[5242],{"type":401,"value":5243},"ExpireOutboundPortalSessions",{"type":401,"value":5245}," in ",{"type":392,"tag":453,"props":5247,"children":5249},{"className":5248},[],[5250],{"type":401,"value":5251},"webhookrelay-go",{"type":401,"value":5253},". Until those versions are published, call the REST endpoint as shown above. It's the same request.",{"type":392,"tag":425,"props":5255,"children":5257},{"id":5256},"embed-it-in-your-app",[5258],{"type":401,"value":5259},"Embed it in your app",{"type":392,"tag":393,"props":5261,"children":5262},{},[5263,5265,5271],{"type":401,"value":5264},"Expose a small authenticated route that mints a link for the signed-in user. Your settings page calls it and puts the URL in an iframe. Use ",{"type":392,"tag":453,"props":5266,"children":5268},{"className":5267},[],[5269],{"type":401,"value":5270},"POST",{"type":401,"value":5272}," so that browsers, link previews and prefetchers never trigger it, because each link works only once.",{"type":392,"tag":1232,"props":5274,"children":5276},{"group":1234,"tabs":5275},"node:Node.js / TypeScript,go:Go,python:Python",[5277,5627,6085],{"type":392,"tag":1238,"props":5278,"children":5279},{"v-slot:node":360},[5280],{"type":392,"tag":962,"props":5281,"children":5283},{"className":1243,"code":5282,"language":1245,"meta":360,"style":360},"// Express 5. requireUser is your own auth middleware.\nimport express from \"express\";\nimport { createPortalSession } from \"./portal\";\n\nconst app = express();\n\napp.post(\"/api/webhooks/portal\", requireUser, async (req, res) => {\n  const user = req.user;\n  const { url } = await createPortalSession(user.organizationId, {\n    capabilities: user.isAdmin ? \"manage\" : \"read\",\n    session_id: `user-${user.id}`,\n  });\n  res.set(\"Cache-Control\", \"no-store\").json({ url });\n});\n",[5284],{"type":392,"tag":453,"props":5285,"children":5286},{"__ignoreMap":360},[5287,5295,5320,5345,5352,5378,5385,5447,5468,5504,5533,5568,5575,5619],{"type":392,"tag":972,"props":5288,"children":5289},{"class":974,"line":975},[5290],{"type":392,"tag":972,"props":5291,"children":5292},{"style":1255},[5293],{"type":401,"value":5294},"// Express 5. requireUser is your own auth middleware.\n",{"type":392,"tag":972,"props":5296,"children":5297},{"class":974,"line":1023},[5298,5302,5307,5311,5316],{"type":392,"tag":972,"props":5299,"children":5300},{"style":1264},[5301],{"type":401,"value":2478},{"type":392,"tag":972,"props":5303,"children":5304},{"style":997},[5305],{"type":401,"value":5306}," express ",{"type":392,"tag":972,"props":5308,"children":5309},{"style":1264},[5310],{"type":401,"value":1327},{"type":392,"tag":972,"props":5312,"children":5313},{"style":991},[5314],{"type":401,"value":5315}," \"express\"",{"type":392,"tag":972,"props":5317,"children":5318},{"style":997},[5319],{"type":401,"value":1287},{"type":392,"tag":972,"props":5321,"children":5322},{"class":974,"line":1041},[5323,5327,5332,5336,5341],{"type":392,"tag":972,"props":5324,"children":5325},{"style":1264},[5326],{"type":401,"value":2478},{"type":392,"tag":972,"props":5328,"children":5329},{"style":997},[5330],{"type":401,"value":5331}," { createPortalSession } ",{"type":392,"tag":972,"props":5333,"children":5334},{"style":1264},[5335],{"type":401,"value":1327},{"type":392,"tag":972,"props":5337,"children":5338},{"style":991},[5339],{"type":401,"value":5340}," \"./portal\"",{"type":392,"tag":972,"props":5342,"children":5343},{"style":997},[5344],{"type":401,"value":1287},{"type":392,"tag":972,"props":5346,"children":5347},{"class":974,"line":1064},[5348],{"type":392,"tag":972,"props":5349,"children":5350},{"emptyLinePlaceholder":1419},[5351],{"type":401,"value":1422},{"type":392,"tag":972,"props":5353,"children":5354},{"class":974,"line":1078},[5355,5359,5364,5368,5373],{"type":392,"tag":972,"props":5356,"children":5357},{"style":1264},[5358],{"type":401,"value":1267},{"type":392,"tag":972,"props":5360,"children":5361},{"style":985},[5362],{"type":401,"value":5363}," app",{"type":392,"tag":972,"props":5365,"children":5366},{"style":1264},[5367],{"type":401,"value":1277},{"type":392,"tag":972,"props":5369,"children":5370},{"style":979},[5371],{"type":401,"value":5372}," express",{"type":392,"tag":972,"props":5374,"children":5375},{"style":997},[5376],{"type":401,"value":5377},"();\n",{"type":392,"tag":972,"props":5379,"children":5380},{"class":974,"line":1087},[5381],{"type":392,"tag":972,"props":5382,"children":5383},{"emptyLinePlaceholder":1419},[5384],{"type":401,"value":1422},{"type":392,"tag":972,"props":5386,"children":5387},{"class":974,"line":1096},[5388,5393,5398,5402,5407,5412,5417,5421,5426,5430,5434,5438,5443],{"type":392,"tag":972,"props":5389,"children":5390},{"style":997},[5391],{"type":401,"value":5392},"app.",{"type":392,"tag":972,"props":5394,"children":5395},{"style":979},[5396],{"type":401,"value":5397},"post",{"type":392,"tag":972,"props":5399,"children":5400},{"style":997},[5401],{"type":401,"value":1332},{"type":392,"tag":972,"props":5403,"children":5404},{"style":991},[5405],{"type":401,"value":5406},"\"/api/webhooks/portal\"",{"type":392,"tag":972,"props":5408,"children":5409},{"style":997},[5410],{"type":401,"value":5411},", requireUser, ",{"type":392,"tag":972,"props":5413,"children":5414},{"style":1264},[5415],{"type":401,"value":5416},"async",{"type":392,"tag":972,"props":5418,"children":5419},{"style":997},[5420],{"type":401,"value":1214},{"type":392,"tag":972,"props":5422,"children":5423},{"style":1447},[5424],{"type":401,"value":5425},"req",{"type":392,"tag":972,"props":5427,"children":5428},{"style":997},[5429],{"type":401,"value":1814},{"type":392,"tag":972,"props":5431,"children":5432},{"style":1447},[5433],{"type":401,"value":1923},{"type":392,"tag":972,"props":5435,"children":5436},{"style":997},[5437],{"type":401,"value":2976},{"type":392,"tag":972,"props":5439,"children":5440},{"style":1264},[5441],{"type":401,"value":5442},"=>",{"type":392,"tag":972,"props":5444,"children":5445},{"style":997},[5446],{"type":401,"value":2694},{"type":392,"tag":972,"props":5448,"children":5449},{"class":974,"line":1105},[5450,5454,5459,5463],{"type":392,"tag":972,"props":5451,"children":5452},{"style":1264},[5453],{"type":401,"value":1712},{"type":392,"tag":972,"props":5455,"children":5456},{"style":985},[5457],{"type":401,"value":5458}," user",{"type":392,"tag":972,"props":5460,"children":5461},{"style":1264},[5462],{"type":401,"value":1277},{"type":392,"tag":972,"props":5464,"children":5465},{"style":997},[5466],{"type":401,"value":5467}," req.user;\n",{"type":392,"tag":972,"props":5469,"children":5470},{"class":974,"line":1114},[5471,5475,5479,5483,5487,5491,5495,5499],{"type":392,"tag":972,"props":5472,"children":5473},{"style":1264},[5474],{"type":401,"value":1712},{"type":392,"tag":972,"props":5476,"children":5477},{"style":997},[5478],{"type":401,"value":1444},{"type":392,"tag":972,"props":5480,"children":5481},{"style":985},[5482],{"type":401,"value":664},{"type":392,"tag":972,"props":5484,"children":5485},{"style":997},[5486],{"type":401,"value":1660},{"type":392,"tag":972,"props":5488,"children":5489},{"style":1264},[5490],{"type":401,"value":1665},{"type":392,"tag":972,"props":5492,"children":5493},{"style":1264},[5494],{"type":401,"value":1726},{"type":392,"tag":972,"props":5496,"children":5497},{"style":979},[5498],{"type":401,"value":1536},{"type":392,"tag":972,"props":5500,"children":5501},{"style":997},[5502],{"type":401,"value":5503},"(user.organizationId, {\n",{"type":392,"tag":972,"props":5505,"children":5506},{"class":974,"line":1123},[5507,5512,5516,5520,5525,5529],{"type":392,"tag":972,"props":5508,"children":5509},{"style":997},[5510],{"type":401,"value":5511},"    capabilities: user.isAdmin ",{"type":392,"tag":972,"props":5513,"children":5514},{"style":1264},[5515],{"type":401,"value":2260},{"type":392,"tag":972,"props":5517,"children":5518},{"style":991},[5519],{"type":401,"value":1593},{"type":392,"tag":972,"props":5521,"children":5522},{"style":1264},[5523],{"type":401,"value":5524}," :",{"type":392,"tag":972,"props":5526,"children":5527},{"style":991},[5528],{"type":401,"value":1603},{"type":392,"tag":972,"props":5530,"children":5531},{"style":997},[5532],{"type":401,"value":1562},{"type":392,"tag":972,"props":5534,"children":5535},{"class":974,"line":1132},[5536,5541,5546,5551,5555,5560,5564],{"type":392,"tag":972,"props":5537,"children":5538},{"style":997},[5539],{"type":401,"value":5540},"    session_id: ",{"type":392,"tag":972,"props":5542,"children":5543},{"style":991},[5544],{"type":401,"value":5545},"`user-${",{"type":392,"tag":972,"props":5547,"children":5548},{"style":997},[5549],{"type":401,"value":5550},"user",{"type":392,"tag":972,"props":5552,"children":5553},{"style":991},[5554],{"type":401,"value":666},{"type":392,"tag":972,"props":5556,"children":5557},{"style":997},[5558],{"type":401,"value":5559},"id",{"type":392,"tag":972,"props":5561,"children":5562},{"style":991},[5563],{"type":401,"value":1389},{"type":392,"tag":972,"props":5565,"children":5566},{"style":997},[5567],{"type":401,"value":1562},{"type":392,"tag":972,"props":5569,"children":5570},{"class":974,"line":1673},[5571],{"type":392,"tag":972,"props":5572,"children":5573},{"style":997},[5574],{"type":401,"value":1871},{"type":392,"tag":972,"props":5576,"children":5577},{"class":974,"line":1706},[5578,5583,5588,5592,5597,5601,5606,5610,5614],{"type":392,"tag":972,"props":5579,"children":5580},{"style":997},[5581],{"type":401,"value":5582},"  res.",{"type":392,"tag":972,"props":5584,"children":5585},{"style":979},[5586],{"type":401,"value":5587},"set",{"type":392,"tag":972,"props":5589,"children":5590},{"style":997},[5591],{"type":401,"value":1332},{"type":392,"tag":972,"props":5593,"children":5594},{"style":991},[5595],{"type":401,"value":5596},"\"Cache-Control\"",{"type":392,"tag":972,"props":5598,"children":5599},{"style":997},[5600],{"type":401,"value":1814},{"type":392,"tag":972,"props":5602,"children":5603},{"style":991},[5604],{"type":401,"value":5605},"\"no-store\"",{"type":392,"tag":972,"props":5607,"children":5608},{"style":997},[5609],{"type":401,"value":1394},{"type":392,"tag":972,"props":5611,"children":5612},{"style":979},[5613],{"type":401,"value":1994},{"type":392,"tag":972,"props":5615,"children":5616},{"style":997},[5617],{"type":401,"value":5618},"({ url });\n",{"type":392,"tag":972,"props":5620,"children":5621},{"class":974,"line":1780},[5622],{"type":392,"tag":972,"props":5623,"children":5624},{"style":997},[5625],{"type":401,"value":5626},"});\n",{"type":392,"tag":1238,"props":5628,"children":5629},{"v-slot:go":360},[5630],{"type":392,"tag":962,"props":5631,"children":5633},{"className":2436,"code":5632,"language":2438,"meta":360,"style":360},"// Register with: mux.Handle(\"POST /api/webhooks/portal\", requireUser(portalHandler))\nfunc portalHandler(w http.ResponseWriter, r *http.Request) {\n    user := currentUser(r) // your own auth\n    caps := \"read\"\n    if user.IsAdmin {\n        caps = \"manage\"\n    }\n    link, err := CreatePortalSession(r.Context(), user.OrganizationID, PortalSessionOptions{\n        Capabilities: caps,\n        SessionID:    \"user-\" + user.ID,\n    })\n    if err != nil {\n        http.Error(w, \"could not open the webhooks portal\", http.StatusBadGateway)\n        return\n    }\n    w.Header().Set(\"Cache-Control\", \"no-store\")\n    w.Header().Set(\"Content-Type\", \"application/json\")\n    json.NewEncoder(w).Encode(map[string]string{\"url\": link.URL})\n}\n",[5634],{"type":392,"tag":453,"props":5635,"children":5636},{"__ignoreMap":360},[5637,5645,5712,5739,5756,5768,5785,5792,5831,5839,5861,5869,5892,5920,5928,5935,5977,6016,6078],{"type":392,"tag":972,"props":5638,"children":5639},{"class":974,"line":975},[5640],{"type":392,"tag":972,"props":5641,"children":5642},{"style":1255},[5643],{"type":401,"value":5644},"// Register with: mux.Handle(\"POST /api/webhooks/portal\", requireUser(portalHandler))\n",{"type":392,"tag":972,"props":5646,"children":5647},{"class":974,"line":1023},[5648,5652,5657,5661,5666,5671,5675,5680,5684,5689,5694,5699,5703,5708],{"type":392,"tag":972,"props":5649,"children":5650},{"style":1264},[5651],{"type":401,"value":2907},{"type":392,"tag":972,"props":5653,"children":5654},{"style":979},[5655],{"type":401,"value":5656}," portalHandler",{"type":392,"tag":972,"props":5658,"children":5659},{"style":997},[5660],{"type":401,"value":1332},{"type":392,"tag":972,"props":5662,"children":5663},{"style":1447},[5664],{"type":401,"value":5665},"w",{"type":392,"tag":972,"props":5667,"children":5668},{"style":979},[5669],{"type":401,"value":5670}," http",{"type":392,"tag":972,"props":5672,"children":5673},{"style":997},[5674],{"type":401,"value":666},{"type":392,"tag":972,"props":5676,"children":5677},{"style":979},[5678],{"type":401,"value":5679},"ResponseWriter",{"type":392,"tag":972,"props":5681,"children":5682},{"style":997},[5683],{"type":401,"value":1814},{"type":392,"tag":972,"props":5685,"children":5686},{"style":1447},[5687],{"type":401,"value":5688},"r",{"type":392,"tag":972,"props":5690,"children":5691},{"style":1264},[5692],{"type":401,"value":5693}," *",{"type":392,"tag":972,"props":5695,"children":5696},{"style":979},[5697],{"type":401,"value":5698},"http",{"type":392,"tag":972,"props":5700,"children":5701},{"style":997},[5702],{"type":401,"value":666},{"type":392,"tag":972,"props":5704,"children":5705},{"style":979},[5706],{"type":401,"value":5707},"Request",{"type":392,"tag":972,"props":5709,"children":5710},{"style":997},[5711],{"type":401,"value":3623},{"type":392,"tag":972,"props":5713,"children":5714},{"class":974,"line":1041},[5715,5720,5724,5729,5734],{"type":392,"tag":972,"props":5716,"children":5717},{"style":997},[5718],{"type":401,"value":5719},"    user ",{"type":392,"tag":972,"props":5721,"children":5722},{"style":1264},[5723],{"type":401,"value":2999},{"type":392,"tag":972,"props":5725,"children":5726},{"style":979},[5727],{"type":401,"value":5728}," currentUser",{"type":392,"tag":972,"props":5730,"children":5731},{"style":997},[5732],{"type":401,"value":5733},"(r) ",{"type":392,"tag":972,"props":5735,"children":5736},{"style":1255},[5737],{"type":401,"value":5738},"// your own auth\n",{"type":392,"tag":972,"props":5740,"children":5741},{"class":974,"line":1064},[5742,5747,5751],{"type":392,"tag":972,"props":5743,"children":5744},{"style":997},[5745],{"type":401,"value":5746},"    caps ",{"type":392,"tag":972,"props":5748,"children":5749},{"style":1264},[5750],{"type":401,"value":2999},{"type":392,"tag":972,"props":5752,"children":5753},{"style":991},[5754],{"type":401,"value":5755}," \"read\"\n",{"type":392,"tag":972,"props":5757,"children":5758},{"class":974,"line":1078},[5759,5763],{"type":392,"tag":972,"props":5760,"children":5761},{"style":1264},[5762],{"type":401,"value":3023},{"type":392,"tag":972,"props":5764,"children":5765},{"style":997},[5766],{"type":401,"value":5767}," user.IsAdmin {\n",{"type":392,"tag":972,"props":5769,"children":5770},{"class":974,"line":1087},[5771,5776,5780],{"type":392,"tag":972,"props":5772,"children":5773},{"style":997},[5774],{"type":401,"value":5775},"        caps ",{"type":392,"tag":972,"props":5777,"children":5778},{"style":1264},[5779],{"type":401,"value":1665},{"type":392,"tag":972,"props":5781,"children":5782},{"style":991},[5783],{"type":401,"value":5784}," \"manage\"\n",{"type":392,"tag":972,"props":5786,"children":5787},{"class":974,"line":1096},[5788],{"type":392,"tag":972,"props":5789,"children":5790},{"style":997},[5791],{"type":401,"value":3065},{"type":392,"tag":972,"props":5793,"children":5794},{"class":974,"line":1105},[5795,5800,5804,5808,5813,5817,5822,5827],{"type":392,"tag":972,"props":5796,"children":5797},{"style":997},[5798],{"type":401,"value":5799},"    link, err ",{"type":392,"tag":972,"props":5801,"children":5802},{"style":1264},[5803],{"type":401,"value":2999},{"type":392,"tag":972,"props":5805,"children":5806},{"style":979},[5807],{"type":401,"value":3550},{"type":392,"tag":972,"props":5809,"children":5810},{"style":997},[5811],{"type":401,"value":5812},"(r.",{"type":392,"tag":972,"props":5814,"children":5815},{"style":979},[5816],{"type":401,"value":2935},{"type":392,"tag":972,"props":5818,"children":5819},{"style":997},[5820],{"type":401,"value":5821},"(), user.OrganizationID, ",{"type":392,"tag":972,"props":5823,"children":5824},{"style":979},[5825],{"type":401,"value":5826},"PortalSessionOptions",{"type":392,"tag":972,"props":5828,"children":5829},{"style":997},[5830],{"type":401,"value":4816},{"type":392,"tag":972,"props":5832,"children":5833},{"class":974,"line":1114},[5834],{"type":392,"tag":972,"props":5835,"children":5836},{"style":997},[5837],{"type":401,"value":5838},"        Capabilities: caps,\n",{"type":392,"tag":972,"props":5840,"children":5841},{"class":974,"line":1123},[5842,5847,5852,5856],{"type":392,"tag":972,"props":5843,"children":5844},{"style":997},[5845],{"type":401,"value":5846},"        SessionID:    ",{"type":392,"tag":972,"props":5848,"children":5849},{"style":991},[5850],{"type":401,"value":5851},"\"user-\"",{"type":392,"tag":972,"props":5853,"children":5854},{"style":1264},[5855],{"type":401,"value":1317},{"type":392,"tag":972,"props":5857,"children":5858},{"style":997},[5859],{"type":401,"value":5860}," user.ID,\n",{"type":392,"tag":972,"props":5862,"children":5863},{"class":974,"line":1132},[5864],{"type":392,"tag":972,"props":5865,"children":5866},{"style":997},[5867],{"type":401,"value":5868},"    })\n",{"type":392,"tag":972,"props":5870,"children":5871},{"class":974,"line":1673},[5872,5876,5880,5884,5888],{"type":392,"tag":972,"props":5873,"children":5874},{"style":1264},[5875],{"type":401,"value":3023},{"type":392,"tag":972,"props":5877,"children":5878},{"style":997},[5879],{"type":401,"value":3028},{"type":392,"tag":972,"props":5881,"children":5882},{"style":1264},[5883],{"type":401,"value":3033},{"type":392,"tag":972,"props":5885,"children":5886},{"style":985},[5887],{"type":401,"value":3038},{"type":392,"tag":972,"props":5889,"children":5890},{"style":997},[5891],{"type":401,"value":2694},{"type":392,"tag":972,"props":5893,"children":5894},{"class":974,"line":1706},[5895,5900,5905,5910,5915],{"type":392,"tag":972,"props":5896,"children":5897},{"style":997},[5898],{"type":401,"value":5899},"        http.",{"type":392,"tag":972,"props":5901,"children":5902},{"style":979},[5903],{"type":401,"value":5904},"Error",{"type":392,"tag":972,"props":5906,"children":5907},{"style":997},[5908],{"type":401,"value":5909},"(w, ",{"type":392,"tag":972,"props":5911,"children":5912},{"style":991},[5913],{"type":401,"value":5914},"\"could not open the webhooks portal\"",{"type":392,"tag":972,"props":5916,"children":5917},{"style":997},[5918],{"type":401,"value":5919},", http.StatusBadGateway)\n",{"type":392,"tag":972,"props":5921,"children":5922},{"class":974,"line":1780},[5923],{"type":392,"tag":972,"props":5924,"children":5925},{"style":1264},[5926],{"type":401,"value":5927},"        return\n",{"type":392,"tag":972,"props":5929,"children":5930},{"class":974,"line":1798},[5931],{"type":392,"tag":972,"props":5932,"children":5933},{"style":997},[5934],{"type":401,"value":3065},{"type":392,"tag":972,"props":5936,"children":5937},{"class":974,"line":1837},[5938,5943,5948,5953,5957,5961,5965,5969,5973],{"type":392,"tag":972,"props":5939,"children":5940},{"style":997},[5941],{"type":401,"value":5942},"    w.",{"type":392,"tag":972,"props":5944,"children":5945},{"style":979},[5946],{"type":401,"value":5947},"Header",{"type":392,"tag":972,"props":5949,"children":5950},{"style":997},[5951],{"type":401,"value":5952},"().",{"type":392,"tag":972,"props":5954,"children":5955},{"style":979},[5956],{"type":401,"value":3227},{"type":392,"tag":972,"props":5958,"children":5959},{"style":997},[5960],{"type":401,"value":1332},{"type":392,"tag":972,"props":5962,"children":5963},{"style":991},[5964],{"type":401,"value":5596},{"type":392,"tag":972,"props":5966,"children":5967},{"style":997},[5968],{"type":401,"value":1814},{"type":392,"tag":972,"props":5970,"children":5971},{"style":991},[5972],{"type":401,"value":5605},{"type":392,"tag":972,"props":5974,"children":5975},{"style":997},[5976],{"type":401,"value":2637},{"type":392,"tag":972,"props":5978,"children":5979},{"class":974,"line":1865},[5980,5984,5988,5992,5996,6000,6004,6008,6012],{"type":392,"tag":972,"props":5981,"children":5982},{"style":997},[5983],{"type":401,"value":5942},{"type":392,"tag":972,"props":5985,"children":5986},{"style":979},[5987],{"type":401,"value":5947},{"type":392,"tag":972,"props":5989,"children":5990},{"style":997},[5991],{"type":401,"value":5952},{"type":392,"tag":972,"props":5993,"children":5994},{"style":979},[5995],{"type":401,"value":3227},{"type":392,"tag":972,"props":5997,"children":5998},{"style":997},[5999],{"type":401,"value":1332},{"type":392,"tag":972,"props":6001,"children":6002},{"style":991},[6003],{"type":401,"value":1819},{"type":392,"tag":972,"props":6005,"children":6006},{"style":997},[6007],{"type":401,"value":1814},{"type":392,"tag":972,"props":6009,"children":6010},{"style":991},[6011],{"type":401,"value":1829},{"type":392,"tag":972,"props":6013,"children":6014},{"style":997},[6015],{"type":401,"value":2637},{"type":392,"tag":972,"props":6017,"children":6018},{"class":974,"line":1874},[6019,6024,6029,6034,6039,6043,6048,6052,6056,6060,6064,6068,6073],{"type":392,"tag":972,"props":6020,"children":6021},{"style":997},[6022],{"type":401,"value":6023},"    json.",{"type":392,"tag":972,"props":6025,"children":6026},{"style":979},[6027],{"type":401,"value":6028},"NewEncoder",{"type":392,"tag":972,"props":6030,"children":6031},{"style":997},[6032],{"type":401,"value":6033},"(w).",{"type":392,"tag":972,"props":6035,"children":6036},{"style":979},[6037],{"type":401,"value":6038},"Encode",{"type":392,"tag":972,"props":6040,"children":6041},{"style":997},[6042],{"type":401,"value":1332},{"type":392,"tag":972,"props":6044,"children":6045},{"style":1264},[6046],{"type":401,"value":6047},"map",{"type":392,"tag":972,"props":6049,"children":6050},{"style":997},[6051],{"type":401,"value":3901},{"type":392,"tag":972,"props":6053,"children":6054},{"style":1264},[6055],{"type":401,"value":2707},{"type":392,"tag":972,"props":6057,"children":6058},{"style":997},[6059],{"type":401,"value":3910},{"type":392,"tag":972,"props":6061,"children":6062},{"style":1264},[6063],{"type":401,"value":2707},{"type":392,"tag":972,"props":6065,"children":6066},{"style":997},[6067],{"type":401,"value":4306},{"type":392,"tag":972,"props":6069,"children":6070},{"style":991},[6071],{"type":401,"value":6072},"\"url\"",{"type":392,"tag":972,"props":6074,"children":6075},{"style":997},[6076],{"type":401,"value":6077},": link.URL})\n",{"type":392,"tag":972,"props":6079,"children":6080},{"class":974,"line":1970},[6081],{"type":392,"tag":972,"props":6082,"children":6083},{"style":997},[6084],{"type":401,"value":2021},{"type":392,"tag":1238,"props":6086,"children":6087},{"v-slot:python":360},[6088],{"type":392,"tag":962,"props":6089,"children":6091},{"className":4071,"code":6090,"language":4073,"meta":360,"style":360},"# Flask. login_required and current_user come from your auth (e.g. Flask-Login).\nfrom flask import Flask, jsonify\n\nfrom portal import create_portal_session\n\napp = Flask(__name__)\n\n\n@app.post(\"/api/webhooks/portal\")\n@login_required\ndef webhooks_portal():\n    link = create_portal_session(\n        current_user.organization_id,\n        capabilities=\"manage\" if current_user.is_admin else \"read\",\n        session_id=f\"user-{current_user.id}\",\n    )\n    resp = jsonify(url=link[\"url\"])\n    resp.headers[\"Cache-Control\"] = \"no-store\"\n    return resp\n",[6092],{"type":392,"tag":453,"props":6093,"children":6094},{"__ignoreMap":360},[6095,6103,6124,6131,6152,6159,6185,6192,6199,6219,6227,6244,6261,6269,6308,6351,6358,6395,6420],{"type":392,"tag":972,"props":6096,"children":6097},{"class":974,"line":975},[6098],{"type":392,"tag":972,"props":6099,"children":6100},{"style":1255},[6101],{"type":401,"value":6102},"# Flask. login_required and current_user come from your auth (e.g. Flask-Login).\n",{"type":392,"tag":972,"props":6104,"children":6105},{"class":974,"line":1023},[6106,6110,6115,6119],{"type":392,"tag":972,"props":6107,"children":6108},{"style":1264},[6109],{"type":401,"value":1327},{"type":392,"tag":972,"props":6111,"children":6112},{"style":997},[6113],{"type":401,"value":6114}," flask ",{"type":392,"tag":972,"props":6116,"children":6117},{"style":1264},[6118],{"type":401,"value":2478},{"type":392,"tag":972,"props":6120,"children":6121},{"style":997},[6122],{"type":401,"value":6123}," Flask, jsonify\n",{"type":392,"tag":972,"props":6125,"children":6126},{"class":974,"line":1041},[6127],{"type":392,"tag":972,"props":6128,"children":6129},{"emptyLinePlaceholder":1419},[6130],{"type":401,"value":1422},{"type":392,"tag":972,"props":6132,"children":6133},{"class":974,"line":1064},[6134,6138,6143,6147],{"type":392,"tag":972,"props":6135,"children":6136},{"style":1264},[6137],{"type":401,"value":1327},{"type":392,"tag":972,"props":6139,"children":6140},{"style":997},[6141],{"type":401,"value":6142}," portal ",{"type":392,"tag":972,"props":6144,"children":6145},{"style":1264},[6146],{"type":401,"value":2478},{"type":392,"tag":972,"props":6148,"children":6149},{"style":997},[6150],{"type":401,"value":6151}," create_portal_session\n",{"type":392,"tag":972,"props":6153,"children":6154},{"class":974,"line":1078},[6155],{"type":392,"tag":972,"props":6156,"children":6157},{"emptyLinePlaceholder":1419},[6158],{"type":401,"value":1422},{"type":392,"tag":972,"props":6160,"children":6161},{"class":974,"line":1087},[6162,6167,6171,6176,6181],{"type":392,"tag":972,"props":6163,"children":6164},{"style":997},[6165],{"type":401,"value":6166},"app ",{"type":392,"tag":972,"props":6168,"children":6169},{"style":1264},[6170],{"type":401,"value":1665},{"type":392,"tag":972,"props":6172,"children":6173},{"style":997},[6174],{"type":401,"value":6175}," Flask(",{"type":392,"tag":972,"props":6177,"children":6178},{"style":985},[6179],{"type":401,"value":6180},"__name__",{"type":392,"tag":972,"props":6182,"children":6183},{"style":997},[6184],{"type":401,"value":2637},{"type":392,"tag":972,"props":6186,"children":6187},{"class":974,"line":1096},[6188],{"type":392,"tag":972,"props":6189,"children":6190},{"emptyLinePlaceholder":1419},[6191],{"type":401,"value":1422},{"type":392,"tag":972,"props":6193,"children":6194},{"class":974,"line":1105},[6195],{"type":392,"tag":972,"props":6196,"children":6197},{"emptyLinePlaceholder":1419},[6198],{"type":401,"value":1422},{"type":392,"tag":972,"props":6200,"children":6201},{"class":974,"line":1114},[6202,6207,6211,6215],{"type":392,"tag":972,"props":6203,"children":6204},{"style":979},[6205],{"type":401,"value":6206},"@app.post",{"type":392,"tag":972,"props":6208,"children":6209},{"style":997},[6210],{"type":401,"value":1332},{"type":392,"tag":972,"props":6212,"children":6213},{"style":991},[6214],{"type":401,"value":5406},{"type":392,"tag":972,"props":6216,"children":6217},{"style":997},[6218],{"type":401,"value":2637},{"type":392,"tag":972,"props":6220,"children":6221},{"class":974,"line":1123},[6222],{"type":392,"tag":972,"props":6223,"children":6224},{"style":979},[6225],{"type":401,"value":6226},"@login_required\n",{"type":392,"tag":972,"props":6228,"children":6229},{"class":974,"line":1132},[6230,6234,6239],{"type":392,"tag":972,"props":6231,"children":6232},{"style":1264},[6233],{"type":401,"value":4215},{"type":392,"tag":972,"props":6235,"children":6236},{"style":979},[6237],{"type":401,"value":6238}," webhooks_portal",{"type":392,"tag":972,"props":6240,"children":6241},{"style":997},[6242],{"type":401,"value":6243},"():\n",{"type":392,"tag":972,"props":6245,"children":6246},{"class":974,"line":1673},[6247,6252,6256],{"type":392,"tag":972,"props":6248,"children":6249},{"style":997},[6250],{"type":401,"value":6251},"    link ",{"type":392,"tag":972,"props":6253,"children":6254},{"style":1264},[6255],{"type":401,"value":1665},{"type":392,"tag":972,"props":6257,"children":6258},{"style":997},[6259],{"type":401,"value":6260}," create_portal_session(\n",{"type":392,"tag":972,"props":6262,"children":6263},{"class":974,"line":1706},[6264],{"type":392,"tag":972,"props":6265,"children":6266},{"style":997},[6267],{"type":401,"value":6268},"        current_user.organization_id,\n",{"type":392,"tag":972,"props":6270,"children":6271},{"class":974,"line":1780},[6272,6277,6281,6286,6291,6296,6300,6304],{"type":392,"tag":972,"props":6273,"children":6274},{"style":1447},[6275],{"type":401,"value":6276},"        capabilities",{"type":392,"tag":972,"props":6278,"children":6279},{"style":1264},[6280],{"type":401,"value":1665},{"type":392,"tag":972,"props":6282,"children":6283},{"style":991},[6284],{"type":401,"value":6285},"\"manage\"",{"type":392,"tag":972,"props":6287,"children":6288},{"style":1264},[6289],{"type":401,"value":6290}," if",{"type":392,"tag":972,"props":6292,"children":6293},{"style":997},[6294],{"type":401,"value":6295}," current_user.is_admin ",{"type":392,"tag":972,"props":6297,"children":6298},{"style":1264},[6299],{"type":401,"value":4617},{"type":392,"tag":972,"props":6301,"children":6302},{"style":991},[6303],{"type":401,"value":1603},{"type":392,"tag":972,"props":6305,"children":6306},{"style":997},[6307],{"type":401,"value":1562},{"type":392,"tag":972,"props":6309,"children":6310},{"class":974,"line":1798},[6311,6316,6320,6325,6330,6334,6339,6343,6347],{"type":392,"tag":972,"props":6312,"children":6313},{"style":1447},[6314],{"type":401,"value":6315},"        session_id",{"type":392,"tag":972,"props":6317,"children":6318},{"style":1264},[6319],{"type":401,"value":1665},{"type":392,"tag":972,"props":6321,"children":6322},{"style":1264},[6323],{"type":401,"value":6324},"f",{"type":392,"tag":972,"props":6326,"children":6327},{"style":991},[6328],{"type":401,"value":6329},"\"user-",{"type":392,"tag":972,"props":6331,"children":6332},{"style":985},[6333],{"type":401,"value":4306},{"type":392,"tag":972,"props":6335,"children":6336},{"style":997},[6337],{"type":401,"value":6338},"current_user.id",{"type":392,"tag":972,"props":6340,"children":6341},{"style":985},[6342],{"type":401,"value":4334},{"type":392,"tag":972,"props":6344,"children":6345},{"style":991},[6346],{"type":401,"value":1015},{"type":392,"tag":972,"props":6348,"children":6349},{"style":997},[6350],{"type":401,"value":1562},{"type":392,"tag":972,"props":6352,"children":6353},{"class":974,"line":1837},[6354],{"type":392,"tag":972,"props":6355,"children":6356},{"style":997},[6357],{"type":401,"value":4409},{"type":392,"tag":972,"props":6359,"children":6360},{"class":974,"line":1865},[6361,6365,6369,6374,6378,6382,6387,6391],{"type":392,"tag":972,"props":6362,"children":6363},{"style":997},[6364],{"type":401,"value":4270},{"type":392,"tag":972,"props":6366,"children":6367},{"style":1264},[6368],{"type":401,"value":1665},{"type":392,"tag":972,"props":6370,"children":6371},{"style":997},[6372],{"type":401,"value":6373}," jsonify(",{"type":392,"tag":972,"props":6375,"children":6376},{"style":1447},[6377],{"type":401,"value":664},{"type":392,"tag":972,"props":6379,"children":6380},{"style":1264},[6381],{"type":401,"value":1665},{"type":392,"tag":972,"props":6383,"children":6384},{"style":997},[6385],{"type":401,"value":6386},"link[",{"type":392,"tag":972,"props":6388,"children":6389},{"style":991},[6390],{"type":401,"value":6072},{"type":392,"tag":972,"props":6392,"children":6393},{"style":997},[6394],{"type":401,"value":4193},{"type":392,"tag":972,"props":6396,"children":6397},{"class":974,"line":1874},[6398,6403,6407,6411,6415],{"type":392,"tag":972,"props":6399,"children":6400},{"style":997},[6401],{"type":401,"value":6402},"    resp.headers[",{"type":392,"tag":972,"props":6404,"children":6405},{"style":991},[6406],{"type":401,"value":5596},{"type":392,"tag":972,"props":6408,"children":6409},{"style":997},[6410],{"type":401,"value":3964},{"type":392,"tag":972,"props":6412,"children":6413},{"style":1264},[6414],{"type":401,"value":1665},{"type":392,"tag":972,"props":6416,"children":6417},{"style":991},[6418],{"type":401,"value":6419}," \"no-store\"\n",{"type":392,"tag":972,"props":6421,"children":6422},{"class":974,"line":1970},[6423,6427],{"type":392,"tag":972,"props":6424,"children":6425},{"style":1264},[6426],{"type":401,"value":3488},{"type":392,"tag":972,"props":6428,"children":6429},{"style":997},[6430],{"type":401,"value":6431}," resp\n",{"type":392,"tag":393,"props":6433,"children":6434},{},[6435],{"type":401,"value":6436},"Then the page that hosts the portal:",{"type":392,"tag":1232,"props":6438,"children":6441},{"group":6439,"tabs":6440},"portal-frontend","html:HTML,react:React",[6442,6762],{"type":392,"tag":1238,"props":6443,"children":6444},{"v-slot:html":360},[6445],{"type":392,"tag":962,"props":6446,"children":6450},{"className":6447,"code":6448,"language":6449,"meta":360,"style":360},"language-html shiki shiki-themes github-dark","\u003Ciframe\n  id=\"webhooks-portal\"\n  title=\"Webhooks\"\n  allow=\"clipboard-write\"\n  referrerpolicy=\"no-referrer\"\n  style=\"width: 100%; height: 720px; border: 0\"\n>\u003C/iframe>\n\u003Cscript>\n  fetch(\"/api/webhooks/portal\", { method: \"POST\", credentials: \"same-origin\" })\n    .then((res) => res.json())\n    .then(({ url }) => {\n      document.getElementById(\"webhooks-portal\").src = url;\n    });\n\u003C/script>\n","html",[6451],{"type":392,"tag":453,"props":6452,"children":6453},{"__ignoreMap":360},[6454,6467,6484,6501,6518,6535,6552,6570,6586,6626,6669,6702,6738,6746],{"type":392,"tag":972,"props":6455,"children":6456},{"class":974,"line":975},[6457,6461],{"type":392,"tag":972,"props":6458,"children":6459},{"style":997},[6460],{"type":401,"value":1693},{"type":392,"tag":972,"props":6462,"children":6464},{"style":6463},"--shiki-default:#85E89D",[6465],{"type":401,"value":6466},"iframe\n",{"type":392,"tag":972,"props":6468,"children":6469},{"class":974,"line":1023},[6470,6475,6479],{"type":392,"tag":972,"props":6471,"children":6472},{"style":979},[6473],{"type":401,"value":6474},"  id",{"type":392,"tag":972,"props":6476,"children":6477},{"style":997},[6478],{"type":401,"value":1665},{"type":392,"tag":972,"props":6480,"children":6481},{"style":991},[6482],{"type":401,"value":6483},"\"webhooks-portal\"\n",{"type":392,"tag":972,"props":6485,"children":6486},{"class":974,"line":1041},[6487,6492,6496],{"type":392,"tag":972,"props":6488,"children":6489},{"style":979},[6490],{"type":401,"value":6491},"  title",{"type":392,"tag":972,"props":6493,"children":6494},{"style":997},[6495],{"type":401,"value":1665},{"type":392,"tag":972,"props":6497,"children":6498},{"style":991},[6499],{"type":401,"value":6500},"\"Webhooks\"\n",{"type":392,"tag":972,"props":6502,"children":6503},{"class":974,"line":1064},[6504,6509,6513],{"type":392,"tag":972,"props":6505,"children":6506},{"style":979},[6507],{"type":401,"value":6508},"  allow",{"type":392,"tag":972,"props":6510,"children":6511},{"style":997},[6512],{"type":401,"value":1665},{"type":392,"tag":972,"props":6514,"children":6515},{"style":991},[6516],{"type":401,"value":6517},"\"clipboard-write\"\n",{"type":392,"tag":972,"props":6519,"children":6520},{"class":974,"line":1078},[6521,6526,6530],{"type":392,"tag":972,"props":6522,"children":6523},{"style":979},[6524],{"type":401,"value":6525},"  referrerpolicy",{"type":392,"tag":972,"props":6527,"children":6528},{"style":997},[6529],{"type":401,"value":1665},{"type":392,"tag":972,"props":6531,"children":6532},{"style":991},[6533],{"type":401,"value":6534},"\"no-referrer\"\n",{"type":392,"tag":972,"props":6536,"children":6537},{"class":974,"line":1087},[6538,6543,6547],{"type":392,"tag":972,"props":6539,"children":6540},{"style":979},[6541],{"type":401,"value":6542},"  style",{"type":392,"tag":972,"props":6544,"children":6545},{"style":997},[6546],{"type":401,"value":1665},{"type":392,"tag":972,"props":6548,"children":6549},{"style":991},[6550],{"type":401,"value":6551},"\"width: 100%; height: 720px; border: 0\"\n",{"type":392,"tag":972,"props":6553,"children":6554},{"class":974,"line":1096},[6555,6560,6565],{"type":392,"tag":972,"props":6556,"children":6557},{"style":997},[6558],{"type":401,"value":6559},">\u003C/",{"type":392,"tag":972,"props":6561,"children":6562},{"style":6463},[6563],{"type":401,"value":6564},"iframe",{"type":392,"tag":972,"props":6566,"children":6567},{"style":997},[6568],{"type":401,"value":6569},">\n",{"type":392,"tag":972,"props":6571,"children":6572},{"class":974,"line":1105},[6573,6577,6582],{"type":392,"tag":972,"props":6574,"children":6575},{"style":997},[6576],{"type":401,"value":1693},{"type":392,"tag":972,"props":6578,"children":6579},{"style":6463},[6580],{"type":401,"value":6581},"script",{"type":392,"tag":972,"props":6583,"children":6584},{"style":997},[6585],{"type":401,"value":6569},{"type":392,"tag":972,"props":6587,"children":6588},{"class":974,"line":1114},[6589,6594,6598,6602,6607,6611,6616,6621],{"type":392,"tag":972,"props":6590,"children":6591},{"style":979},[6592],{"type":401,"value":6593},"  fetch",{"type":392,"tag":972,"props":6595,"children":6596},{"style":997},[6597],{"type":401,"value":1332},{"type":392,"tag":972,"props":6599,"children":6600},{"style":991},[6601],{"type":401,"value":5406},{"type":392,"tag":972,"props":6603,"children":6604},{"style":997},[6605],{"type":401,"value":6606},", { method: ",{"type":392,"tag":972,"props":6608,"children":6609},{"style":991},[6610],{"type":401,"value":1791},{"type":392,"tag":972,"props":6612,"children":6613},{"style":997},[6614],{"type":401,"value":6615},", credentials: ",{"type":392,"tag":972,"props":6617,"children":6618},{"style":991},[6619],{"type":401,"value":6620},"\"same-origin\"",{"type":392,"tag":972,"props":6622,"children":6623},{"style":997},[6624],{"type":401,"value":6625}," })\n",{"type":392,"tag":972,"props":6627,"children":6628},{"class":974,"line":1123},[6629,6634,6639,6644,6648,6652,6656,6660,6664],{"type":392,"tag":972,"props":6630,"children":6631},{"style":997},[6632],{"type":401,"value":6633},"    .",{"type":392,"tag":972,"props":6635,"children":6636},{"style":979},[6637],{"type":401,"value":6638},"then",{"type":392,"tag":972,"props":6640,"children":6641},{"style":997},[6642],{"type":401,"value":6643},"((",{"type":392,"tag":972,"props":6645,"children":6646},{"style":1447},[6647],{"type":401,"value":1923},{"type":392,"tag":972,"props":6649,"children":6650},{"style":997},[6651],{"type":401,"value":2976},{"type":392,"tag":972,"props":6653,"children":6654},{"style":1264},[6655],{"type":401,"value":5442},{"type":392,"tag":972,"props":6657,"children":6658},{"style":997},[6659],{"type":401,"value":1989},{"type":392,"tag":972,"props":6661,"children":6662},{"style":979},[6663],{"type":401,"value":1994},{"type":392,"tag":972,"props":6665,"children":6666},{"style":997},[6667],{"type":401,"value":6668},"())\n",{"type":392,"tag":972,"props":6670,"children":6671},{"class":974,"line":1132},[6672,6676,6680,6685,6689,6694,6698],{"type":392,"tag":972,"props":6673,"children":6674},{"style":997},[6675],{"type":401,"value":6633},{"type":392,"tag":972,"props":6677,"children":6678},{"style":979},[6679],{"type":401,"value":6638},{"type":392,"tag":972,"props":6681,"children":6682},{"style":997},[6683],{"type":401,"value":6684},"(({ ",{"type":392,"tag":972,"props":6686,"children":6687},{"style":1447},[6688],{"type":401,"value":664},{"type":392,"tag":972,"props":6690,"children":6691},{"style":997},[6692],{"type":401,"value":6693}," }) ",{"type":392,"tag":972,"props":6695,"children":6696},{"style":1264},[6697],{"type":401,"value":5442},{"type":392,"tag":972,"props":6699,"children":6700},{"style":997},[6701],{"type":401,"value":2694},{"type":392,"tag":972,"props":6703,"children":6704},{"class":974,"line":1673},[6705,6710,6715,6719,6724,6729,6733],{"type":392,"tag":972,"props":6706,"children":6707},{"style":997},[6708],{"type":401,"value":6709},"      document.",{"type":392,"tag":972,"props":6711,"children":6712},{"style":979},[6713],{"type":401,"value":6714},"getElementById",{"type":392,"tag":972,"props":6716,"children":6717},{"style":997},[6718],{"type":401,"value":1332},{"type":392,"tag":972,"props":6720,"children":6721},{"style":991},[6722],{"type":401,"value":6723},"\"webhooks-portal\"",{"type":392,"tag":972,"props":6725,"children":6726},{"style":997},[6727],{"type":401,"value":6728},").src ",{"type":392,"tag":972,"props":6730,"children":6731},{"style":1264},[6732],{"type":401,"value":1665},{"type":392,"tag":972,"props":6734,"children":6735},{"style":997},[6736],{"type":401,"value":6737}," url;\n",{"type":392,"tag":972,"props":6739,"children":6740},{"class":974,"line":1706},[6741],{"type":392,"tag":972,"props":6742,"children":6743},{"style":997},[6744],{"type":401,"value":6745},"    });\n",{"type":392,"tag":972,"props":6747,"children":6748},{"class":974,"line":1780},[6749,6754,6758],{"type":392,"tag":972,"props":6750,"children":6751},{"style":997},[6752],{"type":401,"value":6753},"\u003C/",{"type":392,"tag":972,"props":6755,"children":6756},{"style":6463},[6757],{"type":401,"value":6581},{"type":392,"tag":972,"props":6759,"children":6760},{"style":997},[6761],{"type":401,"value":6569},{"type":392,"tag":1238,"props":6763,"children":6764},{"v-slot:react":360},[6765],{"type":392,"tag":962,"props":6766,"children":6770},{"className":6767,"code":6768,"language":6769,"meta":360,"style":360},"language-tsx shiki shiki-themes github-dark","import { useEffect, useState } from \"react\";\n\nexport function WebhooksPortal() {\n  const [url, setUrl] = useState\u003Cstring | null>(null);\n\n  useEffect(() => {\n    let cancelled = false;\n    fetch(\"/api/webhooks/portal\", { method: \"POST\", credentials: \"same-origin\" })\n      .then((res) => res.json())\n      .then((data) => !cancelled && setUrl(data.url));\n    return () => {\n      cancelled = true;\n    };\n  }, []);\n\n  if (!url) return \u003Cp>Loading webhooks…\u003C/p>;\n  return (\n    \u003Ciframe\n      key={url} // a new link needs a fresh frame\n      src={url}\n      title=\"Webhooks\"\n      allow=\"clipboard-write\"\n      referrerPolicy=\"no-referrer\"\n      style={{ width: \"100%\", height: 720, border: 0 }}\n    />\n  );\n}\n","tsx",[6771],{"type":392,"tag":453,"props":6772,"children":6773},{"__ignoreMap":360},[6774,6799,6806,6827,6896,6903,6924,6950,6986,7026,7079,7099,7120,7128,7136,7143,7191,7202,7214,7236,7253,7269,7285,7301,7348,7356,7364],{"type":392,"tag":972,"props":6775,"children":6776},{"class":974,"line":975},[6777,6781,6786,6790,6795],{"type":392,"tag":972,"props":6778,"children":6779},{"style":1264},[6780],{"type":401,"value":2478},{"type":392,"tag":972,"props":6782,"children":6783},{"style":997},[6784],{"type":401,"value":6785}," { useEffect, useState } ",{"type":392,"tag":972,"props":6787,"children":6788},{"style":1264},[6789],{"type":401,"value":1327},{"type":392,"tag":972,"props":6791,"children":6792},{"style":991},[6793],{"type":401,"value":6794}," \"react\"",{"type":392,"tag":972,"props":6796,"children":6797},{"style":997},[6798],{"type":401,"value":1287},{"type":392,"tag":972,"props":6800,"children":6801},{"class":974,"line":1023},[6802],{"type":392,"tag":972,"props":6803,"children":6804},{"emptyLinePlaceholder":1419},[6805],{"type":401,"value":1422},{"type":392,"tag":972,"props":6807,"children":6808},{"class":974,"line":1041},[6809,6813,6817,6822],{"type":392,"tag":972,"props":6810,"children":6811},{"style":1264},[6812],{"type":401,"value":1521},{"type":392,"tag":972,"props":6814,"children":6815},{"style":1264},[6816],{"type":401,"value":1531},{"type":392,"tag":972,"props":6818,"children":6819},{"style":979},[6820],{"type":401,"value":6821}," WebhooksPortal",{"type":392,"tag":972,"props":6823,"children":6824},{"style":997},[6825],{"type":401,"value":6826},"() {\n",{"type":392,"tag":972,"props":6828,"children":6829},{"class":974,"line":1064},[6830,6834,6839,6843,6847,6852,6856,6860,6865,6869,6873,6877,6882,6887,6892],{"type":392,"tag":972,"props":6831,"children":6832},{"style":1264},[6833],{"type":401,"value":1712},{"type":392,"tag":972,"props":6835,"children":6836},{"style":997},[6837],{"type":401,"value":6838}," [",{"type":392,"tag":972,"props":6840,"children":6841},{"style":985},[6842],{"type":401,"value":664},{"type":392,"tag":972,"props":6844,"children":6845},{"style":997},[6846],{"type":401,"value":1814},{"type":392,"tag":972,"props":6848,"children":6849},{"style":985},[6850],{"type":401,"value":6851},"setUrl",{"type":392,"tag":972,"props":6853,"children":6854},{"style":997},[6855],{"type":401,"value":3964},{"type":392,"tag":972,"props":6857,"children":6858},{"style":1264},[6859],{"type":401,"value":1665},{"type":392,"tag":972,"props":6861,"children":6862},{"style":979},[6863],{"type":401,"value":6864}," useState",{"type":392,"tag":972,"props":6866,"children":6867},{"style":997},[6868],{"type":401,"value":1693},{"type":392,"tag":972,"props":6870,"children":6871},{"style":985},[6872],{"type":401,"value":2707},{"type":392,"tag":972,"props":6874,"children":6875},{"style":1264},[6876],{"type":401,"value":1598},{"type":392,"tag":972,"props":6878,"children":6879},{"style":985},[6880],{"type":401,"value":6881}," null",{"type":392,"tag":972,"props":6883,"children":6884},{"style":997},[6885],{"type":401,"value":6886},">(",{"type":392,"tag":972,"props":6888,"children":6889},{"style":985},[6890],{"type":401,"value":6891},"null",{"type":392,"tag":972,"props":6893,"children":6894},{"style":997},[6895],{"type":401,"value":1413},{"type":392,"tag":972,"props":6897,"children":6898},{"class":974,"line":1078},[6899],{"type":392,"tag":972,"props":6900,"children":6901},{"emptyLinePlaceholder":1419},[6902],{"type":401,"value":1422},{"type":392,"tag":972,"props":6904,"children":6905},{"class":974,"line":1087},[6906,6911,6916,6920],{"type":392,"tag":972,"props":6907,"children":6908},{"style":979},[6909],{"type":401,"value":6910},"  useEffect",{"type":392,"tag":972,"props":6912,"children":6913},{"style":997},[6914],{"type":401,"value":6915},"(() ",{"type":392,"tag":972,"props":6917,"children":6918},{"style":1264},[6919],{"type":401,"value":5442},{"type":392,"tag":972,"props":6921,"children":6922},{"style":997},[6923],{"type":401,"value":2694},{"type":392,"tag":972,"props":6925,"children":6926},{"class":974,"line":1096},[6927,6932,6937,6941,6946],{"type":392,"tag":972,"props":6928,"children":6929},{"style":1264},[6930],{"type":401,"value":6931},"    let",{"type":392,"tag":972,"props":6933,"children":6934},{"style":997},[6935],{"type":401,"value":6936}," cancelled ",{"type":392,"tag":972,"props":6938,"children":6939},{"style":1264},[6940],{"type":401,"value":1665},{"type":392,"tag":972,"props":6942,"children":6943},{"style":985},[6944],{"type":401,"value":6945}," false",{"type":392,"tag":972,"props":6947,"children":6948},{"style":997},[6949],{"type":401,"value":1287},{"type":392,"tag":972,"props":6951,"children":6952},{"class":974,"line":1105},[6953,6958,6962,6966,6970,6974,6978,6982],{"type":392,"tag":972,"props":6954,"children":6955},{"style":979},[6956],{"type":401,"value":6957},"    fetch",{"type":392,"tag":972,"props":6959,"children":6960},{"style":997},[6961],{"type":401,"value":1332},{"type":392,"tag":972,"props":6963,"children":6964},{"style":991},[6965],{"type":401,"value":5406},{"type":392,"tag":972,"props":6967,"children":6968},{"style":997},[6969],{"type":401,"value":6606},{"type":392,"tag":972,"props":6971,"children":6972},{"style":991},[6973],{"type":401,"value":1791},{"type":392,"tag":972,"props":6975,"children":6976},{"style":997},[6977],{"type":401,"value":6615},{"type":392,"tag":972,"props":6979,"children":6980},{"style":991},[6981],{"type":401,"value":6620},{"type":392,"tag":972,"props":6983,"children":6984},{"style":997},[6985],{"type":401,"value":6625},{"type":392,"tag":972,"props":6987,"children":6988},{"class":974,"line":1114},[6989,6994,6998,7002,7006,7010,7014,7018,7022],{"type":392,"tag":972,"props":6990,"children":6991},{"style":997},[6992],{"type":401,"value":6993},"      .",{"type":392,"tag":972,"props":6995,"children":6996},{"style":979},[6997],{"type":401,"value":6638},{"type":392,"tag":972,"props":6999,"children":7000},{"style":997},[7001],{"type":401,"value":6643},{"type":392,"tag":972,"props":7003,"children":7004},{"style":1447},[7005],{"type":401,"value":1923},{"type":392,"tag":972,"props":7007,"children":7008},{"style":997},[7009],{"type":401,"value":2976},{"type":392,"tag":972,"props":7011,"children":7012},{"style":1264},[7013],{"type":401,"value":5442},{"type":392,"tag":972,"props":7015,"children":7016},{"style":997},[7017],{"type":401,"value":1989},{"type":392,"tag":972,"props":7019,"children":7020},{"style":979},[7021],{"type":401,"value":1994},{"type":392,"tag":972,"props":7023,"children":7024},{"style":997},[7025],{"type":401,"value":6668},{"type":392,"tag":972,"props":7027,"children":7028},{"class":974,"line":1123},[7029,7033,7037,7041,7046,7050,7054,7059,7064,7069,7074],{"type":392,"tag":972,"props":7030,"children":7031},{"style":997},[7032],{"type":401,"value":6993},{"type":392,"tag":972,"props":7034,"children":7035},{"style":979},[7036],{"type":401,"value":6638},{"type":392,"tag":972,"props":7038,"children":7039},{"style":997},[7040],{"type":401,"value":6643},{"type":392,"tag":972,"props":7042,"children":7043},{"style":1447},[7044],{"type":401,"value":7045},"data",{"type":392,"tag":972,"props":7047,"children":7048},{"style":997},[7049],{"type":401,"value":2976},{"type":392,"tag":972,"props":7051,"children":7052},{"style":1264},[7053],{"type":401,"value":5442},{"type":392,"tag":972,"props":7055,"children":7056},{"style":1264},[7057],{"type":401,"value":7058}," !",{"type":392,"tag":972,"props":7060,"children":7061},{"style":997},[7062],{"type":401,"value":7063},"cancelled ",{"type":392,"tag":972,"props":7065,"children":7066},{"style":1264},[7067],{"type":401,"value":7068},"&&",{"type":392,"tag":972,"props":7070,"children":7071},{"style":979},[7072],{"type":401,"value":7073}," setUrl",{"type":392,"tag":972,"props":7075,"children":7076},{"style":997},[7077],{"type":401,"value":7078},"(data.url));\n",{"type":392,"tag":972,"props":7080,"children":7081},{"class":974,"line":1132},[7082,7086,7091,7095],{"type":392,"tag":972,"props":7083,"children":7084},{"style":1264},[7085],{"type":401,"value":3488},{"type":392,"tag":972,"props":7087,"children":7088},{"style":997},[7089],{"type":401,"value":7090}," () ",{"type":392,"tag":972,"props":7092,"children":7093},{"style":1264},[7094],{"type":401,"value":5442},{"type":392,"tag":972,"props":7096,"children":7097},{"style":997},[7098],{"type":401,"value":2694},{"type":392,"tag":972,"props":7100,"children":7101},{"class":974,"line":1673},[7102,7107,7111,7116],{"type":392,"tag":972,"props":7103,"children":7104},{"style":997},[7105],{"type":401,"value":7106},"      cancelled ",{"type":392,"tag":972,"props":7108,"children":7109},{"style":1264},[7110],{"type":401,"value":1665},{"type":392,"tag":972,"props":7112,"children":7113},{"style":985},[7114],{"type":401,"value":7115}," true",{"type":392,"tag":972,"props":7117,"children":7118},{"style":997},[7119],{"type":401,"value":1287},{"type":392,"tag":972,"props":7121,"children":7122},{"class":974,"line":1706},[7123],{"type":392,"tag":972,"props":7124,"children":7125},{"style":997},[7126],{"type":401,"value":7127},"    };\n",{"type":392,"tag":972,"props":7129,"children":7130},{"class":974,"line":1780},[7131],{"type":392,"tag":972,"props":7132,"children":7133},{"style":997},[7134],{"type":401,"value":7135},"  }, []);\n",{"type":392,"tag":972,"props":7137,"children":7138},{"class":974,"line":1798},[7139],{"type":392,"tag":972,"props":7140,"children":7141},{"emptyLinePlaceholder":1419},[7142],{"type":401,"value":1422},{"type":392,"tag":972,"props":7144,"children":7145},{"class":974,"line":1837},[7146,7150,7154,7158,7163,7168,7173,7177,7182,7186],{"type":392,"tag":972,"props":7147,"children":7148},{"style":1264},[7149],{"type":401,"value":1880},{"type":392,"tag":972,"props":7151,"children":7152},{"style":997},[7153],{"type":401,"value":1214},{"type":392,"tag":972,"props":7155,"children":7156},{"style":1264},[7157],{"type":401,"value":1889},{"type":392,"tag":972,"props":7159,"children":7160},{"style":997},[7161],{"type":401,"value":7162},"url) ",{"type":392,"tag":972,"props":7164,"children":7165},{"style":1264},[7166],{"type":401,"value":7167},"return",{"type":392,"tag":972,"props":7169,"children":7170},{"style":997},[7171],{"type":401,"value":7172}," \u003C",{"type":392,"tag":972,"props":7174,"children":7175},{"style":6463},[7176],{"type":401,"value":393},{"type":392,"tag":972,"props":7178,"children":7179},{"style":997},[7180],{"type":401,"value":7181},">Loading webhooks…\u003C/",{"type":392,"tag":972,"props":7183,"children":7184},{"style":6463},[7185],{"type":401,"value":393},{"type":392,"tag":972,"props":7187,"children":7188},{"style":997},[7189],{"type":401,"value":7190},">;\n",{"type":392,"tag":972,"props":7192,"children":7193},{"class":974,"line":1865},[7194,7198],{"type":392,"tag":972,"props":7195,"children":7196},{"style":1264},[7197],{"type":401,"value":1976},{"type":392,"tag":972,"props":7199,"children":7200},{"style":997},[7201],{"type":401,"value":2483},{"type":392,"tag":972,"props":7203,"children":7204},{"class":974,"line":1874},[7205,7210],{"type":392,"tag":972,"props":7206,"children":7207},{"style":997},[7208],{"type":401,"value":7209},"    \u003C",{"type":392,"tag":972,"props":7211,"children":7212},{"style":6463},[7213],{"type":401,"value":6466},{"type":392,"tag":972,"props":7215,"children":7216},{"class":974,"line":1970},[7217,7222,7226,7231],{"type":392,"tag":972,"props":7218,"children":7219},{"style":979},[7220],{"type":401,"value":7221},"      key",{"type":392,"tag":972,"props":7223,"children":7224},{"style":1264},[7225],{"type":401,"value":1665},{"type":392,"tag":972,"props":7227,"children":7228},{"style":997},[7229],{"type":401,"value":7230},"{url} ",{"type":392,"tag":972,"props":7232,"children":7233},{"style":1255},[7234],{"type":401,"value":7235},"// a new link needs a fresh frame\n",{"type":392,"tag":972,"props":7237,"children":7238},{"class":974,"line":2015},[7239,7244,7248],{"type":392,"tag":972,"props":7240,"children":7241},{"style":979},[7242],{"type":401,"value":7243},"      src",{"type":392,"tag":972,"props":7245,"children":7246},{"style":1264},[7247],{"type":401,"value":1665},{"type":392,"tag":972,"props":7249,"children":7250},{"style":997},[7251],{"type":401,"value":7252},"{url}\n",{"type":392,"tag":972,"props":7254,"children":7255},{"class":974,"line":2024},[7256,7261,7265],{"type":392,"tag":972,"props":7257,"children":7258},{"style":979},[7259],{"type":401,"value":7260},"      title",{"type":392,"tag":972,"props":7262,"children":7263},{"style":1264},[7264],{"type":401,"value":1665},{"type":392,"tag":972,"props":7266,"children":7267},{"style":991},[7268],{"type":401,"value":6500},{"type":392,"tag":972,"props":7270,"children":7271},{"class":974,"line":2032},[7272,7277,7281],{"type":392,"tag":972,"props":7273,"children":7274},{"style":979},[7275],{"type":401,"value":7276},"      allow",{"type":392,"tag":972,"props":7278,"children":7279},{"style":1264},[7280],{"type":401,"value":1665},{"type":392,"tag":972,"props":7282,"children":7283},{"style":991},[7284],{"type":401,"value":6517},{"type":392,"tag":972,"props":7286,"children":7287},{"class":974,"line":2041},[7288,7293,7297],{"type":392,"tag":972,"props":7289,"children":7290},{"style":979},[7291],{"type":401,"value":7292},"      referrerPolicy",{"type":392,"tag":972,"props":7294,"children":7295},{"style":1264},[7296],{"type":401,"value":1665},{"type":392,"tag":972,"props":7298,"children":7299},{"style":991},[7300],{"type":401,"value":6534},{"type":392,"tag":972,"props":7302,"children":7303},{"class":974,"line":2120},[7304,7309,7313,7318,7323,7328,7333,7338,7343],{"type":392,"tag":972,"props":7305,"children":7306},{"style":979},[7307],{"type":401,"value":7308},"      style",{"type":392,"tag":972,"props":7310,"children":7311},{"style":1264},[7312],{"type":401,"value":1665},{"type":392,"tag":972,"props":7314,"children":7315},{"style":997},[7316],{"type":401,"value":7317},"{{ width: ",{"type":392,"tag":972,"props":7319,"children":7320},{"style":991},[7321],{"type":401,"value":7322},"\"100%\"",{"type":392,"tag":972,"props":7324,"children":7325},{"style":997},[7326],{"type":401,"value":7327},", height: ",{"type":392,"tag":972,"props":7329,"children":7330},{"style":985},[7331],{"type":401,"value":7332},"720",{"type":392,"tag":972,"props":7334,"children":7335},{"style":997},[7336],{"type":401,"value":7337},", border: ",{"type":392,"tag":972,"props":7339,"children":7340},{"style":985},[7341],{"type":401,"value":7342},"0",{"type":392,"tag":972,"props":7344,"children":7345},{"style":997},[7346],{"type":401,"value":7347}," }}\n",{"type":392,"tag":972,"props":7349,"children":7350},{"class":974,"line":2185},[7351],{"type":392,"tag":972,"props":7352,"children":7353},{"style":997},[7354],{"type":401,"value":7355},"    />\n",{"type":392,"tag":972,"props":7357,"children":7358},{"class":974,"line":2201},[7359],{"type":392,"tag":972,"props":7360,"children":7361},{"style":997},[7362],{"type":401,"value":7363},"  );\n",{"type":392,"tag":972,"props":7365,"children":7366},{"class":974,"line":2233},[7367],{"type":392,"tag":972,"props":7368,"children":7369},{"style":997},[7370],{"type":401,"value":2021},{"type":392,"tag":393,"props":7372,"children":7373},{},[7374,7380,7382,7388],{"type":392,"tag":453,"props":7375,"children":7377},{"className":7376},[],[7378],{"type":401,"value":7379},"allow=\"clipboard-write\"",{"type":401,"value":7381}," lets customers copy their signing secret from inside the frame. The iframe only loads on origins listed in the portal settings, because the portal page is served with ",{"type":392,"tag":453,"props":7383,"children":7385},{"className":7384},[],[7386],{"type":401,"value":7387},"Content-Security-Policy: frame-ancestors 'self' \u003Cyour origins>",{"type":401,"value":7389},". Elsewhere the browser refuses to frame it. In React development mode, Strict Mode runs effects twice and mints two links. Only the one that loads is used, and the other expires unused after 15 minutes.",{"type":392,"tag":415,"props":7391,"children":7396},{"alt":7392,"caption":7393,"height":7394,"src":7395,"url":421,"width":422},"Portal endpoints page branded Lumen Billing for Acme Corp with an Add endpoint button in the violet accent colour and one active endpoint","The landing page of a session: the customer's endpoints, in your accent colour.",300,"/images/docs/outbound/portal-endpoints.webp",[],{"type":392,"tag":7398,"props":7399,"children":7401},"h3",{"id":7400},"redirect-instead-of-embedding",[7402],{"type":401,"value":1178},{"type":392,"tag":393,"props":7404,"children":7405},{},[7406,7408,7414,7416,7422],{"type":401,"value":7407},"If you'd rather not frame the portal, send the user to it. Use a ",{"type":392,"tag":453,"props":7409,"children":7411},{"className":7410},[],[7412],{"type":401,"value":7413},"303",{"type":401,"value":7415}," redirect from a route that requires sign-in. No allowed origin is needed for this, and it is also the easiest way to try the portal on ",{"type":392,"tag":453,"props":7417,"children":7419},{"className":7418},[],[7420],{"type":401,"value":7421},"localhost",{"type":401,"value":666},{"type":392,"tag":1232,"props":7424,"children":7425},{"group":1234,"tabs":5275},[7426,7618,7881],{"type":392,"tag":1238,"props":7427,"children":7428},{"v-slot:node":360},[7429],{"type":392,"tag":962,"props":7430,"children":7432},{"className":1243,"code":7431,"language":1245,"meta":360,"style":360},"app.get(\"/settings/webhooks/open\", requireUser, async (req, res) => {\n  const { url } = await createPortalSession(req.user.organizationId, { session_id: `user-${req.user.id}` });\n  res.set(\"Cache-Control\", \"no-store\").redirect(303, url);\n});\n",[7433],{"type":392,"tag":453,"props":7434,"children":7435},{"__ignoreMap":360},[7436,7493,7562,7611],{"type":392,"tag":972,"props":7437,"children":7438},{"class":974,"line":975},[7439,7443,7448,7452,7457,7461,7465,7469,7473,7477,7481,7485,7489],{"type":392,"tag":972,"props":7440,"children":7441},{"style":997},[7442],{"type":401,"value":5392},{"type":392,"tag":972,"props":7444,"children":7445},{"style":979},[7446],{"type":401,"value":7447},"get",{"type":392,"tag":972,"props":7449,"children":7450},{"style":997},[7451],{"type":401,"value":1332},{"type":392,"tag":972,"props":7453,"children":7454},{"style":991},[7455],{"type":401,"value":7456},"\"/settings/webhooks/open\"",{"type":392,"tag":972,"props":7458,"children":7459},{"style":997},[7460],{"type":401,"value":5411},{"type":392,"tag":972,"props":7462,"children":7463},{"style":1264},[7464],{"type":401,"value":5416},{"type":392,"tag":972,"props":7466,"children":7467},{"style":997},[7468],{"type":401,"value":1214},{"type":392,"tag":972,"props":7470,"children":7471},{"style":1447},[7472],{"type":401,"value":5425},{"type":392,"tag":972,"props":7474,"children":7475},{"style":997},[7476],{"type":401,"value":1814},{"type":392,"tag":972,"props":7478,"children":7479},{"style":1447},[7480],{"type":401,"value":1923},{"type":392,"tag":972,"props":7482,"children":7483},{"style":997},[7484],{"type":401,"value":2976},{"type":392,"tag":972,"props":7486,"children":7487},{"style":1264},[7488],{"type":401,"value":5442},{"type":392,"tag":972,"props":7490,"children":7491},{"style":997},[7492],{"type":401,"value":2694},{"type":392,"tag":972,"props":7494,"children":7495},{"class":974,"line":1023},[7496,7500,7504,7508,7512,7516,7520,7524,7529,7533,7537,7541,7545,7549,7553,7557],{"type":392,"tag":972,"props":7497,"children":7498},{"style":1264},[7499],{"type":401,"value":1712},{"type":392,"tag":972,"props":7501,"children":7502},{"style":997},[7503],{"type":401,"value":1444},{"type":392,"tag":972,"props":7505,"children":7506},{"style":985},[7507],{"type":401,"value":664},{"type":392,"tag":972,"props":7509,"children":7510},{"style":997},[7511],{"type":401,"value":1660},{"type":392,"tag":972,"props":7513,"children":7514},{"style":1264},[7515],{"type":401,"value":1665},{"type":392,"tag":972,"props":7517,"children":7518},{"style":1264},[7519],{"type":401,"value":1726},{"type":392,"tag":972,"props":7521,"children":7522},{"style":979},[7523],{"type":401,"value":1536},{"type":392,"tag":972,"props":7525,"children":7526},{"style":997},[7527],{"type":401,"value":7528},"(req.user.organizationId, { session_id: ",{"type":392,"tag":972,"props":7530,"children":7531},{"style":991},[7532],{"type":401,"value":5545},{"type":392,"tag":972,"props":7534,"children":7535},{"style":997},[7536],{"type":401,"value":5425},{"type":392,"tag":972,"props":7538,"children":7539},{"style":991},[7540],{"type":401,"value":666},{"type":392,"tag":972,"props":7542,"children":7543},{"style":997},[7544],{"type":401,"value":5550},{"type":392,"tag":972,"props":7546,"children":7547},{"style":991},[7548],{"type":401,"value":666},{"type":392,"tag":972,"props":7550,"children":7551},{"style":997},[7552],{"type":401,"value":5559},{"type":392,"tag":972,"props":7554,"children":7555},{"style":991},[7556],{"type":401,"value":1389},{"type":392,"tag":972,"props":7558,"children":7559},{"style":997},[7560],{"type":401,"value":7561}," });\n",{"type":392,"tag":972,"props":7563,"children":7564},{"class":974,"line":1041},[7565,7569,7573,7577,7581,7585,7589,7593,7598,7602,7606],{"type":392,"tag":972,"props":7566,"children":7567},{"style":997},[7568],{"type":401,"value":5582},{"type":392,"tag":972,"props":7570,"children":7571},{"style":979},[7572],{"type":401,"value":5587},{"type":392,"tag":972,"props":7574,"children":7575},{"style":997},[7576],{"type":401,"value":1332},{"type":392,"tag":972,"props":7578,"children":7579},{"style":991},[7580],{"type":401,"value":5596},{"type":392,"tag":972,"props":7582,"children":7583},{"style":997},[7584],{"type":401,"value":1814},{"type":392,"tag":972,"props":7586,"children":7587},{"style":991},[7588],{"type":401,"value":5605},{"type":392,"tag":972,"props":7590,"children":7591},{"style":997},[7592],{"type":401,"value":1394},{"type":392,"tag":972,"props":7594,"children":7595},{"style":979},[7596],{"type":401,"value":7597},"redirect",{"type":392,"tag":972,"props":7599,"children":7600},{"style":997},[7601],{"type":401,"value":1332},{"type":392,"tag":972,"props":7603,"children":7604},{"style":985},[7605],{"type":401,"value":7413},{"type":392,"tag":972,"props":7607,"children":7608},{"style":997},[7609],{"type":401,"value":7610},", url);\n",{"type":392,"tag":972,"props":7612,"children":7613},{"class":974,"line":1064},[7614],{"type":392,"tag":972,"props":7615,"children":7616},{"style":997},[7617],{"type":401,"value":5626},{"type":392,"tag":1238,"props":7619,"children":7620},{"v-slot:go":360},[7621],{"type":392,"tag":962,"props":7622,"children":7624},{"className":2436,"code":7623,"language":2438,"meta":360,"style":360},"func openPortal(w http.ResponseWriter, r *http.Request) {\n    user := currentUser(r)\n    link, err := CreatePortalSession(r.Context(), user.OrganizationID, PortalSessionOptions{SessionID: \"user-\" + user.ID})\n    if err != nil {\n        http.Error(w, \"could not open the webhooks portal\", http.StatusBadGateway)\n        return\n    }\n    w.Header().Set(\"Cache-Control\", \"no-store\")\n    http.Redirect(w, r, link.URL, http.StatusSeeOther)\n}\n",[7625],{"type":392,"tag":453,"props":7626,"children":7627},{"__ignoreMap":360},[7628,7688,7708,7757,7780,7803,7810,7817,7856,7874],{"type":392,"tag":972,"props":7629,"children":7630},{"class":974,"line":975},[7631,7635,7640,7644,7648,7652,7656,7660,7664,7668,7672,7676,7680,7684],{"type":392,"tag":972,"props":7632,"children":7633},{"style":1264},[7634],{"type":401,"value":2907},{"type":392,"tag":972,"props":7636,"children":7637},{"style":979},[7638],{"type":401,"value":7639}," openPortal",{"type":392,"tag":972,"props":7641,"children":7642},{"style":997},[7643],{"type":401,"value":1332},{"type":392,"tag":972,"props":7645,"children":7646},{"style":1447},[7647],{"type":401,"value":5665},{"type":392,"tag":972,"props":7649,"children":7650},{"style":979},[7651],{"type":401,"value":5670},{"type":392,"tag":972,"props":7653,"children":7654},{"style":997},[7655],{"type":401,"value":666},{"type":392,"tag":972,"props":7657,"children":7658},{"style":979},[7659],{"type":401,"value":5679},{"type":392,"tag":972,"props":7661,"children":7662},{"style":997},[7663],{"type":401,"value":1814},{"type":392,"tag":972,"props":7665,"children":7666},{"style":1447},[7667],{"type":401,"value":5688},{"type":392,"tag":972,"props":7669,"children":7670},{"style":1264},[7671],{"type":401,"value":5693},{"type":392,"tag":972,"props":7673,"children":7674},{"style":979},[7675],{"type":401,"value":5698},{"type":392,"tag":972,"props":7677,"children":7678},{"style":997},[7679],{"type":401,"value":666},{"type":392,"tag":972,"props":7681,"children":7682},{"style":979},[7683],{"type":401,"value":5707},{"type":392,"tag":972,"props":7685,"children":7686},{"style":997},[7687],{"type":401,"value":3623},{"type":392,"tag":972,"props":7689,"children":7690},{"class":974,"line":1023},[7691,7695,7699,7703],{"type":392,"tag":972,"props":7692,"children":7693},{"style":997},[7694],{"type":401,"value":5719},{"type":392,"tag":972,"props":7696,"children":7697},{"style":1264},[7698],{"type":401,"value":2999},{"type":392,"tag":972,"props":7700,"children":7701},{"style":979},[7702],{"type":401,"value":5728},{"type":392,"tag":972,"props":7704,"children":7705},{"style":997},[7706],{"type":401,"value":7707},"(r)\n",{"type":392,"tag":972,"props":7709,"children":7710},{"class":974,"line":1041},[7711,7715,7719,7723,7727,7731,7735,7739,7744,7748,7752],{"type":392,"tag":972,"props":7712,"children":7713},{"style":997},[7714],{"type":401,"value":5799},{"type":392,"tag":972,"props":7716,"children":7717},{"style":1264},[7718],{"type":401,"value":2999},{"type":392,"tag":972,"props":7720,"children":7721},{"style":979},[7722],{"type":401,"value":3550},{"type":392,"tag":972,"props":7724,"children":7725},{"style":997},[7726],{"type":401,"value":5812},{"type":392,"tag":972,"props":7728,"children":7729},{"style":979},[7730],{"type":401,"value":2935},{"type":392,"tag":972,"props":7732,"children":7733},{"style":997},[7734],{"type":401,"value":5821},{"type":392,"tag":972,"props":7736,"children":7737},{"style":979},[7738],{"type":401,"value":5826},{"type":392,"tag":972,"props":7740,"children":7741},{"style":997},[7742],{"type":401,"value":7743},"{SessionID: ",{"type":392,"tag":972,"props":7745,"children":7746},{"style":991},[7747],{"type":401,"value":5851},{"type":392,"tag":972,"props":7749,"children":7750},{"style":1264},[7751],{"type":401,"value":1317},{"type":392,"tag":972,"props":7753,"children":7754},{"style":997},[7755],{"type":401,"value":7756}," user.ID})\n",{"type":392,"tag":972,"props":7758,"children":7759},{"class":974,"line":1064},[7760,7764,7768,7772,7776],{"type":392,"tag":972,"props":7761,"children":7762},{"style":1264},[7763],{"type":401,"value":3023},{"type":392,"tag":972,"props":7765,"children":7766},{"style":997},[7767],{"type":401,"value":3028},{"type":392,"tag":972,"props":7769,"children":7770},{"style":1264},[7771],{"type":401,"value":3033},{"type":392,"tag":972,"props":7773,"children":7774},{"style":985},[7775],{"type":401,"value":3038},{"type":392,"tag":972,"props":7777,"children":7778},{"style":997},[7779],{"type":401,"value":2694},{"type":392,"tag":972,"props":7781,"children":7782},{"class":974,"line":1078},[7783,7787,7791,7795,7799],{"type":392,"tag":972,"props":7784,"children":7785},{"style":997},[7786],{"type":401,"value":5899},{"type":392,"tag":972,"props":7788,"children":7789},{"style":979},[7790],{"type":401,"value":5904},{"type":392,"tag":972,"props":7792,"children":7793},{"style":997},[7794],{"type":401,"value":5909},{"type":392,"tag":972,"props":7796,"children":7797},{"style":991},[7798],{"type":401,"value":5914},{"type":392,"tag":972,"props":7800,"children":7801},{"style":997},[7802],{"type":401,"value":5919},{"type":392,"tag":972,"props":7804,"children":7805},{"class":974,"line":1087},[7806],{"type":392,"tag":972,"props":7807,"children":7808},{"style":1264},[7809],{"type":401,"value":5927},{"type":392,"tag":972,"props":7811,"children":7812},{"class":974,"line":1096},[7813],{"type":392,"tag":972,"props":7814,"children":7815},{"style":997},[7816],{"type":401,"value":3065},{"type":392,"tag":972,"props":7818,"children":7819},{"class":974,"line":1105},[7820,7824,7828,7832,7836,7840,7844,7848,7852],{"type":392,"tag":972,"props":7821,"children":7822},{"style":997},[7823],{"type":401,"value":5942},{"type":392,"tag":972,"props":7825,"children":7826},{"style":979},[7827],{"type":401,"value":5947},{"type":392,"tag":972,"props":7829,"children":7830},{"style":997},[7831],{"type":401,"value":5952},{"type":392,"tag":972,"props":7833,"children":7834},{"style":979},[7835],{"type":401,"value":3227},{"type":392,"tag":972,"props":7837,"children":7838},{"style":997},[7839],{"type":401,"value":1332},{"type":392,"tag":972,"props":7841,"children":7842},{"style":991},[7843],{"type":401,"value":5596},{"type":392,"tag":972,"props":7845,"children":7846},{"style":997},[7847],{"type":401,"value":1814},{"type":392,"tag":972,"props":7849,"children":7850},{"style":991},[7851],{"type":401,"value":5605},{"type":392,"tag":972,"props":7853,"children":7854},{"style":997},[7855],{"type":401,"value":2637},{"type":392,"tag":972,"props":7857,"children":7858},{"class":974,"line":1114},[7859,7864,7869],{"type":392,"tag":972,"props":7860,"children":7861},{"style":997},[7862],{"type":401,"value":7863},"    http.",{"type":392,"tag":972,"props":7865,"children":7866},{"style":979},[7867],{"type":401,"value":7868},"Redirect",{"type":392,"tag":972,"props":7870,"children":7871},{"style":997},[7872],{"type":401,"value":7873},"(w, r, link.URL, http.StatusSeeOther)\n",{"type":392,"tag":972,"props":7875,"children":7876},{"class":974,"line":1123},[7877],{"type":392,"tag":972,"props":7878,"children":7879},{"style":997},[7880],{"type":401,"value":2021},{"type":392,"tag":1238,"props":7882,"children":7883},{"v-slot:python":360},[7884],{"type":392,"tag":962,"props":7885,"children":7887},{"className":4071,"code":7886,"language":4073,"meta":360,"style":360},"from flask import redirect\n\n\n@app.get(\"/settings/webhooks/open\")\n@login_required\ndef open_webhooks_portal():\n    link = create_portal_session(current_user.organization_id, session_id=f\"user-{current_user.id}\")\n    resp = redirect(link[\"url\"], code=303)\n    resp.headers[\"Cache-Control\"] = \"no-store\"\n    return resp\n",[7888],{"type":392,"tag":453,"props":7889,"children":7890},{"__ignoreMap":360},[7891,7911,7918,7925,7945,7952,7968,8020,8061,8084],{"type":392,"tag":972,"props":7892,"children":7893},{"class":974,"line":975},[7894,7898,7902,7906],{"type":392,"tag":972,"props":7895,"children":7896},{"style":1264},[7897],{"type":401,"value":1327},{"type":392,"tag":972,"props":7899,"children":7900},{"style":997},[7901],{"type":401,"value":6114},{"type":392,"tag":972,"props":7903,"children":7904},{"style":1264},[7905],{"type":401,"value":2478},{"type":392,"tag":972,"props":7907,"children":7908},{"style":997},[7909],{"type":401,"value":7910}," redirect\n",{"type":392,"tag":972,"props":7912,"children":7913},{"class":974,"line":1023},[7914],{"type":392,"tag":972,"props":7915,"children":7916},{"emptyLinePlaceholder":1419},[7917],{"type":401,"value":1422},{"type":392,"tag":972,"props":7919,"children":7920},{"class":974,"line":1041},[7921],{"type":392,"tag":972,"props":7922,"children":7923},{"emptyLinePlaceholder":1419},[7924],{"type":401,"value":1422},{"type":392,"tag":972,"props":7926,"children":7927},{"class":974,"line":1064},[7928,7933,7937,7941],{"type":392,"tag":972,"props":7929,"children":7930},{"style":979},[7931],{"type":401,"value":7932},"@app.get",{"type":392,"tag":972,"props":7934,"children":7935},{"style":997},[7936],{"type":401,"value":1332},{"type":392,"tag":972,"props":7938,"children":7939},{"style":991},[7940],{"type":401,"value":7456},{"type":392,"tag":972,"props":7942,"children":7943},{"style":997},[7944],{"type":401,"value":2637},{"type":392,"tag":972,"props":7946,"children":7947},{"class":974,"line":1078},[7948],{"type":392,"tag":972,"props":7949,"children":7950},{"style":979},[7951],{"type":401,"value":6226},{"type":392,"tag":972,"props":7953,"children":7954},{"class":974,"line":1087},[7955,7959,7964],{"type":392,"tag":972,"props":7956,"children":7957},{"style":1264},[7958],{"type":401,"value":4215},{"type":392,"tag":972,"props":7960,"children":7961},{"style":979},[7962],{"type":401,"value":7963}," open_webhooks_portal",{"type":392,"tag":972,"props":7965,"children":7966},{"style":997},[7967],{"type":401,"value":6243},{"type":392,"tag":972,"props":7969,"children":7970},{"class":974,"line":1096},[7971,7975,7979,7984,7988,7992,7996,8000,8004,8008,8012,8016],{"type":392,"tag":972,"props":7972,"children":7973},{"style":997},[7974],{"type":401,"value":6251},{"type":392,"tag":972,"props":7976,"children":7977},{"style":1264},[7978],{"type":401,"value":1665},{"type":392,"tag":972,"props":7980,"children":7981},{"style":997},[7982],{"type":401,"value":7983}," create_portal_session(current_user.organization_id, ",{"type":392,"tag":972,"props":7985,"children":7986},{"style":1447},[7987],{"type":401,"value":1647},{"type":392,"tag":972,"props":7989,"children":7990},{"style":1264},[7991],{"type":401,"value":1665},{"type":392,"tag":972,"props":7993,"children":7994},{"style":1264},[7995],{"type":401,"value":6324},{"type":392,"tag":972,"props":7997,"children":7998},{"style":991},[7999],{"type":401,"value":6329},{"type":392,"tag":972,"props":8001,"children":8002},{"style":985},[8003],{"type":401,"value":4306},{"type":392,"tag":972,"props":8005,"children":8006},{"style":997},[8007],{"type":401,"value":6338},{"type":392,"tag":972,"props":8009,"children":8010},{"style":985},[8011],{"type":401,"value":4334},{"type":392,"tag":972,"props":8013,"children":8014},{"style":991},[8015],{"type":401,"value":1015},{"type":392,"tag":972,"props":8017,"children":8018},{"style":997},[8019],{"type":401,"value":2637},{"type":392,"tag":972,"props":8021,"children":8022},{"class":974,"line":1105},[8023,8027,8031,8036,8040,8045,8049,8053,8057],{"type":392,"tag":972,"props":8024,"children":8025},{"style":997},[8026],{"type":401,"value":4270},{"type":392,"tag":972,"props":8028,"children":8029},{"style":1264},[8030],{"type":401,"value":1665},{"type":392,"tag":972,"props":8032,"children":8033},{"style":997},[8034],{"type":401,"value":8035}," redirect(link[",{"type":392,"tag":972,"props":8037,"children":8038},{"style":991},[8039],{"type":401,"value":6072},{"type":392,"tag":972,"props":8041,"children":8042},{"style":997},[8043],{"type":401,"value":8044},"], ",{"type":392,"tag":972,"props":8046,"children":8047},{"style":1447},[8048],{"type":401,"value":453},{"type":392,"tag":972,"props":8050,"children":8051},{"style":1264},[8052],{"type":401,"value":1665},{"type":392,"tag":972,"props":8054,"children":8055},{"style":985},[8056],{"type":401,"value":7413},{"type":392,"tag":972,"props":8058,"children":8059},{"style":997},[8060],{"type":401,"value":2637},{"type":392,"tag":972,"props":8062,"children":8063},{"class":974,"line":1114},[8064,8068,8072,8076,8080],{"type":392,"tag":972,"props":8065,"children":8066},{"style":997},[8067],{"type":401,"value":6402},{"type":392,"tag":972,"props":8069,"children":8070},{"style":991},[8071],{"type":401,"value":5596},{"type":392,"tag":972,"props":8073,"children":8074},{"style":997},[8075],{"type":401,"value":3964},{"type":392,"tag":972,"props":8077,"children":8078},{"style":1264},[8079],{"type":401,"value":1665},{"type":392,"tag":972,"props":8081,"children":8082},{"style":991},[8083],{"type":401,"value":6419},{"type":392,"tag":972,"props":8085,"children":8086},{"class":974,"line":1123},[8087,8091],{"type":392,"tag":972,"props":8088,"children":8089},{"style":1264},[8090],{"type":401,"value":3488},{"type":392,"tag":972,"props":8092,"children":8093},{"style":997},[8094],{"type":401,"value":6431},{"type":392,"tag":393,"props":8096,"children":8097},{},[8098,8100,8104],{"type":401,"value":8099},"Point the ",{"type":392,"tag":397,"props":8101,"children":8102},{},[8103],{"type":401,"value":916},{"type":401,"value":8105}," setting at this route. When a session expires, the portal shows a button that opens it, and the user lands in a fresh session.",{"type":392,"tag":425,"props":8107,"children":8109},{"id":8108},"end-sessions-on-sign-out",[8110],{"type":401,"value":8111},"End sessions on sign-out",{"type":392,"tag":393,"props":8113,"children":8114},{},[8115,8117,8122,8124,8129],{"type":401,"value":8116},"Sessions end on their own after ",{"type":392,"tag":453,"props":8118,"children":8120},{"className":8119},[],[8121],{"type":401,"value":1612},{"type":401,"value":8123},". To end them sooner, for example when the user signs out of your app or loses access to the organization, call the expire endpoint with the same ",{"type":392,"tag":453,"props":8125,"children":8127},{"className":8126},[],[8128],{"type":401,"value":1647},{"type":401,"value":8130}," you minted with, or without one to end every open session of that customer:",{"type":392,"tag":1232,"props":8132,"children":8133},{"group":1234,"tabs":1235},[8134,8184,8228,8274],{"type":392,"tag":1238,"props":8135,"children":8136},{"v-slot:node":360},[8137],{"type":392,"tag":962,"props":8138,"children":8140},{"className":1243,"code":8139,"language":1245,"meta":360,"style":360},"await endPortalSessions(user.organizationId, `user-${user.id}`);\n",[8141],{"type":392,"tag":453,"props":8142,"children":8143},{"__ignoreMap":360},[8144],{"type":392,"tag":972,"props":8145,"children":8146},{"class":974,"line":975},[8147,8151,8155,8160,8164,8168,8172,8176,8180],{"type":392,"tag":972,"props":8148,"children":8149},{"style":1264},[8150],{"type":401,"value":1942},{"type":392,"tag":972,"props":8152,"children":8153},{"style":979},[8154],{"type":401,"value":2059},{"type":392,"tag":972,"props":8156,"children":8157},{"style":997},[8158],{"type":401,"value":8159},"(user.organizationId, ",{"type":392,"tag":972,"props":8161,"children":8162},{"style":991},[8163],{"type":401,"value":5545},{"type":392,"tag":972,"props":8165,"children":8166},{"style":997},[8167],{"type":401,"value":5550},{"type":392,"tag":972,"props":8169,"children":8170},{"style":991},[8171],{"type":401,"value":666},{"type":392,"tag":972,"props":8173,"children":8174},{"style":997},[8175],{"type":401,"value":5559},{"type":392,"tag":972,"props":8177,"children":8178},{"style":991},[8179],{"type":401,"value":1389},{"type":392,"tag":972,"props":8181,"children":8182},{"style":997},[8183],{"type":401,"value":1413},{"type":392,"tag":1238,"props":8185,"children":8186},{"v-slot:go":360},[8187],{"type":392,"tag":962,"props":8188,"children":8190},{"className":2436,"code":8189,"language":2438,"meta":360,"style":360},"ended, err := EndPortalSessions(ctx, user.OrganizationID, \"user-\"+user.ID)\n",[8191],{"type":392,"tag":453,"props":8192,"children":8193},{"__ignoreMap":360},[8194],{"type":392,"tag":972,"props":8195,"children":8196},{"class":974,"line":975},[8197,8202,8206,8210,8215,8219,8223],{"type":392,"tag":972,"props":8198,"children":8199},{"style":997},[8200],{"type":401,"value":8201},"ended, err ",{"type":392,"tag":972,"props":8203,"children":8204},{"style":1264},[8205],{"type":401,"value":2999},{"type":392,"tag":972,"props":8207,"children":8208},{"style":979},[8209],{"type":401,"value":3768},{"type":392,"tag":972,"props":8211,"children":8212},{"style":997},[8213],{"type":401,"value":8214},"(ctx, user.OrganizationID, ",{"type":392,"tag":972,"props":8216,"children":8217},{"style":991},[8218],{"type":401,"value":5851},{"type":392,"tag":972,"props":8220,"children":8221},{"style":1264},[8222],{"type":401,"value":3098},{"type":392,"tag":972,"props":8224,"children":8225},{"style":997},[8226],{"type":401,"value":8227},"user.ID)\n",{"type":392,"tag":1238,"props":8229,"children":8230},{"v-slot:python":360},[8231],{"type":392,"tag":962,"props":8232,"children":8234},{"className":4071,"code":8233,"language":4073,"meta":360,"style":360},"end_portal_sessions(current_user.organization_id, f\"user-{current_user.id}\")\n",[8235],{"type":392,"tag":453,"props":8236,"children":8237},{"__ignoreMap":360},[8238],{"type":392,"tag":972,"props":8239,"children":8240},{"class":974,"line":975},[8241,8246,8250,8254,8258,8262,8266,8270],{"type":392,"tag":972,"props":8242,"children":8243},{"style":997},[8244],{"type":401,"value":8245},"end_portal_sessions(current_user.organization_id, ",{"type":392,"tag":972,"props":8247,"children":8248},{"style":1264},[8249],{"type":401,"value":6324},{"type":392,"tag":972,"props":8251,"children":8252},{"style":991},[8253],{"type":401,"value":6329},{"type":392,"tag":972,"props":8255,"children":8256},{"style":985},[8257],{"type":401,"value":4306},{"type":392,"tag":972,"props":8259,"children":8260},{"style":997},[8261],{"type":401,"value":6338},{"type":392,"tag":972,"props":8263,"children":8264},{"style":985},[8265],{"type":401,"value":4334},{"type":392,"tag":972,"props":8267,"children":8268},{"style":991},[8269],{"type":401,"value":1015},{"type":392,"tag":972,"props":8271,"children":8272},{"style":997},[8273],{"type":401,"value":2637},{"type":392,"tag":1238,"props":8275,"children":8276},{"v-slot:curl":360},[8277],{"type":392,"tag":962,"props":8278,"children":8280},{"className":964,"code":8279,"language":966,"meta":360,"style":360},"curl --user \"$RELAY_KEY:$RELAY_SECRET\" \\\n  -H 'Content-Type: application/json' \\\n  -X POST https://my.webhookrelay.com/v1/outbound/consumers/acme_corp/portal-sessions/expire \\\n  -d '{\"session_id\": \"user-123\"}'\n# {\"ended\":1}\n",[8281],{"type":392,"tag":453,"props":8282,"children":8283},{"__ignoreMap":360},[8284,8319,8334,8354,8366],{"type":392,"tag":972,"props":8285,"children":8286},{"class":974,"line":975},[8287,8291,8295,8299,8303,8307,8311,8315],{"type":392,"tag":972,"props":8288,"children":8289},{"style":979},[8290],{"type":401,"value":982},{"type":392,"tag":972,"props":8292,"children":8293},{"style":985},[8294],{"type":401,"value":988},{"type":392,"tag":972,"props":8296,"children":8297},{"style":991},[8298],{"type":401,"value":994},{"type":392,"tag":972,"props":8300,"children":8301},{"style":997},[8302],{"type":401,"value":1000},{"type":392,"tag":972,"props":8304,"children":8305},{"style":991},[8306],{"type":401,"value":1005},{"type":392,"tag":972,"props":8308,"children":8309},{"style":997},[8310],{"type":401,"value":1010},{"type":392,"tag":972,"props":8312,"children":8313},{"style":991},[8314],{"type":401,"value":1015},{"type":392,"tag":972,"props":8316,"children":8317},{"style":985},[8318],{"type":401,"value":1020},{"type":392,"tag":972,"props":8320,"children":8321},{"class":974,"line":1023},[8322,8326,8330],{"type":392,"tag":972,"props":8323,"children":8324},{"style":985},[8325],{"type":401,"value":1029},{"type":392,"tag":972,"props":8327,"children":8328},{"style":991},[8329],{"type":401,"value":1034},{"type":392,"tag":972,"props":8331,"children":8332},{"style":985},[8333],{"type":401,"value":1020},{"type":392,"tag":972,"props":8335,"children":8336},{"class":974,"line":1041},[8337,8341,8345,8350],{"type":392,"tag":972,"props":8338,"children":8339},{"style":985},[8340],{"type":401,"value":1047},{"type":392,"tag":972,"props":8342,"children":8343},{"style":991},[8344],{"type":401,"value":4767},{"type":392,"tag":972,"props":8346,"children":8347},{"style":991},[8348],{"type":401,"value":8349}," https://my.webhookrelay.com/v1/outbound/consumers/acme_corp/portal-sessions/expire",{"type":392,"tag":972,"props":8351,"children":8352},{"style":985},[8353],{"type":401,"value":1020},{"type":392,"tag":972,"props":8355,"children":8356},{"class":974,"line":1064},[8357,8361],{"type":392,"tag":972,"props":8358,"children":8359},{"style":985},[8360],{"type":401,"value":1070},{"type":392,"tag":972,"props":8362,"children":8363},{"style":991},[8364],{"type":401,"value":8365}," '{\"session_id\": \"user-123\"}'\n",{"type":392,"tag":972,"props":8367,"children":8368},{"class":974,"line":1078},[8369],{"type":392,"tag":972,"props":8370,"children":8371},{"style":1255},[8372],{"type":401,"value":8373},"# {\"ended\":1}\n",{"type":392,"tag":393,"props":8375,"children":8376},{},[8377],{"type":401,"value":8378},"An open portal page shows that the session ended on its next request, with the refresh button if you configured one.",{"type":392,"tag":724,"props":8380,"children":8382},{":end":8381,"end":360},"true",[],{"type":392,"tag":425,"props":8384,"children":8386},{"id":8385},"what-your-customer-sees",[8387],{"type":401,"value":8388},"What your customer sees",{"type":392,"tag":393,"props":8390,"children":8391},{},[8392],{"type":401,"value":8393},"The customer adds its own endpoint with the same form you use in the dashboard: destination, event types, optional channels and a payload filter, rate and timeout, and an optional existing signing secret to import.",{"type":392,"tag":415,"props":8395,"children":8400},{"alt":8396,"caption":8397,"height":8398,"src":8399,"url":421,"width":422},"Add endpoint dialog inside the customer portal with destination URL https://hooks.acme.example/lumen, description Finance team alerts, All events selected and a payload filter amount greater than or equal to 10000","A customer registering an endpoint that only receives invoices of 10,000 or more.",840,"/images/docs/outbound/portal-add-endpoint.webp",[],{"type":392,"tag":393,"props":8402,"children":8403},{},[8404,8409,8411,8417],{"type":392,"tag":397,"props":8405,"children":8406},{},[8407],{"type":401,"value":8408},"Send test event",{"type":401,"value":8410}," delivers a signed test straight away, and the customer sees the attempt and the response its server returned. Test events count toward your account's ",{"type":392,"tag":406,"props":8412,"children":8414},{"href":8413},"/docs/outbound/setup/#send-a-test-event-to-one-endpoint",[8415],{"type":401,"value":8416},"100 test events per 24 hours",{"type":401,"value":8418},", not toward the monthly message quota.",{"type":392,"tag":415,"props":8420,"children":8425},{"alt":8421,"caption":8422,"height":8423,"src":8424,"url":421,"width":422},"Portal message page for a test invoice.paid event showing the payload and one delivered attempt with HTTP 200","A test event in the portal: payload, endpoint and every attempt.",650,"/images/docs/outbound/portal-test-event.webp",[],{"type":392,"tag":393,"props":8427,"children":8428},{},[8429,8430,8435,8437,8443,8444,8450,8452,8458],{"type":401,"value":883},{"type":392,"tag":397,"props":8431,"children":8432},{},[8433],{"type":401,"value":8434},"Event catalog",{"type":401,"value":8436}," tab lists your non-deprecated event types with their descriptions and example payloads, so customers know what to subscribe to. Write good ",{"type":392,"tag":453,"props":8438,"children":8440},{"className":8439},[],[8441],{"type":401,"value":8442},"description",{"type":401,"value":1222},{"type":392,"tag":453,"props":8445,"children":8447},{"className":8446},[],[8448],{"type":401,"value":8449},"example",{"type":401,"value":8451}," values when you ",{"type":392,"tag":406,"props":8453,"children":8455},{"href":8454},"/docs/outbound/setup/#create-event-types",[8456],{"type":401,"value":8457},"create event types",{"type":401,"value":666},{"type":392,"tag":415,"props":8460,"children":8465},{"alt":8461,"caption":8462,"height":8463,"src":8464,"url":421,"width":422},"Portal event catalog listing invoice.paid, invoice.payment_failed, subscription.canceled and subscription.updated with descriptions","The event catalog tab, built from your event types.",480,"/images/docs/outbound/portal-event-catalog.webp",[],{"type":392,"tag":425,"props":8467,"children":8469},{"id":8468},"open-a-customers-portal-from-the-dashboard",[8470],{"type":401,"value":8471},"Open a customer's portal from the dashboard",{"type":392,"tag":393,"props":8473,"children":8474},{},[8475,8477,8481,8482,8487,8489,8494],{"type":401,"value":8476},"Support teams can see exactly what a customer sees. On a consumer's page in ",{"type":392,"tag":397,"props":8478,"children":8479},{},[8480],{"type":401,"value":365},{"type":401,"value":1814},{"type":392,"tag":397,"props":8483,"children":8484},{},[8485],{"type":401,"value":8486},"Open portal",{"type":401,"value":8488}," opens a ",{"type":392,"tag":453,"props":8490,"children":8492},{"className":8491},[],[8493],{"type":401,"value":458},{"type":401,"value":8495}," session for that consumer in a new tab. Changes made there are audited under your name.",{"type":392,"tag":425,"props":8497,"children":8499},{"id":8498},"environments",[8500],{"type":401,"value":8501},"Environments",{"type":392,"tag":393,"props":8503,"children":8504},{},[8505,8507,8511,8513,8519],{"type":401,"value":8506},"A portal session belongs to the ",{"type":392,"tag":406,"props":8508,"children":8509},{"href":943},[8510],{"type":401,"value":946},{"type":401,"value":8512}," it was created in, and the portal acts only there. To give a customer the portal for your ",{"type":392,"tag":453,"props":8514,"children":8516},{"className":8515},[],[8517],{"type":401,"value":8518},"staging",{"type":401,"value":8520}," environment, send the environment header when you mint the link:",{"type":392,"tag":958,"props":8522,"children":8523},{},[8524],{"type":392,"tag":962,"props":8525,"children":8527},{"className":964,"code":8526,"language":966,"meta":360,"style":360},"curl --user \"$RELAY_KEY:$RELAY_SECRET\" \\\n  -H 'Content-Type: application/json' \\\n  -H 'X-Outbound-Environment: staging' \\\n  -X POST https://my.webhookrelay.com/v1/outbound/consumers/acme_corp/portal-sessions \\\n  -d '{}'\n",[8528],{"type":392,"tag":453,"props":8529,"children":8530},{"__ignoreMap":360},[8531,8566,8581,8597,8616],{"type":392,"tag":972,"props":8532,"children":8533},{"class":974,"line":975},[8534,8538,8542,8546,8550,8554,8558,8562],{"type":392,"tag":972,"props":8535,"children":8536},{"style":979},[8537],{"type":401,"value":982},{"type":392,"tag":972,"props":8539,"children":8540},{"style":985},[8541],{"type":401,"value":988},{"type":392,"tag":972,"props":8543,"children":8544},{"style":991},[8545],{"type":401,"value":994},{"type":392,"tag":972,"props":8547,"children":8548},{"style":997},[8549],{"type":401,"value":1000},{"type":392,"tag":972,"props":8551,"children":8552},{"style":991},[8553],{"type":401,"value":1005},{"type":392,"tag":972,"props":8555,"children":8556},{"style":997},[8557],{"type":401,"value":1010},{"type":392,"tag":972,"props":8559,"children":8560},{"style":991},[8561],{"type":401,"value":1015},{"type":392,"tag":972,"props":8563,"children":8564},{"style":985},[8565],{"type":401,"value":1020},{"type":392,"tag":972,"props":8567,"children":8568},{"class":974,"line":1023},[8569,8573,8577],{"type":392,"tag":972,"props":8570,"children":8571},{"style":985},[8572],{"type":401,"value":1029},{"type":392,"tag":972,"props":8574,"children":8575},{"style":991},[8576],{"type":401,"value":1034},{"type":392,"tag":972,"props":8578,"children":8579},{"style":985},[8580],{"type":401,"value":1020},{"type":392,"tag":972,"props":8582,"children":8583},{"class":974,"line":1041},[8584,8588,8593],{"type":392,"tag":972,"props":8585,"children":8586},{"style":985},[8587],{"type":401,"value":1029},{"type":392,"tag":972,"props":8589,"children":8590},{"style":991},[8591],{"type":401,"value":8592}," 'X-Outbound-Environment: staging'",{"type":392,"tag":972,"props":8594,"children":8595},{"style":985},[8596],{"type":401,"value":1020},{"type":392,"tag":972,"props":8598,"children":8599},{"class":974,"line":1064},[8600,8604,8608,8612],{"type":392,"tag":972,"props":8601,"children":8602},{"style":985},[8603],{"type":401,"value":1047},{"type":392,"tag":972,"props":8605,"children":8606},{"style":991},[8607],{"type":401,"value":4767},{"type":392,"tag":972,"props":8609,"children":8610},{"style":991},[8611],{"type":401,"value":4772},{"type":392,"tag":972,"props":8613,"children":8614},{"style":985},[8615],{"type":401,"value":1020},{"type":392,"tag":972,"props":8617,"children":8618},{"class":974,"line":1078},[8619,8623],{"type":392,"tag":972,"props":8620,"children":8621},{"style":985},[8622],{"type":401,"value":1070},{"type":392,"tag":972,"props":8624,"children":8625},{"style":991},[8626],{"type":401,"value":8627}," '{}'\n",{"type":392,"tag":393,"props":8629,"children":8630},{},[8631],{"type":401,"value":8632},"An access token bound to one environment always mints sessions there. Branding and allowed origins are shared by all environments.",{"type":392,"tag":425,"props":8634,"children":8636},{"id":8635},"security-checklist",[8637],{"type":401,"value":8638},"Security checklist",{"type":392,"tag":5191,"props":8640,"children":8642},{"label":8641},"Before you ship",[8643],{"type":392,"tag":8644,"props":8645,"children":8646},"ul",{},[8647,8652,8657,8669,8682,8692],{"type":392,"tag":641,"props":8648,"children":8649},{},[8650],{"type":401,"value":8651},"Mint links on your server only. Your Webhook Relay credentials must never reach browser code.",{"type":392,"tag":641,"props":8653,"children":8654},{},[8655],{"type":401,"value":8656},"Map the signed-in user to their own consumer ID on the server. Never take the consumer ID from the request.",{"type":392,"tag":641,"props":8658,"children":8659},{},[8660,8662,8667],{"type":401,"value":8661},"Use ",{"type":392,"tag":453,"props":8663,"children":8665},{"className":8664},[],[8666],{"type":401,"value":469},{"type":401,"value":8668}," sessions for users who shouldn't change webhook settings.",{"type":392,"tag":641,"props":8670,"children":8671},{},[8672,8674,8680],{"type":401,"value":8673},"Return the link with ",{"type":392,"tag":453,"props":8675,"children":8677},{"className":8676},[],[8678],{"type":401,"value":8679},"Cache-Control: no-store",{"type":401,"value":8681},", never log it, and mint a new one on every page load.",{"type":392,"tag":641,"props":8683,"children":8684},{},[8685,8687,8691],{"type":401,"value":8686},"List only your own app's origins in ",{"type":392,"tag":397,"props":8688,"children":8689},{},[8690],{"type":401,"value":878},{"type":401,"value":666},{"type":392,"tag":641,"props":8693,"children":8694},{},[8695],{"type":401,"value":8696},"End sessions with the expire endpoint when a user signs out or leaves the organization.",{"type":392,"tag":425,"props":8698,"children":8700},{"id":8699},"api-and-mcp-reference",[8701],{"type":401,"value":8702},"API and MCP reference",{"type":392,"tag":432,"props":8704,"children":8705},{},[8706,8727],{"type":392,"tag":436,"props":8707,"children":8708},{},[8709],{"type":392,"tag":440,"props":8710,"children":8711},{},[8712,8717,8722],{"type":392,"tag":444,"props":8713,"children":8714},{},[8715],{"type":401,"value":8716},"Action",{"type":392,"tag":444,"props":8718,"children":8719},{},[8720],{"type":401,"value":8721},"REST",{"type":392,"tag":444,"props":8723,"children":8724},{},[8725],{"type":401,"value":8726},"MCP tool",{"type":392,"tag":473,"props":8728,"children":8729},{},[8730,8755,8781,8806],{"type":392,"tag":440,"props":8731,"children":8732},{},[8733,8738,8746],{"type":392,"tag":480,"props":8734,"children":8735},{},[8736],{"type":401,"value":8737},"Create a portal link",{"type":392,"tag":480,"props":8739,"children":8740},{},[8741],{"type":392,"tag":453,"props":8742,"children":8744},{"className":8743},[],[8745],{"type":401,"value":656},{"type":392,"tag":480,"props":8747,"children":8748},{},[8749],{"type":392,"tag":453,"props":8750,"children":8752},{"className":8751},[],[8753],{"type":401,"value":8754},"create_outbound_portal_session",{"type":392,"tag":440,"props":8756,"children":8757},{},[8758,8763,8772],{"type":392,"tag":480,"props":8759,"children":8760},{},[8761],{"type":401,"value":8762},"End sessions",{"type":392,"tag":480,"props":8764,"children":8765},{},[8766],{"type":392,"tag":453,"props":8767,"children":8769},{"className":8768},[],[8770],{"type":401,"value":8771},"POST /v1/outbound/consumers/{id}/portal-sessions/expire",{"type":392,"tag":480,"props":8773,"children":8774},{},[8775],{"type":392,"tag":453,"props":8776,"children":8778},{"className":8777},[],[8779],{"type":401,"value":8780},"end_outbound_portal_sessions",{"type":392,"tag":440,"props":8782,"children":8783},{},[8784,8789,8797],{"type":392,"tag":480,"props":8785,"children":8786},{},[8787],{"type":401,"value":8788},"Read settings",{"type":392,"tag":480,"props":8790,"children":8791},{},[8792],{"type":392,"tag":453,"props":8793,"children":8795},{"className":8794},[],[8796],{"type":401,"value":1147},{"type":392,"tag":480,"props":8798,"children":8799},{},[8800],{"type":392,"tag":453,"props":8801,"children":8803},{"className":8802},[],[8804],{"type":401,"value":8805},"get_outbound_portal_settings",{"type":392,"tag":440,"props":8807,"children":8808},{},[8809,8814,8822],{"type":392,"tag":480,"props":8810,"children":8811},{},[8812],{"type":401,"value":8813},"Replace settings",{"type":392,"tag":480,"props":8815,"children":8816},{},[8817],{"type":392,"tag":453,"props":8818,"children":8820},{"className":8819},[],[8821],{"type":401,"value":954},{"type":392,"tag":480,"props":8823,"children":8824},{},[8825],{"type":392,"tag":453,"props":8826,"children":8828},{"className":8827},[],[8829],{"type":401,"value":8830},"update_outbound_portal_settings",{"type":392,"tag":393,"props":8832,"children":8833},{},[8834,8836,8842,8844,8849],{"type":401,"value":8835},"The MCP tools are available to MCP clients and the dashboard agent, so you can ask it to \"open the portal for acme_corp\" or \"allow ",{"type":392,"tag":406,"props":8837,"children":8840},{"href":896,"rel":8838},[8839],"nofollow",[8841],{"type":401,"value":896},{"type":401,"value":8843}," to embed the portal\". The portal's own ",{"type":392,"tag":453,"props":8845,"children":8847},{"className":8846},[],[8848],{"type":401,"value":715},{"type":401,"value":8850}," API accepts only portal sessions, never account tokens, and is not meant to be called from your code.",{"type":392,"tag":425,"props":8852,"children":8854},{"id":8853},"next-steps",[8855],{"type":401,"value":8856},"Next steps",{"type":392,"tag":8644,"props":8858,"children":8859},{},[8860,8870,8883],{"type":392,"tag":641,"props":8861,"children":8862},{},[8863,8868],{"type":392,"tag":406,"props":8864,"children":8866},{"href":8865},"/docs/outbound/setup/",[8867],{"type":401,"value":69},{"type":401,"value":8869}," if you haven't created event types and consumers yet.",{"type":392,"tag":641,"props":8871,"children":8872},{},[8873,8875,8881],{"type":401,"value":8874},"Send customers the ",{"type":392,"tag":406,"props":8876,"children":8878},{"href":8877},"/docs/outbound/receiving/",[8879],{"type":401,"value":8880},"receiving guide",{"type":401,"value":8882}," so they can verify signatures with the secret they find in the portal.",{"type":392,"tag":641,"props":8884,"children":8885},{},[8886,8891],{"type":392,"tag":406,"props":8887,"children":8889},{"href":8888},"/docs/outbound/operating/",[8890],{"type":401,"value":75},{"type":401,"value":8892}," across all customers from your side.",{"type":392,"tag":8894,"props":8895,"children":8896},"style",{},[8897],{"type":401,"value":8898},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":360,"searchDepth":1041,"depth":1041,"links":8900},[8901,8902,8903,8904,8905,8908,8909,8910,8911,8912,8913,8914],{"id":427,"depth":1023,"text":430},{"id":632,"depth":1023,"text":635},{"id":729,"depth":1023,"text":732},{"id":1191,"depth":1023,"text":1194},{"id":5256,"depth":1023,"text":5259,"children":8906},[8907],{"id":7400,"depth":1041,"text":1178},{"id":8108,"depth":1023,"text":8111},{"id":8385,"depth":1023,"text":8388},{"id":8468,"depth":1023,"text":8471},{"id":8498,"depth":1023,"text":8501},{"id":8635,"depth":1023,"text":8638},{"id":8699,"depth":1023,"text":8702},{"id":8853,"depth":1023,"text":8856},"markdown","content:docs:outbound:5.portal.md","content","docs/outbound/5.portal.md","docs/outbound/5.portal","md",{"loc":77},1795681351664]