<!DOCTYPE html><html lang="en" class="inter_1d81deff-module__CYM0aG__variable papermono_89c757f2-module__6aS5zq__variable dark" data-banner-state="visible" data-assistant-state="closed" data-page-mode="none" data-current-path="/"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/><link rel="preload" href="/mintlify-assets/_next/static/media/83afe278b6a6bb3c.p.3a6ba036.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/mintlify-assets/_next/static/media/PaperMono_Variable.p.590789cb.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/mintlify-assets/_next/static/media/f67ad414ed34149c.p.84166d94.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" as="image" href="https://mintcdn.com/notion-demo/5YdhSbldE14t5Rna/logo/light.svg?fit=max&amp;auto=format&amp;n=5YdhSbldE14t5Rna&amp;q=85&amp;s=249f5693ad929397409bf9b51d6d539d"/><link rel="preload" as="image" href="https://mintcdn.com/notion-demo/5YdhSbldE14t5Rna/logo/dark.svg?fit=max&amp;auto=format&amp;n=5YdhSbldE14t5Rna&amp;q=85&amp;s=a8404879d171debac543bb6c1482c909"/><link rel="stylesheet" href="/mintlify-assets/_next/static/chunks/a2c16a79b30ca688.css?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" data-precedence="next"/><link rel="stylesheet" href="/mintlify-assets/_next/static/chunks/ea2154a47c78cbbc.css?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" data-precedence="next"/><style data-precedence="base-ui:low" data-href="base-ui-disable-scrollbar">.base-ui-disable-scrollbar{scrollbar-width:none}.base-ui-disable-scrollbar::-webkit-scrollbar{display:none}</style><link rel="preload" as="script" fetchPriority="low" href="/mintlify-assets/_next/static/chunks/6d55b684068fd47e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb"/><script src="/mintlify-assets/_next/static/chunks/44795504c795ca32.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/cf59321fd537ca62.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/f486afc314643ce1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/2fbac321f3352eaf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/turbopack-b663a20dd5cb29c3.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/b0309243d1680917.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/535329ac74b0ca01.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/1954288adc1590b1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/94496c4479252ca1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/be7f34c551fcffd1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/0534993a51af00f5.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/d9ca228e7af9807a.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/ac544a47bf6b23f1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/d48636393ee0b554.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/1353a205bc2072e2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/8bb4281d16257889.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><script src="/mintlify-assets/_next/static/chunks/bbe9a3c9a38b4577.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" async=""></script><link rel="preload" href="/mintlify-assets/_next/static/chunks/4d8374b1f183ef74.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" as="script" fetchPriority="low"/><link rel="preload" href="/mintlify-assets/_next/static/chunks/3aa704238c912684.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" as="script" fetchPriority="low"/><title>Authorization - Notion Docs</title><meta name="description" content="This guide describes the authorization flows for Notion connections and personal access tokens."/><meta name="application-name" content="Notion Docs"/><meta name="generator" content="Mintlify"/><meta name="msapplication-config" content="/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon/browserconfig.xml"/><meta name="apple-mobile-web-app-title" content="Notion Docs"/><meta name="msapplication-TileColor" content="#000"/><link rel="canonical" href="https://developers.notion.com/guides/get-started/authorization"/><link rel="alternate" type="application/xml" href="/sitemap.xml"/><link rel="alternate" type="text/markdown" href="/guides/get-started/authorization.md"/><meta property="og:title" content="Authorization - Notion Docs"/><meta property="og:description" content="This guide describes the authorization flows for Notion connections and personal access tokens."/><meta property="og:url" content="https://developers.notion.com/guides/get-started/authorization"/><meta property="og:site_name" content="Notion Docs"/><meta property="og:image" content="https://notion-demo.mintlify.app/images/og-image.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:type" content="website"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="Authorization - Notion Docs"/><meta name="twitter:description" content="This guide describes the authorization flows for Notion connections and personal access tokens."/><meta name="twitter:image" content="https://notion-demo.mintlify.app/images/og-image.png"/><meta name="twitter:image:width" content="1200"/><meta name="twitter:image:height" content="630"/><link rel="icon" href="/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon/android-chrome-192x192.png" type="image/png" sizes="192x192" media="(prefers-color-scheme: light)"/><link rel="apple-touch-icon" href="/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon/apple-touch-icon.png" type="image/png" sizes="180x180"/><link rel="icon" href="/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon/favicon-16x16.png" type="image/png" sizes="16x16" media="(prefers-color-scheme: light)"/><link rel="icon" href="/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon/favicon-32x32.png" type="image/png" sizes="32x32" media="(prefers-color-scheme: light)"/><link rel="shortcut icon" href="/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon/favicon.ico" type="image/x-icon" media="(prefers-color-scheme: light)"/><link rel="icon" href="/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon-dark/android-chrome-192x192.png" type="image/png" sizes="192x192" media="(prefers-color-scheme: dark)"/><link rel="icon" href="/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon-dark/favicon-16x16.png" type="image/png" sizes="16x16" media="(prefers-color-scheme: dark)"/><link rel="icon" href="/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon-dark/favicon-32x32.png" type="image/png" sizes="32x32" media="(prefers-color-scheme: dark)"/><link rel="shortcut icon" href="/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon-dark/favicon.ico" type="image/x-icon" media="(prefers-color-scheme: dark)"/><link rel="preconnect" href="https://fonts.googleapis.com"/><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/><link rel="preconnect" href="https://fonts.googleapis.com"/><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/><script type="text/javascript">!function(){var b="";
function a(p){if(p==null)return"/";p=""+p;if(""===p)return"/";return"/"===p.charAt(0)?p:"/"+p}
function u(p){if(p==null)return p;p=""+p;if(!p||p.charAt(p.length-1)==="/")return p.slice(0,-1);return p}
function i(p){if(p==null)return p;p=""+p;if(6<=p.length&&p.substring(p.length-6)==="/index")return p.substring(0,p.length-6);if("index"===p)return"";return p}
var p=(location.pathname||"").split("?")[0].split("#")[0]||"";
if(b)if(p===b)p="";else if(0===p.indexOf(b+"/"))p=p.substring(b.length);
p=a(p);p=u(p);p=i(p);p=""===p||"index"===p?"/":a(p);
document.documentElement.setAttribute("data-current-path",p);
}();</script><script type="text/javascript">!function(){
function read(){try{
var e=performance.getEntriesByType?performance.getEntriesByType("navigation"):[];
var st=(e[0]&&e[0].serverTiming)||[];
var g={};
for(var i=0;i<st.length;i++){var n=st[i].name,d=st[i].description;if(!d)continue;try{d=decodeURIComponent(d)}catch(x){}
if(n==="country")g.country=d;else if(n==="region")g.region=d;else if(n==="continent")g.continent=d;}
var w=window;w.mintlify=w.mintlify||{};w.mintlify.geo=g;
}catch(x){}}
read();document.addEventListener("DOMContentLoaded",read);
}();</script><script type="text/javascript">!function(){try{
var w=window;w.mintlify=w.mintlify||{};
var q=w.mintlify.__apiPlaygroundInputsQueue;
if(!Array.isArray(q)){q=[];w.mintlify.__apiPlaygroundInputsQueue=q;}
w.mintlify.api=w.mintlify.api||{};
w.mintlify.api.playground=w.mintlify.api.playground||{};
if(typeof w.mintlify.api.playground.setServerVariables!=="function"){
w.mintlify.api.playground.setServerVariables=function(v){q.push({type:"set",variables:v});};
}
if(typeof w.mintlify.api.playground.clearServerVariables!=="function"){
w.mintlify.api.playground.clearServerVariables=function(){q.push({type:"clear"});};
}
}catch(e){}}();</script><script type="text/javascript">(function(a,b){try{let c=document.getElementById("banner")?.innerText;if(c){for(let d=0;d<localStorage.length;d++){let e=localStorage.key(d);if(e?.endsWith(a)&&localStorage.getItem(e)===c)return void document.documentElement.setAttribute(b,"hidden")}document.documentElement.setAttribute(b,"visible");return}for(let c=0;c<localStorage.length;c++){let d=localStorage.key(c);if(d?.endsWith(a)&&localStorage.getItem(d))return void document.documentElement.setAttribute(b,"hidden")}document.documentElement.setAttribute(b,"visible")}catch(a){document.documentElement.setAttribute(b,"hidden")}})(
  "bannerDismissed",
  "data-banner-state",
)</script><script src="/mintlify-assets/_next/static/chunks/a6dad97d9634a72d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" noModule=""></script></head><body class="antialiased"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","isDarkMode","system",null,["dark","light","true","false","system"],{"true":"dark","false":"light","dark":"dark","light":"light"},true,false)</script><script>(function(){try{var f=null;var v=f||localStorage.getItem("isDarkMode");if(v==='true')v='dark';else if(v==='false')v='light';if(v!=='light'&&v!=='dark'&&v!=='system')v="system";document.documentElement.setAttribute("data-theme-preference",v)}catch(e){}})();</script><blockquote class="sr-only" data-agent-docs-index="true" aria-hidden="true"><h2>Documentation Index</h2><p>Fetch the complete documentation index at:<!-- --> <a href="/llms.txt" tabindex="-1">/llms.txt</a></p><p>Use this file to discover all available pages before exploring further.</p></blockquote><style>:root{--banner-height:0px!important}</style><script>(self.__next_s=self.__next_s||[]).push([0,{"children":"(function j(a,b,c,d,e){try{let f,g,h=[];try{h=window.location.pathname.split(\"/\").filter(a=\u003e\"\"!==a\u0026\u0026\"global\"!==a).slice(0,2)}catch{h=[]}let i=h.find(a=\u003ec.includes(a)),j=[];for(let c of(i?j.push(i):j.push(b),j.push(\"global\"),j)){if(!c)continue;let b=a[c];if(b?.content){f=b.content,g=c;break}}if(!f)return void document.documentElement.setAttribute(d,\"hidden\");let k=!0,l=0;for(;l\u003clocalStorage.length;){let a=localStorage.key(l);if(l++,!a?.endsWith(e))continue;let b=localStorage.getItem(a);if(b\u0026\u0026b===f){k=!1;break}g\u0026\u0026(a.startsWith(`lang:${g}_`)||!a.startsWith(\"lang:\"))\u0026\u0026(localStorage.removeItem(a),l--)}document.documentElement.setAttribute(d,k?\"visible\":\"hidden\")}catch(a){console.error(a),document.documentElement.setAttribute(d,\"hidden\")}})(\n  {},\n  \"en\",\n  [],\n  \"data-banner-state\",\n  \"bannerDismissed\",\n)","id":"_mintlify-banner-script"}])</script><link href="https://fonts.googleapis.com/css2?family=NotionInter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700;1,800&amp;display=swap" rel="stylesheet"/><link href="https://fonts.googleapis.com/css2?family=NotionInter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700;1,800&amp;display=swap" rel="stylesheet"/><style>:root {
  --font-family-headings-custom: "NotionInter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  
  --font-family-body-custom: "NotionInter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  
  
}
</style><style>:root {
    --primary: 0 0 0;
    --primary-light: 0 117 222;
    --primary-dark: 9 127 232;
    --tooltip-foreground: 255 255 255;
    --background-light: 255 255 255;
    --background-dark: 15 15 15;
    --gray-50: 242 242 242;
    --gray-100: 238 238 238;
    --gray-200: 222 222 222;
    --gray-300: 206 206 206;
    --gray-400: 158 158 158;
    --gray-500: 111 111 111;
    --gray-600: 79 79 79;
    --gray-700: 62 62 62;
    --gray-800: 37 37 37;
    --gray-900: 22 22 22;
    --gray-950: 10 10 10;
  }</style><div class="relative antialiased text-gray-500 dark:text-gray-400"><script>(self.__next_s=self.__next_s||[]).push([0,{"suppressHydrationWarning":true,"children":"(function(a){let b,c=(b=\"navbar-transition\",\"maple\"===a\u0026\u0026(b+=\"-maple\"),b),d=function(){let a=document.createElement(\"style\");return a.appendChild(document.createTextNode(\"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\")),document.head.appendChild(a),function(){window.getComputedStyle(document.body),setTimeout(()=\u003e{document.head.removeChild(a)},1)}}();(\"requestAnimationFrame\"in globalThis?requestAnimationFrame:setTimeout)(()=\u003e{let a;a=!1,a=window.scrollY\u003e50,document.getElementById(c)?.setAttribute(\"data-is-opaque\",`${!!a}`),d()})})(\"aspen\")","id":"_mintlify-navbar-transition-script"}])</script><script>(self.__next_s=self.__next_s||[]).push([0,{"suppressHydrationWarning":true,"children":"(function () {\n  var measure = function(){let a=document.querySelectorAll(\"[id='navbar'], [data-top-chrome]\"),b=0;a.forEach(a=\u003e{let c=a.getBoundingClientRect();c.height\u003e0\u0026\u0026(b=Math.max(b,c.bottom))});let c=0,d=document.getElementById(\"content-container\");if(d){let{overflowY:a}=getComputedStyle(d);(\"auto\"===a||\"scroll\"===a)\u0026\u0026(c=Math.max(0,d.getBoundingClientRect().top))}let e=Math.round(Math.max(0,b-c))+40;document.documentElement.style.setProperty(\"--scroll-mt\",`${e}px`)};\n  (function(a){let b=[],c=0,d=\"undefined\"==typeof ResizeObserver?null:new ResizeObserver(f);function e(){let c=Array.from(document.querySelectorAll(\"[id='navbar'], [data-top-chrome]\"));(c.length!==b.length||c.some((a,c)=\u003ea!==b[c]))\u0026\u0026d\u0026\u0026(d.disconnect(),c.forEach(a=\u003ed.observe(a))),b=c,a()}function f(){c||(c=requestAnimationFrame(()=\u003e{c=0,e()}))}new MutationObserver(f).observe(document.documentElement,{childList:!0,subtree:!0}),window.addEventListener(\"resize\",f),\"loading\"===document.readyState\u0026\u0026document.addEventListener(\"DOMContentLoaded\",e),e()})(measure);\n  (function(a){let b=window.location.hash.slice(1);if(!b)return;function c(){return\"smooth\"===getComputedStyle(document.documentElement).scrollBehavior}function d(c){let d=document.getElementById(b);return!!d\u0026\u0026(a(),d.scrollIntoView(c?{behavior:c}:void 0),!0)}if(\"complete\"===document.readyState)return void d();let e=new MutationObserver(()=\u003e{!c()\u0026\u0026d(\"instant\")\u0026\u0026f()});function f(){e.disconnect(),window.removeEventListener(\"load\",g)}function g(){let a=c();f(),a\u0026\u0026requestAnimationFrame(()=\u003e{d(),function(){let a=[\"wheel\",\"touchstart\",\"keydown\",\"pointerdown\"],c=0,e=window.scrollY,f=setInterval(()=\u003e{c+=1;let a=document.getElementById(b);if(!a||c\u003e=6)return g();let f=Math.abs(window.scrollY-e)\u003e1;if(e=window.scrollY,f)return;let h=parseFloat(getComputedStyle(a).scrollMarginTop)||0;Math.abs(a.getBoundingClientRect().top-h)\u003e4\u0026\u0026d()},350);function g(){clearInterval(f),a.forEach(a=\u003ewindow.removeEventListener(a,g))}a.forEach(a=\u003ewindow.addEventListener(a,g,{passive:!0}))}()})}window.addEventListener(\"load\",g),e.observe(document.documentElement,{childList:!0,subtree:!0}),!c()\u0026\u0026d(\"instant\")\u0026\u0026f()})(measure);\n})();","id":"_mintlify-scroll-margin-script"}])</script><a href="#content-area" class="sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-50 focus:p-2 focus:text-sm focus:bg-background-light dark:focus:bg-background-dark focus:rounded-md focus:outline-primary dark:focus:outline-primary-light">Skip to main content</a><script>(function i(a,b,c,d){try{if(window.matchMedia("(max-width: 1024px)").matches||!d){document.documentElement.style.setProperty(c,"0px"),document.documentElement.setAttribute("data-assistant-state","closed"),d||localStorage.setItem(a,"false");return}let e=localStorage.getItem(a);if(null===e){document.documentElement.style.setProperty(c,"0px"),document.documentElement.setAttribute("data-assistant-state","closed");return}let f=JSON.parse(e),g=localStorage.getItem(b),h=null!==g?JSON.parse(g):368;document.documentElement.style.setProperty(c,f?h+"px":"0px"),document.documentElement.setAttribute("data-assistant-state",f?"open":"closed")}catch(a){document.documentElement.style.setProperty(c,"0px"),document.documentElement.setAttribute("data-assistant-state","closed")}})(
    "chat-assistant-sheet-open",
    "chat-assistant-sheet-width",
    "--assistant-sheet-width",
    true
  )</script><div class="max-lg:contents lg:flex lg:w-full" data-docs-theme="aspen"><div class="max-lg:contents lg:flex-1 lg:min-w-0 lg:overflow-x-clip"><header id="navbar" class="z-30 fixed lg:sticky top-0 w-full peer is-not-custom peer is-not-center peer is-not-wide peer is-not-frame"><div class="z-10 absolute w-full h-full border-b border-gray-100 dark:border-gray-800"></div><div class="z-0 absolute inset-0 bg-background-light dark:bg-background-dark"></div><div class="z-10 mx-auto relative max-w-8xl px-0 lg:px-5"><div class="relative"><div class="flex items-center lg:px-4 h-14 min-w-0 mx-4 lg:mx-0"><div class="h-full relative flex-1 flex items-center gap-x-4 min-w-0"><div class="flex-1 flex items-center gap-x-4"><a class="select-none" style="-webkit-touch-callout:none" href="/"><span class="sr-only">Notion Docs<!-- --> home page</span><img class="nav-logo w-auto relative object-contain shrink-0 block dark:hidden h-6" src="https://mintcdn.com/notion-demo/5YdhSbldE14t5Rna/logo/light.svg?fit=max&amp;auto=format&amp;n=5YdhSbldE14t5Rna&amp;q=85&amp;s=249f5693ad929397409bf9b51d6d539d" alt="light logo"/><img class="nav-logo w-auto relative object-contain shrink-0 hidden dark:block h-6" src="https://mintcdn.com/notion-demo/5YdhSbldE14t5Rna/logo/dark.svg?fit=max&amp;auto=format&amp;n=5YdhSbldE14t5Rna&amp;q=85&amp;s=a8404879d171debac543bb6c1482c909" alt="dark logo"/></a><div class="hidden lg:flex items-center gap-x-2"></div></div><div class="relative hidden lg:flex items-center flex-1 z-20 gap-2.5"><button type="button" class="group/search flex pointer-events-auto w-full items-center text-sm leading-6 h-9 pl-3.5 pr-3 text-gray-500 dark:text-white/50 dark:brightness-[1.1] dark:hover:brightness-[1.25] ring-gray-400/30 hover:ring-gray-600/30 dark:ring-gray-600/30 dark:hover:ring-gray-500/30 justify-between truncate gap-2 max-w-sm bg-gray-950/[0.03] dark:bg-white/[0.03] hover:bg-gray-950/10 dark:hover:bg-white/10 rounded-full shadow-none border-none ring-0 dark:ring-0" id="search-bar-entry" aria-label="Open search"><div class="flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-4 min-w-4 flex-none text-gray-700 group-hover/search:text-gray-800 dark:text-gray-400 dark:group-hover/search:text-gray-200"><path d="M15.25 15.25L11.285 11.285" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M7.75 12.75C10.5114 12.75 12.75 10.5114 12.75 7.75C12.75 4.98858 10.5114 2.75 7.75 2.75C4.98858 2.75 2.75 4.98858 2.75 7.75C2.75 10.5114 4.98858 12.75 7.75 12.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg><div class="truncate min-w-0">Search...</div></div><span class="flex-none text-xs font-semibold">⌘<!-- -->K</span></button><button type="button" class="group/ai flex-none hidden lg:flex items-center justify-center gap-1.5 pl-3 pr-3.5 h-9 dark:brightness-[1.1] dark:hover:brightness-[1.25] ring-gray-400/30 hover:ring-gray-600/30 dark:ring-gray-600/30 dark:hover:ring-gray-500/30 max-w-sm bg-gray-950/[0.03] dark:bg-white/[0.03] hover:bg-gray-950/10 dark:hover:bg-white/10 rounded-full shadow-none border-none ring-0 dark:ring-0" id="assistant-entry" aria-label="Toggle assistant panel" data-base-ui-tooltip-trigger=""><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-4 shrink-0 text-gray-700 group-hover/ai:text-gray-800 dark:text-gray-400 dark:group-hover/ai:text-gray-200"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg><span class="text-sm text-gray-500 dark:text-white/50 whitespace-nowrap">Ask Assistant</span></button></div><div class="topbar-right-container hidden lg:flex flex-1 items-center gap-2 ml-auto justify-end"><div class="flex relative items-center justify-end space-x-4"><nav aria-label="Main" class="text-sm"><ul class="flex gap-2 items-center"><li class="navbar-link"><a href="https://www.notion.com/login" class="flex items-center whitespace-nowrap font-medium gap-2 text-gray-800 dark:text-gray-50 hover:text-gray-800 dark:hover:text-gray-50 bg-gray-950/[0.03] dark:bg-white/[0.03] hover:bg-gray-950/10 dark:hover:bg-white/10 rounded-xl px-[14px] py-2" target="_blank"><span class="min-w-0 truncate">Log in</span></a></li><li class="block lg:hidden"><a class="flex items-center whitespace-nowrap font-medium gap-2 text-gray-800 dark:text-gray-50 hover:text-gray-800 dark:hover:text-gray-50 bg-gray-950/[0.03] dark:bg-white/[0.03] hover:bg-gray-950/10 dark:hover:bg-white/10 rounded-xl px-[14px] py-2" href="https://www.notion.so/developers"><span class="min-w-0 truncate">Developer portal</span></a></li><li class="whitespace-nowrap hidden lg:flex" id="topbar-cta-button"><a target="_blank" class="group pl-3 pr-2 py-2 relative inline-flex items-center text-sm font-medium" href="https://www.notion.so/developers"><span class="absolute inset-0 bg-primary-dark rounded-xl group-hover:opacity-[0.9]"></span><div class="z-10 gap-1 flex items-center"><span class="text-white">Developer portal</span><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0 text-white/90"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></li></ul></nav></div><button type="button" tabindex="0" aria-haspopup="menu" id="theme-preference-menu-trigger" aria-label="Change theme preference" data-component-name="theme-preference-menu" data-component-part="theme-preference-menu-trigger" data-testid="theme-preference-menu-trigger" class="group disabled:pointer-events-none overflow-hidden gap-1 text-sm text-gray-950/50 dark:text-white/50 group-hover:text-gray-950/70 dark:group-hover:text-white/70 theme-preference-menu-trigger group p-2 flex items-center justify-center w-[30px] h-[30px] rounded-full bg-gray-800/[0.04] dark:bg-white/10"><span data-theme-preference-icon="system"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="size-4 text-gray-600 group-hover:text-gray-800 dark:text-gray-300 dark:group-hover:text-gray-100"><path d="M4.5 15.5L9 14.5L13.5 15.5" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.75V14.5" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M14.25 2.75H3.75C2.64543 2.75 1.75 3.64543 1.75 4.75V9.75C1.75 10.8546 2.64543 11.75 3.75 11.75H14.25C15.3546 11.75 16.25 10.8546 16.25 9.75V4.75C16.25 3.64543 15.3546 2.75 14.25 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></span><span data-theme-preference-icon="light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="size-4 text-gray-600 group-hover:text-gray-800 dark:text-gray-300 dark:group-hover:text-gray-100"><path d="M9 1.25V2.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M14.48 3.52002L13.773 4.22702" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M16.75 9H15.75" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M14.48 14.4799L13.773 13.7729" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 16.75V15.75" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M3.52 14.4799L4.227 13.7729" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M1.25 9H2.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M3.52 3.52002L4.227 4.22702" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 13.25C11.3472 13.25 13.25 11.3472 13.25 9C13.25 6.65279 11.3472 4.75 9 4.75C6.65279 4.75 4.75 6.65279 4.75 9C4.75 11.3472 6.65279 13.25 9 13.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></span><span data-theme-preference-icon="dark"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="size-4 text-gray-600 group-hover:text-gray-800 dark:text-gray-300 dark:group-hover:text-gray-100"><path d="M13 11.75C9.548 11.75 6.75 8.95201 6.75 5.50001C6.75 4.14801 7.183 2.90101 7.912 1.87801C4.548 2.50601 2 5.45301 2 9.00001C2 13.004 5.246 16.25 9.25 16.25C12.622 16.25 15.448 13.944 16.259 10.826C15.309 11.409 14.196 11.75 13 11.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></span></button></div><div class="flex lg:hidden items-center gap-3"><button type="button" class="text-gray-500 w-8 h-8 flex items-center justify-center hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300" id="search-bar-entry-mobile" aria-label="Open search"><span class="sr-only">Search...</span><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! h-4 w-4 bg-gray-500 dark:bg-gray-400 hover:bg-gray-600 dark:hover:bg-gray-300" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/solid/magnifying-glass.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/solid/magnifying-glass.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></button><button id="assistant-entry-mobile" aria-label="Toggle assistant panel"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-4.5 text-gray-500 dark:text-gray-400 hover:text-gray-600 dark:hover:text-gray-300"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><button type="button" aria-label="More actions" class="h-7 w-5 flex items-center justify-center relative after:content-[&#x27;&#x27;] after:absolute after:-inset-y-2 after:-left-1 after:-right-4"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 shrink-0 bg-gray-500 dark:bg-gray-400 hover:bg-gray-600 dark:hover:bg-gray-300" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/solid/ellipsis-vertical.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/solid/ellipsis-vertical.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></button></div></div></div><button type="button" class="flex items-center h-14 py-4 px-5 lg:hidden focus:outline-0 w-full text-left"><div class="text-gray-500 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300"><span class="sr-only">Navigation</span><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0"><path d="M2.25 9H15.75" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.25 3.75H15.75" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.25 14.25H15.75" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div><div class="ml-4 flex text-sm leading-6 whitespace-nowrap min-w-0 space-x-3 overflow-hidden"><div class="flex items-center space-x-3 shrink-0"><span>Get started</span><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 text-gray-400 shrink-0"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div><div class="font-semibold text-gray-900 truncate dark:text-gray-200 min-w-0 flex-1">Authorization</div></div></button></div><div class="hidden lg:flex px-4 h-10"><div class="nav-tabs h-full flex text-sm gap-x-6"><a class="link nav-tabs-item group relative h-full gap-2 flex items-center font-medium [text-shadow:-0.2px_0_0_currentColor,0.2px_0_0_currentColor] hover:text-primary dark:hover:text-primary-light text-gray-800 dark:text-gray-200" data-active="true" aria-current="location" href="/guides/get-started/overview">Guides<div class="absolute bottom-0 w-full left-0 bg-primary dark:bg-primary-light h-px"></div></a><a class="link nav-tabs-item group relative h-full gap-2 flex items-center font-medium hover:text-gray-800 dark:hover:text-gray-300 text-gray-800 dark:text-gray-200" href="/reference/intro">API Reference<div class="absolute bottom-0 w-full left-0 group-hover:bg-gray-200 dark:group-hover:bg-gray-700 h-px"></div></a><a class="link nav-tabs-item group relative h-full gap-2 flex items-center font-medium hover:text-gray-800 dark:hover:text-gray-300 text-gray-800 dark:text-gray-200" href="/cli/get-started/overview">CLI Reference<div class="absolute bottom-0 w-full left-0 group-hover:bg-gray-200 dark:group-hover:bg-gray-700 h-px"></div></a><a class="link nav-tabs-item group relative h-full gap-2 flex items-center font-medium hover:text-gray-800 dark:hover:text-gray-300 text-gray-800 dark:text-gray-200" href="/workers/get-started/overview">Workers<div class="absolute bottom-0 w-full left-0 group-hover:bg-gray-200 dark:group-hover:bg-gray-700 h-px"></div></a><a class="link nav-tabs-item group relative h-full gap-2 flex items-center font-medium hover:text-gray-800 dark:hover:text-gray-300 text-gray-800 dark:text-gray-200" href="/reference/admin/intro">Admin API<div class="absolute bottom-0 w-full left-0 group-hover:bg-gray-200 dark:group-hover:bg-gray-700 h-px"></div></a><a class="link nav-tabs-item group relative h-full gap-2 flex items-center font-medium hover:text-gray-800 dark:hover:text-gray-300 text-gray-800 dark:text-gray-200" href="/page/changelog">Changelog<div class="absolute bottom-0 w-full left-0 group-hover:bg-gray-200 dark:group-hover:bg-gray-700 h-px"></div></a><a class="link nav-tabs-item group relative h-full gap-2 flex items-center font-medium hover:text-gray-800 dark:hover:text-gray-300 text-gray-800 dark:text-gray-200" href="/page/examples">Examples<div class="absolute bottom-0 w-full left-0 group-hover:bg-gray-200 dark:group-hover:bg-gray-700 h-px"></div></a></div></div></div></header><div id="body-content" class="scroll-mt-(--scroll-mt) peer-[.is-custom]:max-w-none peer-[.is-not-custom]:max-w-8xl peer-[.is-not-custom]:lg:flex peer-[.is-not-custom]:mx-auto peer-[.is-not-custom]:px-0 peer-[.is-not-custom]:lg:px-5 peer-[.is-custom]:[&amp;&gt;:first-child]:hidden! peer-[.is-custom]:[&amp;&gt;:first-child]:sm:hidden! peer-[.is-custom]:[&amp;&gt;:first-child]:md:hidden! peer-[.is-custom]:[&amp;&gt;:first-child]:lg:hidden! peer-[.is-custom]:[&amp;&gt;:first-child]:xl:hidden!"><nav aria-label="Pages" id="sidebar-content" class="hidden sticky shrink-0 w-[18rem] lg:flex flex-col border-r border-gray-100 dark:border-white/10 transition-transform duration-100 top-(--mintlify-slot-header-height,6rem) h-[calc(100vh-var(--mintlify-slot-header-height,6rem))]"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" id="navigation-items" class="min-w-0 flex-1 min-h-0"><div role="presentation" data-id="base-ui-_R_7av5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] pr-5 pt-5 pb-4 base-ui-disable-scrollbar" style="overflow:scroll;mask-image:linear-gradient(to bottom, transparent 0, black min(var(--scroll-area-fade-size), var(--scroll-area-overflow-y-start, 0px)));-webkit-mask-image:linear-gradient(to bottom, transparent 0, black min(var(--scroll-area-fade-size), var(--scroll-area-overflow-y-start, 0px)));mask-composite:intersect;-webkit-mask-composite:source-in;mask-repeat:no-repeat" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-0! w-full"><div class="text-sm relative"><div class="pl-2"></div><ul class="list-none" aria-hidden="true"></ul><div><div class="sidebar-group-header flex items-center gap-2.5 pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200 text-xs"><h3 class="sidebar-title text-[length:inherit] font-[inherit] leading-[inherit]"><span>Get started</span></h3></div><ul class="sidebar-group space-y-px"><li id="/guides/get-started/overview" class="relative scroll-m-4 first:scroll-m-20" data-title="Overview"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/guides/get-started/overview"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Overview</span></div></div></a></li><li id="/guides/get-started/quick-start" class="relative scroll-m-4 first:scroll-m-20" data-title="Quickstart"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/guides/get-started/quick-start"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Quickstart</span></div></div></a></li><li id="/guides/get-started/personal-access-tokens" class="relative scroll-m-4 first:scroll-m-20" data-title="Personal access tokens"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/guides/get-started/personal-access-tokens"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Personal access tokens</span></div></div></a></li><li id="/guides/get-started/internal-connections" class="relative scroll-m-4 first:scroll-m-20" data-title="Internal connections"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/guides/get-started/internal-connections"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Internal connections</span></div></div></a></li><li id="/guides/get-started/public-connections" class="relative scroll-m-4 first:scroll-m-20" data-title="Public connections"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/guides/get-started/public-connections"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Public connections</span></div></div></a></li><li id="/guides/get-started/authorization" class="relative scroll-m-4 first:scroll-m-20" data-title="Authorization" data-active="true" data-active-nav-item="true"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] bg-primary/10 text-primary [text-shadow:-0.2px_0_0_currentColor,0.2px_0_0_currentColor] dark:text-primary-light dark:bg-primary-light/10" style="padding-left:1rem" aria-current="page" href="/guides/get-started/authorization"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Authorization</span></div></div></a></li><li id="/guides/get-started/handling-api-keys" class="relative scroll-m-4 first:scroll-m-20" data-title="API token security"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/guides/get-started/handling-api-keys"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">API token security</span></div></div></a></li><li id="/guides/get-started/preparing-for-users" class="relative scroll-m-4 first:scroll-m-20" data-title="Preparing for users"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/guides/get-started/preparing-for-users"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Preparing for users</span></div></div></a></li><li id="/guides/get-started/marketplace-listing" class="relative scroll-m-4 first:scroll-m-20" data-title="List on the Marketplace"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/guides/get-started/marketplace-listing"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">List on the Marketplace</span></div></div></a></li></ul></div><div class="px-1 py-3"><div class="sidebar-nav-group-divider h-px w-full bg-gray-100 dark:bg-white/10"></div></div><div class="my-2"><div class="sidebar-group-header flex items-center gap-2.5 pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200 text-xs"><h3 class="sidebar-title text-[length:inherit] font-[inherit] leading-[inherit]"><span>Agent APIs</span></h3></div><ul class="sidebar-group space-y-px"><li data-title="Notion MCP" data-group-tag="" class="space-y-px"><button class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" aria-expanded="false"><div class="flex-1 flex items-center gap-2 justify-start"><span>Notion MCP</span></div><div class="h-[1lh] flex items-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 w-2 h-[1lh] -mr-0.5"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></button></li></ul></div><div class="px-1 py-3"><div class="sidebar-nav-group-divider h-px w-full bg-gray-100 dark:bg-white/10"></div></div><div class="my-2"><div class="sidebar-group-header flex items-center gap-2.5 pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200 text-xs"><h3 class="sidebar-title text-[length:inherit] font-[inherit] leading-[inherit]"><span>API versions</span></h3></div><ul class="sidebar-group space-y-px"><li data-title="Upgrading to 2026-03-11" data-group-tag="" class="space-y-px"><button class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" aria-expanded="false"><div class="flex-1 flex items-center gap-2 justify-start"><span>Upgrading to 2026-03-11</span></div><div class="h-[1lh] flex items-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 w-2 h-[1lh] -mr-0.5"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></button></li><li data-title="Upgrading to 2025-09-03" data-group-tag="" class="space-y-px"><button class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" aria-expanded="false"><div class="flex-1 flex items-center gap-2 justify-start"><span>Upgrading to 2025-09-03</span></div><div class="h-[1lh] flex items-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 w-2 h-[1lh] -mr-0.5"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></button></li></ul></div><div class="px-1 py-3"><div class="sidebar-nav-group-divider h-px w-full bg-gray-100 dark:bg-white/10"></div></div><div class="my-2"><div class="sidebar-group-header flex items-center gap-2.5 pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200 text-xs"><h3 class="sidebar-title text-[length:inherit] font-[inherit] leading-[inherit]"><span>Data APIs</span></h3></div><ul class="sidebar-group space-y-px"><li id="/guides/data-apis/working-with-page-content" class="relative scroll-m-4 first:scroll-m-20" data-title="Working with page content"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/guides/data-apis/working-with-page-content"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Working with page content</span></div></div></a></li><li data-title="Working with databases" data-group-tag="" class="space-y-px"><button class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" aria-expanded="false"><div class="flex-1 flex items-center gap-2 justify-start"><span>Working with databases</span></div><div class="h-[1lh] flex items-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 w-2 h-[1lh] -mr-0.5"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></button></li><li id="/guides/data-apis/working-with-views" class="relative scroll-m-4 first:scroll-m-20" data-title="Working with views"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/guides/data-apis/working-with-views"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Working with views</span></div></div></a></li><li id="/guides/data-apis/working-with-comments" class="relative scroll-m-4 first:scroll-m-20" data-title="Working with comments"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/guides/data-apis/working-with-comments"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Working with comments</span></div></div></a></li><li data-title="Working with markdown content" data-group-tag="" class="space-y-px"><button class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" aria-expanded="false"><div class="flex-1 flex items-center gap-2 justify-start"><span>Working with markdown content</span></div><div class="h-[1lh] flex items-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 w-2 h-[1lh] -mr-0.5"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></button></li><li data-title="Working with files and media" data-group-tag="" class="space-y-px"><button class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" aria-expanded="false"><div class="flex-1 flex items-center gap-2 justify-start"><span>Working with files and media</span></div><div class="h-[1lh] flex items-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 w-2 h-[1lh] -mr-0.5"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></button></li></ul></div><div class="px-1 py-3"><div class="sidebar-nav-group-divider h-px w-full bg-gray-100 dark:bg-white/10"></div></div><div class="my-2"><div class="sidebar-group-header flex items-center gap-2.5 pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200 text-xs"><h3 class="sidebar-title text-[length:inherit] font-[inherit] leading-[inherit]"><span>Resources</span></h3></div><ul class="sidebar-group space-y-px"><li id="https://developers.notion.com/page/examples" class="relative scroll-m-4 first:scroll-m-20" data-title="Example code"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" target="_blank" href="https://developers.notion.com/page/examples"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Example code</span></div><div class="h-[1lh] flex items-center flex-1 justify-end"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-2.5 text-gray-400 overflow-visible group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0"><path d="M14.25 3.75L3.75525 14.2446" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M4.71301 3.75H14.2499V13.2869" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></div></a></li><li id="https://www.postman.com/notionhq/notion-s-api-workspace/collection/52041987-03f70d8f-b6e5-4306-805c-f95f7cdf05b9" class="relative scroll-m-4 first:scroll-m-20" data-title="Postman workspace"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" target="_blank" href="https://www.postman.com/notionhq/notion-s-api-workspace/collection/52041987-03f70d8f-b6e5-4306-805c-f95f7cdf05b9"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Postman workspace</span></div><div class="h-[1lh] flex items-center flex-1 justify-end"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-2.5 text-gray-400 overflow-visible group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0"><path d="M14.25 3.75L3.75525 14.2446" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M4.71301 3.75H14.2499V13.2869" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></div></a></li><li id="/guides/resources/historical-changelog" class="relative scroll-m-4 first:scroll-m-20" data-title="Historical changelog"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/guides/resources/historical-changelog"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Historical changelog</span></div></div></a></li></ul></div><div class="px-1 py-3"><div class="sidebar-nav-group-divider h-px w-full bg-gray-100 dark:bg-white/10"></div></div><div class="my-2"><div class="sidebar-group-header flex items-center gap-2.5 pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200 text-xs"><h3 class="sidebar-title text-[length:inherit] font-[inherit] leading-[inherit]"><span>Compliance</span></h3></div><ul class="sidebar-group space-y-px"><li id="/compliance/overview" class="relative scroll-m-4 first:scroll-m-20" data-title="Overview"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/compliance/overview"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Overview</span></div></div></a></li><li data-title="Event reference" data-group-tag="" class="space-y-px"><button class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" aria-expanded="false"><div class="flex-1 flex items-center gap-2 justify-start"><span>Event reference</span></div><div class="h-[1lh] flex items-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 w-2 h-[1lh] -mr-0.5"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></button></li></ul></div><div class="px-1 py-3"><div class="sidebar-nav-group-divider h-px w-full bg-gray-100 dark:bg-white/10"></div></div><div class="my-2"><div class="sidebar-group-header flex items-center gap-2.5 pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200 text-xs"><h3 class="sidebar-title text-[length:inherit] font-[inherit] leading-[inherit]"><span>Link previews</span></h3></div><ul class="sidebar-group space-y-px"><li id="/guides/link-previews/introduction" class="relative scroll-m-4 first:scroll-m-20" data-title="Introduction"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/guides/link-previews/introduction"><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Introduction</span></div></div></a></li></ul></div><script>(function () {
  try {
    if (window.__mintlifyInitialSidebarScrollDone) return;
    window.__mintlifyInitialSidebarScrollDone = true;

    var path = (window.location.pathname || '/').split('#')[0].split('?')[0];
    if (path.endsWith('/index')) path = path.slice(0, -6);
    else if (path === 'index') path = '';

    var candidates = [];
    if (path) candidates.push(path);
    if (path.startsWith('/')) candidates.push(path.slice(1));
    else candidates.push('/' + path);

    var item = null;
    for (var i = 0; i < candidates.length && !item; i++) {
      var matches = document.querySelectorAll('[id="' + candidates[i].replace(/"/g, '\\"') + '"]');
      for (var j = 0; j < matches.length; j++) {
        if (matches[j].closest('#sidebar, #sidebar-content')) {
          item = matches[j];
          break;
        }
      }
    }
    if (!item) return;

    var parent = item.parentElement;
    while (parent) {
      var style = getComputedStyle(parent);
      if (style.overflowY === 'auto' || style.overflowY === 'scroll') break;
      parent = parent.parentElement;
    }
    if (!parent) return;

    var parentRect = parent.getBoundingClientRect();
    var itemRect = item.getBoundingClientRect();
    if (itemRect.top >= parentRect.top && itemRect.bottom <= parentRect.bottom) return;

    var itemTopRelative = itemRect.top - parentRect.top + parent.scrollTop;
    parent.scrollTop = itemTopRelative - parentRect.height / 2 + itemRect.height / 2;
  } catch (e) {}
})();</script></div></div></div></div></nav><script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://developers.notion.com/#organization","name":"Notion Docs","url":"https://developers.notion.com","logo":{"@type":"ImageObject","url":"https://mintcdn.com/notion-demo/5YdhSbldE14t5Rna/logo/light.svg?fit=max&auto=format&n=5YdhSbldE14t5Rna&q=85&s=249f5693ad929397409bf9b51d6d539d"}},{"@type":"WebSite","@id":"https://developers.notion.com#website","name":"Notion Docs","url":"https://developers.notion.com","publisher":{"@id":"https://developers.notion.com/#organization"}},{"@type":"WebPage","@id":"https://developers.notion.com/guides/get-started/authorization#webpage","url":"https://developers.notion.com/guides/get-started/authorization","name":"Authorization","description":"This guide describes the authorization flows for Notion connections and personal access tokens.","dateModified":"2026-08-04T23:01:38.861Z","isPartOf":{"@id":"https://developers.notion.com#website"},"breadcrumb":{"@id":"https://developers.notion.com/guides/get-started/authorization#breadcrumb"}},{"@type":"BreadcrumbList","@id":"https://developers.notion.com/guides/get-started/authorization#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Get started","item":"https://developers.notion.com/guides/get-started/overview"},{"@type":"ListItem","position":2,"name":"Authorization","item":"https://developers.notion.com/guides/get-started/authorization"}]},{"@type":["Article","TechArticle"],"@id":"https://developers.notion.com/guides/get-started/authorization#article","headline":"Authorization","name":"Authorization","description":"This guide describes the authorization flows for Notion connections and personal access tokens.","url":"https://developers.notion.com/guides/get-started/authorization","mainEntityOfPage":{"@id":"https://developers.notion.com/guides/get-started/authorization#webpage"},"image":"https://developers.notion.com/images/og-image.png","dateModified":"2026-08-04T23:01:38.861Z","publisher":{"@id":"https://developers.notion.com/#organization"},"isPartOf":{"@id":"https://developers.notion.com#website"}}]}</script><script>document.documentElement.setAttribute('data-page-mode', "none");</script><span class="fixed inset-0 bg-background-light dark:bg-background-dark -z-10 pointer-events-none" id="background-color"></span><span class="block absolute dark:hidden inset-0 overflow-hidden pointer-events-none"></span><span class="hidden absolute dark:block inset-0 overflow-hidden pointer-events-none"></span><style data-custom-css-index="0" data-custom-css-path="style.css">@font-face {
	font-family: "NotionInter";
	font-weight: 400;
	font-style: normal;
	font-display: optional;
	src: url("/fonts/NotionInter-Regular.woff2") format("woff2");
}
@font-face {
	font-family: "NotionInter";
	font-weight: 500;
	font-style: normal;
	font-display: optional;
	src: url("/fonts/NotionInter-Medium.woff2") format("woff2");
}
@font-face {
	font-family: "NotionInter";
	font-weight: 600;
	font-style: normal;
	font-display: optional;
	src: url("/fonts/NotionInter-SemiBold.woff2") format("woff2");
}
@font-face {
	font-family: "NotionInter";
	font-weight: 700;
	font-style: normal;
	font-display: optional;
	src: url("/fonts/NotionInter-Bold.woff2") format("woff2");
}
@font-face {
	font-family: "NotionInter";
	font-weight: 400;
	font-style: italic;
	font-display: optional;
	src: url("/fonts/NotionInter-Italic.woff2") format("woff2");
}
@font-face {
	font-family: "NotionInter";
	font-weight: 500;
	font-style: italic;
	font-display: optional;
	src: url("/fonts/NotionInter-MediumItalic.woff2") format("woff2");
}
@font-face {
	font-family: "NotionInter";
	font-weight: 600;
	font-style: italic;
	font-display: optional;
	src: url("/fonts/NotionInter-SemiBoldItalic.woff2") format("woff2");
}
@font-face {
	font-family: "NotionInter";
	font-weight: 700;
	font-style: italic;
	font-display: optional;
	src: url("/fonts/NotionInter-BoldItalic.woff2") format("woff2");
}

:root {
	--font-notion-stack:
		"NotionInter", "Inter", -apple-system, "system-ui", "Segoe UI", Helvetica,
		Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

html,
body,
button,
input,
select,
textarea,
h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-notion-stack);
}

/* Top-align Card icons with the title row instead of centering them between
   the title and the description. */
.card > .flex.items-center:has([data-component-part="card-icon"]) {
	align-items: flex-start;
}

/* Make the Card description a step smaller than the title. */
[data-component-part="card-content"] {
	font-size: 0.875rem;
	line-height: 1.45;
}

/* Match the marketing site nav buttons: "Log in" ghost (no background, subtle
   hover only) and the topbar CTA pill with tighter corners. Hover uses NDS
   state.hover tokens (#37352f0a light / rgba(255,255,255,0.055) dark) so the
   warm-brown tint matches the rest of the docs and app.notion.com. */
.navbar-link > a {
	background-color: transparent !important;
}
.navbar-link > a:hover {
	background-color: #37352f0a !important;
}
html.dark .navbar-link > a:hover {
	background-color: rgba(255, 255, 255, 0.055) !important;
}
.bg-primary-dark.rounded-xl {
	border-radius: 8px !important;
}

/* Top search trigger: Mintlify defaults to Tailwind cool gray
   (bg-gray-950/[0.03], hover:bg-gray-950/10) which reads blue-tinted next to
   the rest of the Notion UI. Swap to NDS state tokens so the surface picks up
   the warm-brown tint, and recolor the placeholder text + magnifying-glass
   icon to match the gray scale used elsewhere in the docs. */
#search-bar-entry {
	background-color: #37352f0a !important;
	color: #7d7a75 !important;
}
#search-bar-entry:hover {
	background-color: #37352f1a !important;
}
#search-bar-entry svg {
	color: #7d7a75 !important;
}
#search-bar-entry:hover svg {
	color: #37352f !important;
}
html.dark #search-bar-entry {
	background-color: rgba(255, 255, 255, 0.055) !important;
	color: rgba(255, 255, 255, 0.5) !important;
}
html.dark #search-bar-entry:hover {
	background-color: rgba(255, 255, 255, 0.129) !important;
}
html.dark #search-bar-entry svg {
	color: rgba(255, 255, 255, 0.5) !important;
}
html.dark #search-bar-entry:hover svg {
	color: #ffffff !important;
}

/* Mobile-only search trigger (icon-only button shown below the lg breakpoint).
   The icon is rendered as a CSS mask whose color comes from the element's
   background, so we set both color and background-color to the same value. */
#search-bar-entry-mobile,
#search-bar-entry-mobile svg {
	color: #7d7a75 !important;
	background-color: #7d7a75 !important;
}
#search-bar-entry-mobile:hover,
#search-bar-entry-mobile:hover svg {
	color: #37352f !important;
	background-color: #37352f !important;
}
html.dark #search-bar-entry-mobile,
html.dark #search-bar-entry-mobile svg {
	color: rgba(255, 255, 255, 0.5) !important;
	background-color: rgba(255, 255, 255, 0.5) !important;
}
html.dark #search-bar-entry-mobile:hover,
html.dark #search-bar-entry-mobile:hover svg {
	color: #ffffff !important;
	background-color: #ffffff !important;
}

/* Theme toggle (sun/moon button next to the topbar CTA): Mintlify defaults to
   bg-gray-800/[0.04] which is cool gray. Add a hover state and warm both
   resting + hover to NDS state tokens for parity with the rest of the chrome. */
button[data-component-name="theme-toggle"] {
	background-color: #37352f0a !important;
}
button[data-component-name="theme-toggle"]:hover {
	background-color: #37352f1a !important;
}
html.dark button[data-component-name="theme-toggle"] {
	background-color: rgba(255, 255, 255, 0.055) !important;
}
html.dark button[data-component-name="theme-toggle"]:hover {
	background-color: rgba(255, 255, 255, 0.129) !important;
}
button[data-component-name="theme-toggle"] svg {
	color: #7d7a75 !important;
}
button[data-component-name="theme-toggle"]:hover svg {
	color: #37352f !important;
}
html.dark button[data-component-name="theme-toggle"] svg {
	color: rgba(255, 255, 255, 0.5) !important;
}
html.dark button[data-component-name="theme-toggle"]:hover svg {
	color: #ffffff !important;
}

/* Navbar bottom border: Mintlify uses border-gray-100 (cool) / border-gray-800
   in dark. Swap to NDS gray border tokens (warm-brown) for parity with the
   sidebar border and content dividers. */
#navbar [class*="border-gray-100"] {
	border-color: #e6e5e3 !important;
}
html.dark #navbar [class*="border-gray-800"] {
	border-color: rgba(255, 255, 255, 0.094) !important;
}

/* Top tab hover underline (API Reference / Changelog / Examples). Mintlify
   uses bg-gray-200 / bg-gray-700 — cool grays. Match the NDS border token in
   light mode and the same translucent-white the sidebar uses in dark. */
.nav-tabs-item div[class*="bg-gray-200"] {
	background-color: #e6e5e3 !important;
}
html.dark .nav-tabs-item div[class*="bg-gray-700"] {
	background-color: rgba(255, 255, 255, 0.18) !important;
}

/* Sidebar right edge + within-sidebar group dividers. Same swap from cool
   border-gray-100 to NDS warm border-primary. In dark mode the sidebar uses
   border-white/10, so target that as well. */
#sidebar-content[class*="border-gray-100"] {
	border-color: #e6e5e3 !important;
}
html.dark #sidebar-content[class*="border-white"] {
	border-color: rgba(255, 255, 255, 0.094) !important;
}
.sidebar-nav-group-divider {
	background-color: #e6e5e3 !important;
}
html.dark .sidebar-nav-group-divider {
	background-color: rgba(255, 255, 255, 0.094) !important;
}

/* Sidebar leaf text colors. Mintlify defaults to text-gray-700 (cool) with a
   text-gray-900 hover. Snap both to NDS text tokens (warm). The dark-mode
   side is already handled further down via the prose-invert + sidebar-group
   overrides; this block targets light mode. */
:is(a, button)[class*="outline-offset"][class*="text-gray-700"] {
	color: #37352f !important;
}
:is(a, button)[class*="outline-offset"][class*="hover:text-gray-900"]:hover {
	color: #37352f !important;
}

/* Sidebar collapse chevron next to expandable groups. Defaults to text-gray-400
   with a hover bump to text-gray-600 — both cool. Use NDS text tertiary /
   secondary so the chevron matches the surrounding row. */
:is(a, button)[class*="outline-offset"]
	svg[class*="text-gray-400"][class*="group-hover:text-gray-600"] {
	color: #ada9a3 !important;
}
:is(a, button)[class*="outline-offset"]:hover
	svg[class*="text-gray-400"][class*="group-hover:text-gray-600"] {
	color: #7d7a75 !important;
}

/* Card chrome (used on the home page grid of API areas):
     - border-gray-950/10 → NDS border primary (warm)
     - title text-gray-800 → NDS text primary
     - content text-gray-600 → NDS text secondary
     - arrow text-gray-400/500 → NDS text tertiary
*/
.card[class*="border-gray-950"] {
	border-color: #e6e5e3 !important;
}
html.dark .card[class*="border-white"] {
	border-color: rgba(255, 255, 255, 0.094) !important;
}
[data-component-part="card-title"] {
	color: #37352f !important;
}
html.dark [data-component-part="card-title"] {
	color: #ffffff !important;
}
[data-component-part="card-content"] {
	color: #7d7a75 !important;
}
html.dark [data-component-part="card-content"] {
	color: #ada9a3 !important;
}
#card-link-arrow-icon {
	color: #ada9a3 !important;
}
html.dark #card-link-arrow-icon {
	color: #7d7a75 !important;
}

/* Tighten sidebar nav item corners — Mintlify defaults to rounded-xl (12px),
   which reads too soft at this size. Covers both leaf links (<a>) and
   collapsible group rows (<button>). */
:is(a, button)[class*="outline-offset"][class*="rounded-xl"] {
	border-radius: 6px !important;
}

/* Mintlify simulates bold on the active sidebar item with a text-shadow
   trick. Drop it and use the real 600 cut from NotionInter. */
a[class*="text-shadow"] {
	text-shadow: none !important;
	font-weight: 600 !important;
}

/* Disable automatic hyphenation in sidebar nav labels. Mintlify lets the
   browser hyphenate long labels, so in the narrow sidebar entries like
   "Personal access tokens" break mid-word into "to-kens". Turning hyphens
   off makes each word wrap atomically at whitespace instead. */
.sidebar-group :is(a, button, span) {
	hyphens: none !important;
}

/* Dark-mode nav accents: keep them neutral (white) instead of inheriting
   the primary-light blue. Mirrors the black/gray accents in light mode so
   tabs / sidebar / TOC stay visually consistent across themes. Content
   links and CTA buttons keep their blue. */

/* Sidebar leaf links and collapsible group rows */
html.dark :is(a, button)[class*="outline-offset"][class*="text-primary-light"] {
	color: #ffffff !important;
}
html.dark :is(a, button)[class*="outline-offset"][class*="bg-primary-light"] {
	background-color: rgba(255, 255, 255, 0.129) !important;
}

/* Align sidebar item hover + active backgrounds with NDS state tokens so the
   docs sidebar matches app.notion.com. Mintlify defaults:
     - active: bg-primary/10        → rgba(0, 0, 0, 0.10), cool
     - hover:  hover:bg-gray-600/5  → Tailwind cool gray
   NDS values (from src/shared-styles/colors/tokens/...):
     - state.pressed (light) = #37352f1a   (warm-brown, 10% alpha)
     - state.hover   (light) = #37352f0a   (warm-brown, 4% alpha)
     - state.pressed (dark)  = rgba(255, 255, 255, 0.129)
     - state.hover   (dark)  = rgba(255, 255, 255, 0.055) */
:is(a, button)[class*="outline-offset"][class*="bg-primary/10"] {
	background-color: #37352f1a !important;
}
:is(a, button)[class*="outline-offset"][class*="hover:bg-gray-600"]:hover {
	background-color: #37352f0a !important;
}
html.dark
	:is(a, button)[class*="outline-offset"][class*="hover:bg-gray-200"]:hover {
	background-color: rgba(255, 255, 255, 0.055) !important;
}

/* TOC active item — H2-level (border + text on the same <a>) */
html.dark a[class*="border-primary-light"][class*="text-primary-light"] {
	color: #ffffff !important;
	border-color: #ffffff !important;
}

/* TOC active item — H3-level sub-item (border on .toc-item parent, text on
   the inner <a>) */
html.dark .toc-item[class*="border-primary"] {
	border-color: #ffffff !important;
}
html.dark .toc-item a[class*="text-primary-light"] {
	color: #ffffff !important;
}

/* Top tab active state — text on <a>, underline on a child <div> */
html.dark a.nav-tabs-item[class*="text-primary"] {
	color: #ffffff !important;
}
html.dark a.nav-tabs-item div[class*="bg-primary-light"] {
	background-color: #ffffff !important;
}

/* Page eyebrow defaults to the primary color (black in light, blue in dark).
   Use a neutral mid-gray instead so it reads as a quiet supertitle. */
.eyebrow {
	color: #78736f !important;
}
html.dark .eyebrow {
	color: #a3a39e !important;
}

/* Hide the left sidebar on long-form one-page tabs (Changelog, Examples).
   The right-hand "On this page" TOC is preserved so readers can still jump
   around. Mintlify's SPA updates html[data-current-path] on navigation, so
   this activates the moment the route changes — no full reload needed.
   Add more paths to the :is() list to opt additional pages into this
   "no-sidebar, full-bleed" layout. */
html:is(
	[data-current-path="/page/changelog"],
	[data-current-path="/page/examples"]
)
#sidebar-content {
	display: none !important;
}

/* With the sidebar gone, expand the content out to the left so its first
   column starts at the page edge. Mintlify's #content-container is the
   culprit: it has `mx-auto max-w-6xl lg:pl-[5.5rem]`, which centers a
   72rem-wide column AND adds 88px of internal left padding on top — leaving
   ~110px of empty space on the left even after the sidebar is hidden. Zero
   out the left-side mx-auto and the max-w cap; the right side keeps its
   breathing room for the TOC, and the original `lg:pl-[5.5rem]` stays put
   so the content still has a comfortable left gutter. */
html:is(
	[data-current-path="/page/changelog"],
	[data-current-path="/page/examples"]
)
#content-container {
	max-width: none !important;
	margin-left: 0 !important;
}

/* The inner #content-area also has `mx-auto`, which would re-center it
   inside the now-full-width container. Kill the auto margins so its existing
   `grow` (flex-grow: 1) actually claims the freed space. */
html:is(
	[data-current-path="/page/changelog"],
	[data-current-path="/page/examples"]
)
#content-area {
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Render <Update> bodies on the changelog with `prose`-equivalent sizing
   instead of Mintlify's hardcoded `prose-sm` (14px). The class is baked
   into the component and can't be changed from MDX, so we bump the
   container font-size from 0.875rem → 1rem. prose-sm uses em-relative
   spacing for children, so they scale up proportionally — no per-element
   overrides needed. */
html[data-current-path="/page/changelog"]
[data-component-part="update-content"] {
	font-size: 1rem;
}

/* Sidebar group titles ("Get started", "Data APIs", etc.) render as
   <h5 id="sidebar-title"> with Mintlify's default near-black color. Push
   them to the same neutral gray as the page eyebrow so they read as quiet
   section labels above the nav rows, not full-strength body text. */
h5#sidebar-title {
	color: #78736f !important;
}
html.dark h5#sidebar-title {
	color: #a3a39e !important;
}

/* Mintlify's dark-mode neutrals read too dim against the near-black background
   (h1 ~#dedede, body/sidebar/TOC ~#9e9e9e). Bump page title to pure white and
   shift dim grays up to ~#c7c7c7 so the contrast feels closer to light mode.
   Body copy is rendered through the Tailwind Typography plugin's prose-invert
   variant — overriding its CSS vars catches paragraphs, list items, spans,
   and table cells in one shot. */
html.dark [class*="prose-invert"] {
	color: #c7c7c7 !important;
	--tw-prose-invert-body: #c7c7c7 !important;
	--tw-prose-invert-bullets: #c7c7c7 !important;
	--tw-prose-invert-counters: #c7c7c7 !important;
}
html.dark h1#page-title {
	color: #ffffff !important;
}
html.dark #header p {
	color: #c7c7c7 !important;
}
html.dark #table-of-contents-content a {
	color: #c7c7c7 !important;
}
html.dark .sidebar-group a:not([class*="text-shadow"]),
html.dark .sidebar-group button {
	color: #c7c7c7 !important;
}

/* Notion-style content links: inherit body text color with a soft gray
   underline at rest, full-strength text-color underline on hover. Scoped
   to the article body via #content so we don't disturb sidebar nav,
   banner, TOC, or card links. */
#content a.link {
	color: inherit !important;
	text-decoration: underline !important;
	text-decoration-color: rgba(55, 53, 47, 0.25) !important;
	text-underline-offset: 3px !important;
	text-decoration-thickness: 1px !important;
	border-bottom: 0 !important;
	font-weight: inherit !important;
}
#content a.link:hover {
	color: inherit !important;
	text-decoration-color: currentColor !important;
}
html.dark #content a.link {
	text-decoration-color: rgba(255, 255, 255, 0.25) !important;
}
html.dark #content a.link:hover {
	text-decoration-color: currentColor !important;
}

/* Notion-aligned callout colors. Mintlify defaults to Tailwind palette
   (bg-blue-50, etc); these overrides snap the surface, border, and icon
   to NDS values. */
.callout[class*="bg-blue"] {
	background-color: #e5f2fc !important;
	border-color: #b6d4f3 !important;
}
.callout[class*="bg-blue"] [data-component-part="callout-icon"],
.callout[class*="bg-blue"] [data-component-part="callout-icon"] svg {
	color: #2783de !important;
}
.callout[class*="bg-blue"] [data-component-part="callout-content"] {
	color: #355f8b !important;
}
.callout[class*="bg-green"] {
	background-color: #e8f1ec !important;
	border-color: #bed9c9 !important;
}
.callout[class*="bg-green"] [data-component-part="callout-icon"],
.callout[class*="bg-green"] [data-component-part="callout-icon"] svg {
	color: #46a171 !important;
}
.callout[class*="bg-green"] [data-component-part="callout-content"] {
	color: #37674c !important;
}
.callout[class*="bg-yellow"] {
	background-color: #f9f3dc !important;
	border-color: #e8d497 !important;
}
.callout[class*="bg-yellow"] [data-component-part="callout-icon"],
.callout[class*="bg-yellow"] [data-component-part="callout-icon"] svg {
	color: #d8a32f !important;
}
.callout[class*="bg-yellow"] [data-component-part="callout-content"] {
	color: #836426 !important;
}
.callout[class*="bg-red"] {
	background-color: #fce9e7 !important;
	border-color: #f0c5be !important;
}
.callout[class*="bg-red"] [data-component-part="callout-icon"],
.callout[class*="bg-red"] [data-component-part="callout-icon"] svg {
	color: #e56458 !important;
}
.callout[class*="bg-red"] [data-component-part="callout-content"] {
	color: #924943 !important;
}
.callout[class*="bg-neutral"],
.callout[class*="bg-gray"] {
	background-color: #f0efed !important;
	border-color: #e6e5e3 !important;
}
.callout[class*="bg-neutral"] [data-component-part="callout-icon"],
.callout[class*="bg-gray"] [data-component-part="callout-icon"],
.callout[class*="bg-neutral"] [data-component-part="callout-icon"] svg,
.callout[class*="bg-gray"] [data-component-part="callout-icon"] svg {
	color: #5f5e59 !important;
}
.callout[class*="bg-neutral"] [data-component-part="callout-content"],
.callout[class*="bg-gray"] [data-component-part="callout-content"] {
	color: #494846 !important;
}

/* Dark-mode callout surfaces use a tinted overlay derived from the same
   accent so the callout still reads as a flavored surface. */
html.dark .callout[class*="bg-blue"] {
	background-color: rgba(39, 131, 222, 0.12) !important;
	border-color: rgba(39, 131, 222, 0.3) !important;
}
html.dark .callout[class*="bg-green"] {
	background-color: rgba(70, 161, 113, 0.12) !important;
	border-color: rgba(70, 161, 113, 0.3) !important;
}
html.dark .callout[class*="bg-yellow"] {
	background-color: rgba(216, 163, 47, 0.12) !important;
	border-color: rgba(216, 163, 47, 0.3) !important;
}
html.dark .callout[class*="bg-red"] {
	background-color: rgba(229, 100, 88, 0.12) !important;
	border-color: rgba(229, 100, 88, 0.3) !important;
}
html.dark .callout[class*="bg-neutral"],
html.dark .callout[class*="bg-gray"] {
	background-color: rgba(255, 255, 255, 0.05) !important;
	border-color: rgba(255, 255, 255, 0.12) !important;
}
html.dark .callout[class*="bg-blue"] [data-component-part="callout-content"] {
	color: #9dc0ea !important;
}
html.dark .callout[class*="bg-green"] [data-component-part="callout-content"] {
	color: #a6c7b4 !important;
}
html.dark .callout[class*="bg-yellow"] [data-component-part="callout-content"] {
	color: #e2ca88 !important;
}
html.dark .callout[class*="bg-red"] [data-component-part="callout-content"] {
	color: #e0aea6 !important;
}
html.dark .callout[class*="bg-neutral"] [data-component-part="callout-content"],
html.dark .callout[class*="bg-gray"] [data-component-part="callout-content"] {
	color: #bcbab6 !important;
}

/* Inside callouts, strip the link blue and just rely on an underline so the
   link doesn't fight with the colored callout chrome. */
.callout a.link,
#content .callout a.link {
	color: inherit !important;
	text-decoration: underline !important;
	border-bottom: 0 !important;
}
.callout a.link:hover,
#content .callout a.link:hover {
	color: inherit !important;
	text-decoration: underline !important;
}

/* Recolor Card icons to Notion blue. The icons are loaded as <img> tags so
   they can't pick up CSS color/fill — this filter recipe converts the black
   render to ~#0075de in light mode and ~#097fe8 in dark. */
[data-component-part="card-icon"] img {
	filter: brightness(0) saturate(100%) invert(31%) sepia(85%) saturate(2280%)
		hue-rotate(196deg) brightness(96%) contrast(101%);
}
html.dark [data-component-part="card-icon"] img {
	filter: brightness(0) saturate(100%) invert(45%) sepia(98%) saturate(1480%)
		hue-rotate(196deg) brightness(101%) contrast(96%);
}

/* Match brand-icon widths to NDS icons. Mintlify renders brand icons (icon=
   "node-js", "npm", "github", etc) as an empty <svg> with size-6 (24×24)
   and a mask-image of the FA brand asset. That makes them noticeably wider
   than the NDS icons next to them, which render as <img> from a 20×20
   viewBox and end up ~20×24 inside the same size-6 container. Clamp the
   brand SVGs to 20×20 (and pin mask-size: contain so the masked icon scales
   instead of being clipped) so mixed rows of brand + NDS icons feel even. */
[data-component-part="card-icon"] > svg {
	width: 1.25rem !important;
	height: 1.25rem !important;
	mask-size: contain !important;
	-webkit-mask-size: contain !important;
}

/* Replace the heavy primary-color ring on Card hover with a soft elevation
   shadow that mimics Notion's hovered card cards. */
.card {
	transition:
		box-shadow 180ms ease-out,
		border-color 180ms ease-out;
}
.card:hover {
	--tw-ring-shadow: 0 0 #0000 !important;
	--tw-ring-color: transparent !important;
	border-color: transparent !important;
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.06),
		0 4px 10px rgba(15, 15, 15, 0.05),
		0 1px 3px rgba(15, 15, 15, 0.04) !important;
}
/* Dark hover: drop shadows read as muddy on the dark surface, so just brighten
   the existing border slightly and skip the shadow layers. */
html.dark .card:hover {
	--tw-ring-shadow: 0 0 #0000 !important;
	--tw-ring-color: transparent !important;
	border-color: rgba(255, 255, 255, 0.18) !important;
	box-shadow: none !important;
}

/* Bottom-of-page Previous/Next pagination: drop the boxed treatment for a
   clean text-only pair. */
a[class*="border-gray-200/70"][class*="rounded-xl"][class*="py-3"][class*="px-4"] {
	border: 0 !important;
	padding: 0 !important;
}

/* Tighten the monospace code-block size from 14px to 12px so multi-line
   snippets feel less heavy. Tab labels keep the default 14px since they
   sit in the chrome alongside the copy button. */
[data-component-part="code-block-root"],
[data-component-part="code-block-root"] pre,
[data-component-part="code-block-root"] code,
[data-component-part="code-block-root"] code * {
	font-size: 12px !important;
	line-height: 20px !important;
}

/* "Copy page" / chevron split button at the top of each page: tighten the
   12px outer corners and shrink the label from text-sm (14px) to 12px so
   the control reads as utility chrome rather than a CTA. The hover/active
   surfaces also need to be remapped to NDS state tokens — Mintlify defaults
   to Tailwind cool grays. */
#page-context-menu [class*="rounded-l-xl"] {
	border-radius: 6px 0 0 6px !important;
}
#page-context-menu [class*="rounded-r-xl"] {
	border-radius: 0 6px 6px 0 !important;
}
#page-context-menu [class*="text-sm"] {
	font-size: 12px !important;
}
#page-context-menu :is(button, a)[class*="bg-gray"],
#page-context-menu :is(button, a)[class*="border-gray"] {
	background-color: transparent !important;
	border-color: #e6e5e3 !important;
}
#page-context-menu :is(button, a):hover {
	background-color: #37352f0a !important;
}
html.dark #page-context-menu :is(button, a)[class*="bg-gray"],
html.dark #page-context-menu :is(button, a)[class*="border-gray"] {
	border-color: rgba(255, 255, 255, 0.094) !important;
}
html.dark #page-context-menu :is(button, a):hover {
	background-color: rgba(255, 255, 255, 0.055) !important;
}

/* Changelog date labels (the pill next to each <Update>): Mintlify defaults
   to text-sm on a primary-tinted background. Shrink the type and swap to a
   lighter neutral gray so the date reads as a quiet timestamp rather than a
   badge. */
[data-component-part="update-label"] {
	background-color: #f7f6f3 !important;
	color: #5f5e59 !important;
	font-size: 14px !important;
	line-height: 20px !important;
	font-weight: 400 !important;
}
html.dark [data-component-part="update-label"] {
	background-color: rgba(255, 255, 255, 0.04) !important;
	color: #bcbab6 !important;
}

/* Tooltips (e.g. the "Copy" label on code-block copy buttons): Mintlify
   renders the visible tooltip as a div with `text-tooltip-foreground` and
   `bg-primary-dark` (Notion blue). Swap to a black bubble with white text. */
[class*="text-tooltip-foreground"] {
	background-color: #1f1f1d !important;
	color: #ffffff !important;
	border-color: #1f1f1d !important;
}
</style><!--$--><!--/$--><div class="w-full"><main class="px-5 lg:pr-10 lg:pl-[5.5rem] lg:pt-10 mx-auto max-w-6xl flex flex-row-reverse gap-x-12 w-full pt-36" id="content-container"><div class="hidden xl:flex self-start sticky xl:flex-col max-w-[28rem] z-21 h-[calc(100vh-9.5rem)] top-[9.5rem]" id="content-side-layout"><div class="z-10 hidden xl:flex box-border max-h-full pl-10 w-[19rem]" id="table-of-contents-layout"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" id="table-of-contents" class="min-w-0 text-gray-600 text-sm leading-6 w-[16.5rem] -mt-10"><div role="presentation" data-id="base-ui-_R_arbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] pt-10 pb-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-0! w-full space-y-2"><nav aria-labelledby="_R_2rbav5tccsnisnpfiutb_"><h2 id="_R_2rbav5tccsnisnpfiutb_" class="m-0 font-normal"><button type="button" class="text-gray-700 dark:text-gray-300 font-medium flex items-center space-x-2 hover:text-gray-900 dark:hover:text-gray-100 transition-colors cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M2.75 14.25H15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.75 3.75H15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.75 9H8.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg><span>On this page</span></button></h2><div><ul id="table-of-contents-content" class="toc"><li class="toc-item relative" data-depth="0"><a style="--toc-padding-left:1rem" href="#what-is-authorization" class="break-words py-1 block pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 font-medium border-l border-gray-950/5 dark:border-white/10 hover:border-gray-950/20 dark:hover:border-white/20 [[data-active]&gt;&amp;]:border-primary dark:[[data-active]&gt;&amp;]:border-primary-light [[data-active]&gt;&amp;:hover]:border-primary dark:[[data-active]&gt;&amp;:hover]:border-primary-light dark:text-gray-400 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light [[data-active]&gt;&amp;]:[text-shadow:-0.15px_0_0_currentColor,0.15px_0_0_currentColor]">What is authorization?</a></li><li class="toc-item relative" data-depth="0"><a style="--toc-padding-left:1rem" href="#internal-connection-auth-flow-set-up" class="break-words py-1 block pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 font-medium border-l border-gray-950/5 dark:border-white/10 hover:border-gray-950/20 dark:hover:border-white/20 [[data-active]&gt;&amp;]:border-primary dark:[[data-active]&gt;&amp;]:border-primary-light [[data-active]&gt;&amp;:hover]:border-primary dark:[[data-active]&gt;&amp;:hover]:border-primary-light dark:text-gray-400 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light [[data-active]&gt;&amp;]:[text-shadow:-0.15px_0_0_currentColor,0.15px_0_0_currentColor]">Internal connection auth flow set-up</a><ul class=""><li class="toc-item relative border-l pl-4 border-gray-950/5 dark:border-white/10 hover:border-gray-950/20 dark:hover:border-white/20 data-active:border-primary data-active:hover:border-primary dark:data-active:border-primary-light" data-depth="1"><a style="--toc-padding-left:1rem" href="#connection-permissions" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Connection permissions</a></li><li class="toc-item relative border-l pl-4 border-gray-950/5 dark:border-white/10 hover:border-gray-950/20 dark:hover:border-white/20 data-active:border-primary data-active:hover:border-primary dark:data-active:border-primary-light" data-depth="1"><a style="--toc-padding-left:1rem" href="#making-api-requests-with-an-internal-connection" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Making API requests with an internal connection</a></li></ul></li><li class="toc-item relative" data-depth="0"><a style="--toc-padding-left:1rem" href="#personal-access-token-authentication" class="break-words py-1 block pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 font-medium border-l border-gray-950/5 dark:border-white/10 hover:border-gray-950/20 dark:hover:border-white/20 [[data-active]&gt;&amp;]:border-primary dark:[[data-active]&gt;&amp;]:border-primary-light [[data-active]&gt;&amp;:hover]:border-primary dark:[[data-active]&gt;&amp;:hover]:border-primary-light dark:text-gray-400 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light [[data-active]&gt;&amp;]:[text-shadow:-0.15px_0_0_currentColor,0.15px_0_0_currentColor]">Personal access token authentication</a></li><li class="toc-item relative" data-depth="0"><a style="--toc-padding-left:1rem" href="#public-connection-auth-flow-set-up" class="break-words py-1 block pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 font-medium border-l border-gray-950/5 dark:border-white/10 hover:border-gray-950/20 dark:hover:border-white/20 [[data-active]&gt;&amp;]:border-primary dark:[[data-active]&gt;&amp;]:border-primary-light [[data-active]&gt;&amp;:hover]:border-primary dark:[[data-active]&gt;&amp;:hover]:border-primary-light dark:text-gray-400 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light [[data-active]&gt;&amp;]:[text-shadow:-0.15px_0_0_currentColor,0.15px_0_0_currentColor]">Public connection auth flow set-up</a><ul class=""><li class="toc-item relative border-l pl-4 border-gray-950/5 dark:border-white/10 hover:border-gray-950/20 dark:hover:border-white/20 data-active:border-primary data-active:hover:border-primary dark:data-active:border-primary-light" data-depth="1"><a style="--toc-padding-left:1rem" href="#how-to-make-a-public-connection" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">How to make a public connection</a></li><li class="toc-item relative border-l pl-4 border-gray-950/5 dark:border-white/10 hover:border-gray-950/20 dark:hover:border-white/20 data-active:border-primary data-active:hover:border-primary dark:data-active:border-primary-light" data-depth="1"><a style="--toc-padding-left:1rem" href="#public-connection-authorization-overview" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Public connection authorization overview</a></li><li class="toc-item relative border-l pl-4 border-gray-950/5 dark:border-white/10 hover:border-gray-950/20 dark:hover:border-white/20 data-active:border-primary data-active:hover:border-primary dark:data-active:border-primary-light" data-depth="1"><a style="--toc-padding-left:1rem" href="#step-1-navigate-the-user-to-the-connection%E2%80%99s-authorization-url" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Step 1 - Navigate the user to the connection’s authorization URL</a></li><li class="toc-item relative border-l pl-4 border-gray-950/5 dark:border-white/10 hover:border-gray-950/20 dark:hover:border-white/20 data-active:border-primary data-active:hover:border-primary dark:data-active:border-primary-light" data-depth="2"><a style="--toc-padding-left:2rem" href="#prompt-for-a-standard-connection-with-no-template-option-default" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Prompt for a standard connection with no template option (Default)</a></li><li class="toc-item relative border-l pl-4 border-gray-950/5 dark:border-white/10 hover:border-gray-950/20 dark:hover:border-white/20 data-active:border-primary data-active:hover:border-primary dark:data-active:border-primary-light" data-depth="2"><a style="--toc-padding-left:2rem" href="#prompt-for-a-connection-with-a-notion-template-option" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Prompt for a connection with a Notion template option</a></li><li class="toc-item relative border-l pl-4 border-gray-950/5 dark:border-white/10 hover:border-gray-950/20 dark:hover:border-white/20 data-active:border-primary data-active:hover:border-primary dark:data-active:border-primary-light" data-depth="1"><a style="--toc-padding-left:1rem" href="#step-2-notion-redirects-the-user-to-the-connection%E2%80%99s-redirect-uri-and-includes-a-code-parameter" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Step 2 - Notion redirects the user to the connection’s redirect URI and includes a code parameter</a></li><li class="toc-item relative border-l pl-4 border-gray-950/5 dark:border-white/10 hover:border-gray-950/20 dark:hover:border-white/20 data-active:border-primary data-active:hover:border-primary dark:data-active:border-primary-light" data-depth="1"><a style="--toc-padding-left:1rem" href="#step-3-send-the-code-in-a-post-request-to-the-notion-api" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Step 3 - Send the code in a POST request to the Notion API</a></li><li class="toc-item relative border-l pl-4 border-gray-950/5 dark:border-white/10 hover:border-gray-950/20 dark:hover:border-white/20 data-active:border-primary data-active:hover:border-primary dark:data-active:border-primary-light" data-depth="1"><a style="--toc-padding-left:1rem" href="#step-4-notion-responds-with-an-access_token--refresh_token-and-additional-information" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Step 4 - Notion responds with an access_token , refresh_token, and additional information</a></li><li class="toc-item relative border-l pl-4 border-gray-950/5 dark:border-white/10 hover:border-gray-950/20 dark:hover:border-white/20 data-active:border-primary data-active:hover:border-primary dark:data-active:border-primary-light" data-depth="1"><a style="--toc-padding-left:1rem" href="#step-5-the-connection-stores-the-access_token-and-refresh_token-for-future-requests" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Step 5 - The connection stores the access_token and refresh_token for future requests</a></li><li class="toc-item relative border-l pl-4 border-gray-950/5 dark:border-white/10 hover:border-gray-950/20 dark:hover:border-white/20 data-active:border-primary data-active:hover:border-primary dark:data-active:border-primary-light" data-depth="1"><a style="--toc-padding-left:1rem" href="#step-6-refreshing-an-access-token" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Step 6 - Refreshing an access token</a></li></ul></li></ul></div></nav></div></div></div></div></div><div class="grow w-full mx-auto [contain:inline-size] xl:w-[calc(100%-28rem)]" id="content-area"><header id="header" class="relative leading-none @container/page-header"><div class="mt-0.5 space-y-2.5"><div class="eyebrow h-5 text-primary dark:text-primary-light text-sm font-semibold">Get started</div><div class="flex flex-col sm:flex-row items-start sm:items-center relative gap-2 min-w-0"><h1 id="page-title" class="text-3xl sm:text-4xl text-gray-900 tracking-tight dark:text-gray-200 [overflow-wrap:anywhere] break-all font-semibold">Authorization</h1><div id="page-context-menu" class="items-center shrink-0 min-w-[156px] justify-end ml-auto hidden @[520px]/page-header:flex"><button id="page-context-menu-button" class="rounded-l-xl px-3 text-gray-700 dark:text-gray-300 py-1.5 border border-gray-200 dark:border-white/[0.07] bg-background-light dark:bg-background-dark hover:bg-gray-600/5 dark:hover:bg-gray-200/5 border-r-0" aria-label="Copy page"><div class="flex items-center gap-2 text-sm text-center font-medium"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg><span class="grid"><span aria-hidden="true" class="invisible col-start-1 row-start-1">Copy page</span><span class="col-start-1 row-start-1">Copy page</span></span></div></button><button type="button" tabindex="0" aria-haspopup="menu" id="base-ui-_R_3n4crbav5tccsnisnpfiutb_" aria-label="More actions" class="group disabled:pointer-events-none [&amp;&gt;span]:line-clamp-1 overflow-hidden group py-0.5 gap-1 text-sm text-gray-950/50 dark:text-white/50 group-hover:text-gray-950/70 dark:group-hover:text-white/70 rounded-none rounded-r-xl border flex items-center justify-center h-[34px] border-gray-200 aspect-square dark:border-white/[0.07] bg-background-light dark:bg-background-dark hover:bg-gray-600/5 dark:hover:bg-gray-200/5"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 rotate-90"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="mt-2 text-lg prose prose-gray dark:prose-invert [&amp;&gt;*]:[overflow-wrap:anywhere]"><p>This guide describes the authorization flows for Notion connections and personal access tokens.</p></div><div id="page-context-menu" class="flex items-center shrink-0 min-w-[156px] mt-3 @[520px]/page-header:hidden"><button id="page-context-menu-button" class="rounded-l-xl px-3 text-gray-700 dark:text-gray-300 py-1.5 border border-gray-200 dark:border-white/[0.07] bg-background-light dark:bg-background-dark hover:bg-gray-600/5 dark:hover:bg-gray-200/5 border-r-0" aria-label="Copy page"><div class="flex items-center gap-2 text-sm text-center font-medium"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg><span class="grid"><span aria-hidden="true" class="invisible col-start-1 row-start-1">Copy page</span><span class="col-start-1 row-start-1">Copy page</span></span></div></button><button type="button" tabindex="0" aria-haspopup="menu" id="base-ui-_R_7ccrbav5tccsnisnpfiutb_" aria-label="More actions" class="group disabled:pointer-events-none [&amp;&gt;span]:line-clamp-1 overflow-hidden group py-0.5 gap-1 text-sm text-gray-950/50 dark:text-white/50 group-hover:text-gray-950/70 dark:group-hover:text-white/70 rounded-none rounded-r-xl border flex items-center justify-center h-[34px] border-gray-200 aspect-square dark:border-white/[0.07] bg-background-light dark:bg-background-dark hover:bg-gray-600/5 dark:hover:bg-gray-200/5"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 rotate-90"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></header><div class="mdx-content @container/columns-container relative mt-8 prose prose-gray dark:prose-invert [contain:inline-size] isolate empty:hidden mb-14" data-page-title="Authorization" data-page-href="/guides/get-started/authorization" id="content"><h2 class="flex whitespace-pre-wrap group font-semibold" id="what-is-authorization"><div class="absolute" tabindex="-1"><a href="#what-is-authorization" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">What is authorization?</span></h2>
<span data-as="p">Authorization is the process of granting a connection or token access to Notion data. <a class="link" href="/guides/get-started/internal-connections">Internal connections</a> use a static API token, <a class="link" href="/guides/get-started/personal-access-tokens">personal access tokens</a> use a user-scoped static API token, and <a class="link" href="/guides/get-started/public-connections">public connections</a> use the <a href="https://oauth.net/2/" target="_blank" rel="noreferrer" class="link">OAuth 2.0</a> protocol.</span>
<h2 class="flex whitespace-pre-wrap group font-semibold" id="internal-connection-auth-flow-set-up"><div class="absolute" tabindex="-1"><a href="#internal-connection-auth-flow-set-up" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Internal connection auth flow set-up</span></h2>
<span data-as="p">To use an internal connection, start by creating your connection in the <a>Developer portal</a>.</span>
<span data-as="p">The internal connection will be associated with the workspace of your choice. You are required to be a workspace owner to create a connection.</span>
<div><figure data-name="frame" class="frame p-2 not-prose relative bg-gray-50/50 rounded-2xl overflow-hidden dark:bg-gray-800/25 print:print-color-exact"><div style="background-position:10px 10px" class="absolute inset-0 bg-grid-neutral-200/20 [mask-image:linear-gradient(0deg,#fff,rgba(255,255,255,0.6))] dark:bg-grid-white/5 dark:[mask-image:linear-gradient(0deg,rgba(255,255,255,0.1),rgba(255,255,255,0.5))] print:print-color-exact"></div><div class="relative rounded-xl overflow-hidden flex justify-center"><span aria-owns="rmiz-modal-" data-rmiz=""><span data-rmiz-content="not-found" style="visibility:visible"><picture class="contents"><img data-path="images/docs/fd25d1f-integrations_7.png" src="https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?fit=max&amp;auto=format&amp;n=kSI9TVzPayvF1_1o&amp;q=85&amp;s=6fcebc5334c9c3499b58208b91b798ae" class="object-contain" width="1198" height="699" decoding="async" sizes="(max-width: 1024px) 100vw, 704px" srcSet="https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=280&amp;fit=max&amp;auto=format&amp;n=kSI9TVzPayvF1_1o&amp;q=85&amp;s=cb7c51998785b7c2f88f11658014be5f 280w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=560&amp;fit=max&amp;auto=format&amp;n=kSI9TVzPayvF1_1o&amp;q=85&amp;s=c1a92ab2d5c7413c6d73c288ed84246b 560w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=840&amp;fit=max&amp;auto=format&amp;n=kSI9TVzPayvF1_1o&amp;q=85&amp;s=49f8e846a3495e9674129bdbbd4a51c8 840w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=1100&amp;fit=max&amp;auto=format&amp;n=kSI9TVzPayvF1_1o&amp;q=85&amp;s=5638368c0a7c3e876d0945aee50d8f26 1100w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=1650&amp;fit=max&amp;auto=format&amp;n=kSI9TVzPayvF1_1o&amp;q=85&amp;s=aeba43b917d31cb847d5c044ccc83627 1650w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=2500&amp;fit=max&amp;auto=format&amp;n=kSI9TVzPayvF1_1o&amp;q=85&amp;s=a3d54f2aa4e0405039a9a88ac58733db 2500w" data-optimize="true" style="aspect-ratio:1198 / 699"/></picture></span></span></div><div class="absolute inset-0 pointer-events-none border border-black/5 rounded-2xl dark:border-white/5"></div><figcaption class="relative rounded-2xl text-center mt-3 pt-0 px-8 pb-2 text-sm text-gray-700 dark:text-gray-400 [&amp;_p]:m-0 [&amp;_a]:font-semibold [&amp;_a]:no-underline [&amp;_a]:border-b [&amp;_a]:border-primary [&amp;_a:hover]:border-b-2 dark:[&amp;_a]:text-white dark:[&amp;_a]:border-primary-light" data-component-part="frame-caption"><p>Create a new connection from the Developer portal.</p></figcaption></figure></div>
<span data-as="p">Once the connection is created, you can update its settings as needed under the <code>Configuration</code> tab and retrieve the installation access token in this tab.</span>
<span data-as="p">The installation access token will be used to authenticate REST API requests. The connection sends the same token in every API request.</span>
<div><figure data-name="frame" class="frame p-2 not-prose relative bg-gray-50/50 rounded-2xl overflow-hidden dark:bg-gray-800/25 print:print-color-exact"><div style="background-position:10px 10px" class="absolute inset-0 bg-grid-neutral-200/20 [mask-image:linear-gradient(0deg,#fff,rgba(255,255,255,0.6))] dark:bg-grid-white/5 dark:[mask-image:linear-gradient(0deg,rgba(255,255,255,0.1),rgba(255,255,255,0.5))] print:print-color-exact"></div><div class="relative rounded-xl overflow-hidden flex justify-center"><span aria-owns="rmiz-modal-" data-rmiz=""><span data-rmiz-content="not-found" style="visibility:visible"><picture class="contents"><img data-path="images/docs/69c7487-integrations_8.png" src="https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=34d293a88ef5911ff43aefe4dde91e2d" class="object-contain" width="1198" height="699" decoding="async" sizes="(max-width: 1024px) 100vw, 704px" srcSet="https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=280&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=9af91249ad204650765be96b857ab205 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=560&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=db81a6d3d2f63dcffaba7bc3a004f38e 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=840&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=bdc99c1625bd6e736addf812ff924d98 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=1100&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=2c859481c58b6b96aa82ae1354373c81 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=1650&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=147a15fb10f97a9601b754da8d71d45c 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=2500&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=2cfdc4db42a0f68849cefb49df7d7b84 2500w" data-optimize="true" style="aspect-ratio:1198 / 699"/></picture></span></span></div><div class="absolute inset-0 pointer-events-none border border-black/5 rounded-2xl dark:border-white/5"></div><figcaption class="relative rounded-2xl text-center mt-3 pt-0 px-8 pb-2 text-sm text-gray-700 dark:text-gray-400 [&amp;_p]:m-0 [&amp;_a]:font-semibold [&amp;_a]:no-underline [&amp;_a]:border-b [&amp;_a]:border-primary [&amp;_a:hover]:border-b-2 dark:[&amp;_a]:text-white dark:[&amp;_a]:border-primary-light" data-component-part="frame-caption"><p>Find the installation access token in the Configuration tab.</p></figcaption></figure></div>
<h3 class="flex whitespace-pre-wrap group font-semibold" id="connection-permissions"><div class="absolute" tabindex="-1"><a href="#connection-permissions" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Connection permissions</span></h3>
<span data-as="p">Before a connection can interact with your Notion workspace page(s), the page must be manually shared with the connection. To share a page with a connection, visit the page in your Notion workspace, click the ••• menu at the top right of a page, scroll down to <code>Add connections</code>, and use the search bar to find and select the connection from the dropdown list.</span>
<span data-as="p">Once the connection is shared, you can start making API requests. If the page is not shared, any API requests made will respond with an error.</span>
<div role="note" aria-label="Warning" class="callout my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border border-yellow-200 bg-yellow-50 dark:border-yellow-900 dark:bg-yellow-600/20 [&amp;_[data-component-part=&#x27;callout-icon&#x27;]]:mt-px" data-callout-type="warning"><div class="mt-0.5 w-4" data-component-part="callout-icon"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="flex-none size-5 text-yellow-800 dark:text-yellow-300"><path d="M 9 6.75 v 1.5 m 0 3 h 0.0075 m -5.2035 3 h 10.392 c 1.155 0 1.8765 -1.2503 1.299 -2.25 L 10.299 3 c -0.5775 -0.9997 -2.0205 -0.9997 -2.598 0 L 2.505 12 c -0.5775 0.9997 0.144 2.25 1.299 2.25 z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></div><div class="text-sm prose dark:prose-invert min-w-0 w-full [&amp;_kbd]:bg-background-light dark:[&amp;_kbd]:bg-background-dark [&amp;_code]:text-current! [&amp;_kbd]:text-current! [&amp;_a]:text-current! [&amp;_a]:border-current [&amp;_strong]:text-current! text-yellow-800 dark:text-yellow-300" data-component-part="callout-content"><span data-as="p"><strong>Never share your installation access token</strong></span><span data-as="p">Your installation access token is a secret. To keep your connection secure, never store the token in your source code or commit it in version control. Instead, read the token from an environment variable. Use a secret manager or deployment system to set the token in the environment.</span><span data-as="p"><a class="link" href="/guides/get-started/handling-api-keys">Learn more: Best Practices for Handling API Keys</a></span></div></div>
<h3 class="flex whitespace-pre-wrap group font-semibold" id="making-api-requests-with-an-internal-connection"><div class="absolute" tabindex="-1"><a href="#making-api-requests-with-an-internal-connection" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Making API requests with an internal connection</span></h3>
<span data-as="p">Any time your connection interacts with your workspace, include the installation access token in the <code>Authorization</code> header with every API request. However, if you are using Notion’s <a href="https://github.com/makenotion/notion-sdk-js" target="_blank" rel="noreferrer" class="link">SDK for JavaScript</a> to interact with the REST API, the token is set once when a client is initialized.</span>
<div data-orientation="horizontal" data-activation-direction="none" class="code-group p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0 bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light"><div class="flex items-center justify-between gap-2 relative pr-2.5" data-component-part="code-group-tab-bar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" class="min-w-0 flex-1 w-0 rounded-tl-xl"><div role="presentation" data-id="base-ui-_R_2kflcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content"><div data-orientation="horizontal" data-activation-direction="none" role="tablist" aria-label="Code examples" class="text-xs leading-6 gap-1 flex"><button type="button" data-active="" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="true" id="base-ui-_R_bakflcrbav5tccsnisnpfiutb_" data-composite-item-active="" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-2 text-primary dark:text-primary-light"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10">HTTP</div><div class="absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"></div></button></div></div></div></div><div class="flex items-center justify-end shrink-0 gap-1.5"><div class="z-10 select-none" id="base-ui-_R_qkkflcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="z-10 select-none" id="base-ui-_R_qskflcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_r4kflcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-http-code-GET__v1_pages_b55c9c"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="flex flex-1 overflow-hidden"><div data-orientation="horizontal" data-activation-direction="none" id="base-ui-_R_34flcrbav5tccsnisnpfiutb_" role="tabpanel" tabindex="0" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white"><div role="presentation" data-id="base-ui-_R_f4flcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="http"><code language="http" numberOfLines="2"><span class="line"><span style="color:#CF222E;--shiki-dark:#C586C0">GET</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> /v1/pages/b55c9c91-384d-452b-81db-d1ef79372b75 </span><span style="color:#CF222E;--shiki-dark:#569CD6">HTTP</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">/</span><span style="color:#0550AE;--shiki-dark:#B5CEA8">1.1</span></span>
<span class="line"><span style="color:#116329;--shiki-dark:#569CD6">Authorization</span><span style="color:#CF222E;--shiki-dark:#569CD6">:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> Bearer {INTEGRATION_TOKEN}</span></span>
</code></pre></div></div></div></div><div class="print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div>
<div data-orientation="horizontal" data-activation-direction="none" class="code-group p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0 bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light"><div class="flex items-center justify-between gap-2 relative pr-2.5" data-component-part="code-group-tab-bar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" class="min-w-0 flex-1 w-0 rounded-tl-xl"><div role="presentation" data-id="base-ui-_R_2kglcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content"><div data-orientation="horizontal" data-activation-direction="none" role="tablist" aria-label="Code examples" class="text-xs leading-6 gap-1 flex"><button type="button" data-active="" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="true" id="base-ui-_R_bakglcrbav5tccsnisnpfiutb_" data-composite-item-active="" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-2 text-primary dark:text-primary-light"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10">JavaScript</div><div class="absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"></div></button></div></div></div></div><div class="flex items-center justify-end shrink-0 gap-1.5"><div class="z-10 select-none" id="base-ui-_R_qkkglcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="z-10 select-none" id="base-ui-_R_qskglcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_r4kglcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-javascript-code-const___Client_____r"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="flex flex-1 overflow-hidden"><div data-orientation="horizontal" data-activation-direction="none" id="base-ui-_R_34glcrbav5tccsnisnpfiutb_" role="tabpanel" tabindex="0" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white"><div role="presentation" data-id="base-ui-_R_f4glcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="javascript"><code language="javascript" numberOfLines="10"><span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> { </span><span style="color:#0550AE;--shiki-dark:#4FC1FF">Client</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> } </span><span style="color:#CF222E;--shiki-dark:#D4D4D4">=</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> require</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#0A3069;--shiki-dark:#CE9178">&quot;@notionhq/client&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6E7781;--shiki-dark:#6A9955">// Initializing a client</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> notion</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#CF222E;--shiki-dark:#569CD6"> new</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> Client</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">({</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">	auth:</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> process</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">env</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#0550AE;--shiki-dark:#4FC1FF">NOTION_TOKEN</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">})</span></span>
<span class="line"></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> getUsers</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#CF222E;--shiki-dark:#569CD6"> async</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> () </span><span style="color:#CF222E;--shiki-dark:#569CD6">=&gt;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> {</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">	const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> listUsersResponse</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#CF222E;--shiki-dark:#C586C0"> await</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> notion</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">users</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">list</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">({})</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">}</span></span>
</code></pre></div></div></div></div><div class="print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div>
<div role="note" aria-label="Note" class="callout my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border border-blue-200 bg-blue-50 dark:border-blue-900 dark:bg-blue-600/20" data-callout-type="note"><div class="mt-0.5 w-4" data-component-part="callout-icon"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 text-blue-800 dark:text-blue-300"><path d="M 9 1.6714 C 13.0371 1.6714 16.3286 4.9629 16.3286 9 C 16.3286 13.0371 13.0371 16.3286 9 16.3286 C 7.0574 16.3252 5.1953 15.552 3.8217 14.1783 C 2.448 12.8047 1.6748 10.9426 1.6714 9 C 1.6714 4.9629 4.9629 1.6714 9 1.6714 Z M 9 0 C 4.0371 0 0 4.0371 0 9 C 0 13.9629 4.0371 18 9 18 C 13.9629 18 18 13.9629 18 9 C 18 4.0371 13.9629 0 9 0 Z M 10.2857 3.8571 H 7.7143 V 10.2857 H 10.2857 V 3.8571 Z M 10.2857 11.5714 H 7.7143 V 14.1429 H 10.2857 V 11.5714 Z" fill="currentColor" stroke="none" fill-rule="evenodd" clip-rule="evenodd"></path></svg></div><div class="text-sm prose dark:prose-invert min-w-0 w-full [&amp;_kbd]:bg-background-light dark:[&amp;_kbd]:bg-background-dark [&amp;_code]:text-current! [&amp;_kbd]:text-current! [&amp;_a]:text-current! [&amp;_a]:border-current [&amp;_strong]:text-current! text-blue-800 dark:text-blue-300" data-component-part="callout-content"><span data-as="p">If you are not using the <a href="https://github.com/makenotion/notion-sdk-js" target="_blank" rel="noreferrer" class="link">Notion SDK for JavaScript</a>, also set the <a class="link" href="/reference/versioning"><code>Notion-Version</code></a> and <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type" target="_blank" rel="noreferrer" class="link"><code>Content-type</code></a> headers in all of your requests, like so:</span><div class="code-block mt-5 mb-8 not-prose rounded-2xl relative group min-w-0 print:print-color-exact text-gray-950 bg-gray-50 dark:bg-white/5 dark:text-gray-50 codeblock-light border border-gray-950/10 dark:border-white/10 dark:twoslash-dark p-0.5" numberOfLines="5" language="json"><div class="flex text-gray-400 text-xs rounded-t-[14px] leading-6 font-medium pl-4 pr-2.5 py-1" data-component-part="code-block-header"><div class="grow-0 flex items-center gap-1.5 text-gray-700 dark:text-gray-300 min-w-0" data-component-part="code-block-header-filename"><span class="truncate min-w-0" title="JSON">JSON</span></div><div class="flex-1 flex items-center justify-end gap-1.5 print:hidden"><div class="z-10 select-none" id="base-ui-_R_6mb8hlcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="z-10 select-none" id="base-ui-_R_6qb8hlcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_6ub8hlcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-json-code-headers______Authori"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:auto;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white"><div role="presentation" data-id="base-ui-_R_1j8hlcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre leading-6"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="json"><code language="json" numberOfLines="5"><span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">headers: {</span></span>
<span class="line"><span style="color:#82071E;--shiki-light-font-style:italic;--shiki-dark:#F44747;--shiki-dark-font-style:inherit">  Authorization</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">: </span><span style="color:#82071E;--shiki-light-font-style:italic;--shiki-dark:#F44747;--shiki-dark-font-style:inherit">`Bearer</span><span style="color:#82071E;--shiki-light-font-style:italic;--shiki-dark:#F44747;--shiki-dark-font-style:inherit"> $</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">{</span><span style="color:#82071E;--shiki-light-font-style:italic;--shiki-dark:#F44747;--shiki-dark-font-style:inherit">process.env.NOTION_TOKEN</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">}</span><span style="color:#82071E;--shiki-light-font-style:italic;--shiki-dark:#F44747;--shiki-dark-font-style:inherit">`</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#116329;--shiki-dark:#9CDCFE">  &quot;Notion-Version&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">: </span><span style="color:#0A3069;--shiki-dark:#CE9178">&quot;2026-03-11&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#116329;--shiki-dark:#9CDCFE">  &quot;Content-Type&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">: </span><span style="color:#0A3069;--shiki-dark:#CE9178">&quot;application/json&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">},</span></span>
</code></pre></div></div></div></div><div class="print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div>
<span data-as="p">If you receive an error response from the API, check if the connection has been properly <a href="https://www.notion.com/help/add-and-manage-connections-with-the-api#manage-connections-in-your-workspace" target="_blank" rel="noreferrer" class="link">added to the page</a>. If this does not solve the problem, refer to our <a class="link" href="/reference/status-codes">Status codes</a> page for more information.</span>
<h2 class="flex whitespace-pre-wrap group font-semibold" id="personal-access-token-authentication"><div class="absolute" tabindex="-1"><a href="#personal-access-token-authentication" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Personal access token authentication</span></h2>
<span data-as="p">Personal access tokens (PATs) are created directly by a Notion user in the <a>Developer portal</a>. There is no OAuth flow and no page picker. A PAT acts as the user who created it and uses that user’s permissions in the selected workspace.</span>
<span data-as="p">Use a PAT when a script, CLI workflow, Worker, or trusted tool should act as you. Use an internal connection for team-owned workspace automations, or a public connection when other Notion users need to install your app.</span>
<span data-as="p">PATs use the same <code>Authorization</code> header as other Notion API tokens:</span>
<div data-orientation="horizontal" data-activation-direction="none" class="code-group p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0 bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light"><div class="flex items-center justify-between gap-2 relative pr-2.5" data-component-part="code-group-tab-bar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" class="min-w-0 flex-1 w-0 rounded-tl-xl"><div role="presentation" data-id="base-ui-_R_2knlcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content"><div data-orientation="horizontal" data-activation-direction="none" role="tablist" aria-label="Code examples" class="text-xs leading-6 gap-1 flex"><button type="button" data-active="" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="true" id="base-ui-_R_baknlcrbav5tccsnisnpfiutb_" data-composite-item-active="" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-2 text-primary dark:text-primary-light"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10">HTTP</div><div class="absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"></div></button></div></div></div></div><div class="flex items-center justify-end shrink-0 gap-1.5"><div class="z-10 select-none" id="base-ui-_R_qkknlcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="z-10 select-none" id="base-ui-_R_qsknlcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_r4knlcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-http-code-GET__v1_users_me_HTT"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="flex flex-1 overflow-hidden"><div data-orientation="horizontal" data-activation-direction="none" id="base-ui-_R_34nlcrbav5tccsnisnpfiutb_" role="tabpanel" tabindex="0" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white"><div role="presentation" data-id="base-ui-_R_f4nlcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="http"><code language="http" numberOfLines="3"><span class="line"><span style="color:#CF222E;--shiki-dark:#C586C0">GET</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> /v1/users/me </span><span style="color:#CF222E;--shiki-dark:#569CD6">HTTP</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">/</span><span style="color:#0550AE;--shiki-dark:#B5CEA8">1.1</span></span>
<span class="line"><span style="color:#116329;--shiki-dark:#569CD6">Authorization</span><span style="color:#CF222E;--shiki-dark:#569CD6">:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> Bearer {PERSONAL_ACCESS_TOKEN}</span></span>
<span class="line"><span style="color:#116329;--shiki-dark:#569CD6">Notion-Version</span><span style="color:#CF222E;--shiki-dark:#569CD6">:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> 2026-03-11</span></span>
</code></pre></div></div></div></div><div class="print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div>
<span data-as="p">See <a class="link" href="/guides/get-started/personal-access-tokens">Personal access tokens</a> for creation steps, workspace admin controls, tier defaults, and security guidance.</span>
<h2 class="flex whitespace-pre-wrap group font-semibold" id="public-connection-auth-flow-set-up"><div class="absolute" tabindex="-1"><a href="#public-connection-auth-flow-set-up" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Public connection auth flow set-up</span></h2>
<span data-as="p">A public connection can be installed in any Notion workspace within its <a class="link" href="/guides/get-started/public-connections#installation-scope">installation scope</a> — either any workspace, or a specific set chosen at creation time.</span>
<span data-as="p">Since a public connection is not tied to a single workspace with a single installation access token, public connections instead follow the <a href="https://oauth.net/2/" target="_blank" rel="noreferrer" class="link">OAuth 2.0 protocol</a> to authorize a connection to interact with a workspace.</span>
<h3 class="flex whitespace-pre-wrap group font-semibold" id="how-to-make-a-public-connection"><div class="absolute" tabindex="-1"><a href="#how-to-make-a-public-connection" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">How to make a public connection</span></h3>
<span data-as="p">Navigate to the <a>Developer portal</a> and create a new public connection.</span>
<span data-as="p">Fill out the form with your connection details, including your redirect URI(s) under the OAuth configuration section and the connection’s <a class="link" href="/guides/get-started/public-connections#installation-scope">installation scope</a> — either <strong>Any workspace</strong> or <strong>Selected workspaces only</strong>. This can’t be changed after creation.</span>
<span data-as="p">The redirect URI is the URI your users will be redirected to after authorizing the public connection. To learn more, read <a href="https://www.oauth.com/oauth2-servers/redirect-uris/" target="_blank" rel="noreferrer" class="link">OAuth’s description of redirect URIs</a>.</span>
<div role="note" aria-label="Note" class="callout my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border border-blue-200 bg-blue-50 dark:border-blue-900 dark:bg-blue-600/20" data-callout-type="note"><div class="mt-0.5 w-4" data-component-part="callout-icon"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 text-blue-800 dark:text-blue-300"><path d="M 9 1.6714 C 13.0371 1.6714 16.3286 4.9629 16.3286 9 C 16.3286 13.0371 13.0371 16.3286 9 16.3286 C 7.0574 16.3252 5.1953 15.552 3.8217 14.1783 C 2.448 12.8047 1.6748 10.9426 1.6714 9 C 1.6714 4.9629 4.9629 1.6714 9 1.6714 Z M 9 0 C 4.0371 0 0 4.0371 0 9 C 0 13.9629 4.0371 18 9 18 C 13.9629 18 18 13.9629 18 9 C 18 4.0371 13.9629 0 9 0 Z M 10.2857 3.8571 H 7.7143 V 10.2857 H 10.2857 V 3.8571 Z M 10.2857 11.5714 H 7.7143 V 14.1429 H 10.2857 V 11.5714 Z" fill="currentColor" stroke="none" fill-rule="evenodd" clip-rule="evenodd"></path></svg></div><div class="text-sm prose dark:prose-invert min-w-0 w-full [&amp;_kbd]:bg-background-light dark:[&amp;_kbd]:bg-background-dark [&amp;_code]:text-current! [&amp;_kbd]:text-current! [&amp;_a]:text-current! [&amp;_a]:border-current [&amp;_strong]:text-current! text-blue-800 dark:text-blue-300" data-component-part="callout-content"><span data-as="p">Marketplace listing details (such as descriptions, categories, and images) are managed separately through the <strong>Listings</strong> section. Refer to the <a class="link" href="/guides/get-started/marketplace-listing">List on the Marketplace</a> guide to learn more.</span></div></div>
<h3 class="flex whitespace-pre-wrap group font-semibold" id="public-connection-authorization-overview"><div class="absolute" tabindex="-1"><a href="#public-connection-authorization-overview" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Public connection authorization overview</span></h3>
<span data-as="p">Once your connection has been made public, you can update your connection code to use the public auth flow.</span>
<span data-as="p">As an overview, the authorization flow includes the following steps. Each step will be described in more detail below.</span>
<div role="list" class="steps ml-3.5 mt-10 mb-6"><div role="listitem" class="step group/step step-container relative flex items-start pb-5"><div data-component-part="step-line" class="absolute w-px h-[calc(100%-2.75rem)] top-11 bg-gray-200/70 dark:bg-white/10" contentEditable="false"></div><div class="absolute ml-[-13px] py-2" data-component-part="step-number" contentEditable="false"><div class="group/step-indicator relative size-7 shrink-0 rounded-full bg-gray-50 dark:bg-white/10 text-xs text-gray-900 dark:text-gray-50 font-semibold flex items-center justify-center"><div class="group-has-[a:focus-visible]/step-indicator:opacity-0">1</div></div></div><div class="w-full overflow-hidden pl-8 pr-px"><div data-component-part="step-content" class="prose dark:prose-invert mt-2"><span data-as="p">Navigate the user to the connection’s authorization URL. This URL is provided in the <a>Developer portal</a>.</span></div></div></div><div role="listitem" class="step group/step step-container relative flex items-start pb-5"><div data-component-part="step-line" class="absolute w-px h-[calc(100%-2.75rem)] top-11 bg-gray-200/70 dark:bg-white/10" contentEditable="false"></div><div class="absolute ml-[-13px] py-2" data-component-part="step-number" contentEditable="false"><div class="group/step-indicator relative size-7 shrink-0 rounded-full bg-gray-50 dark:bg-white/10 text-xs text-gray-900 dark:text-gray-50 font-semibold flex items-center justify-center"><div class="group-has-[a:focus-visible]/step-indicator:opacity-0">2</div></div></div><div class="w-full overflow-hidden pl-8 pr-px"><div data-component-part="step-content" class="prose dark:prose-invert mt-2"><span data-as="p">After the user selects which workspace pages to share, Notion redirects the user to the connection’s redirect URI and includes a <code>code</code> query parameter. The redirect URI is the one you specified in your <a>Developer portal</a>.</span></div></div></div><div role="listitem" class="step group/step step-container relative flex items-start pb-5"><div data-component-part="step-line" class="absolute w-px h-[calc(100%-2.75rem)] top-11 bg-gray-200/70 dark:bg-white/10" contentEditable="false"></div><div class="absolute ml-[-13px] py-2" data-component-part="step-number" contentEditable="false"><div class="group/step-indicator relative size-7 shrink-0 rounded-full bg-gray-50 dark:bg-white/10 text-xs text-gray-900 dark:text-gray-50 font-semibold flex items-center justify-center"><div class="group-has-[a:focus-visible]/step-indicator:opacity-0">3</div></div></div><div class="w-full overflow-hidden pl-8 pr-px"><div data-component-part="step-content" class="prose dark:prose-invert mt-2"><span data-as="p">Make a <code>POST</code> request to <a class="link" href="/reference/create-a-token">create an access token</a>, which exchanges the temporary <code>code</code> for an access token.</span></div></div></div><div role="listitem" class="step group/step step-container relative flex items-start pb-5"><div data-component-part="step-line" class="absolute w-px h-[calc(100%-2.75rem)] top-11 bg-gray-200/70 dark:bg-white/10" contentEditable="false"></div><div class="absolute ml-[-13px] py-2" data-component-part="step-number" contentEditable="false"><div class="group/step-indicator relative size-7 shrink-0 rounded-full bg-gray-50 dark:bg-white/10 text-xs text-gray-900 dark:text-gray-50 font-semibold flex items-center justify-center"><div class="group-has-[a:focus-visible]/step-indicator:opacity-0">4</div></div></div><div class="w-full overflow-hidden pl-8 pr-px"><div data-component-part="step-content" class="prose dark:prose-invert mt-2"><span data-as="p">The Notion API responds with an access token and some additional information.</span></div></div></div><div role="listitem" class="step group/step step-container relative flex items-start pb-5"><div data-component-part="step-line" class="absolute w-px h-[calc(100%-2.75rem)] top-11 bg-transparent bg-linear-to-b from-gray-200 dark:from-white/10 via-80% to-transparent group-has-[[data-component-part=&quot;step-content&quot;]:empty]/step:hidden" contentEditable="false"></div><div class="absolute ml-[-13px] py-2" data-component-part="step-number" contentEditable="false"><div class="group/step-indicator relative size-7 shrink-0 rounded-full bg-gray-50 dark:bg-white/10 text-xs text-gray-900 dark:text-gray-50 font-semibold flex items-center justify-center"><div class="group-has-[a:focus-visible]/step-indicator:opacity-0">5</div></div></div><div class="w-full overflow-hidden pl-8 pr-px"><div data-component-part="step-content" class="prose dark:prose-invert mt-2"><span data-as="p">Store the access token for future API requests. View the <a class="link" href="/reference/intro">API reference docs</a> to learn about available endpoints.</span></div></div></div></div>
<h3 class="flex whitespace-pre-wrap group font-semibold" id="step-1-navigate-the-user-to-the-connection’s-authorization-url"><div class="absolute" tabindex="-1"><a href="#step-1-navigate-the-user-to-the-connection’s-authorization-url" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Step 1 - Navigate the user to the connection’s authorization URL</span></h3>
<span data-as="p">After creating a public connection in the <a>Developer portal</a>, access the connection’s secrets in the <strong>Configuration</strong> tab. Similarly to the internal connections, these values should be protected and should never be included in source code or version control.</span>
<div><figure data-name="frame" class="frame p-2 not-prose relative bg-gray-50/50 rounded-2xl overflow-hidden dark:bg-gray-800/25 print:print-color-exact"><div style="background-position:10px 10px" class="absolute inset-0 bg-grid-neutral-200/20 [mask-image:linear-gradient(0deg,#fff,rgba(255,255,255,0.6))] dark:bg-grid-white/5 dark:[mask-image:linear-gradient(0deg,rgba(255,255,255,0.1),rgba(255,255,255,0.5))] print:print-color-exact"></div><div class="relative rounded-xl overflow-hidden flex justify-center"><span aria-owns="rmiz-modal-" data-rmiz=""><span data-rmiz-content="not-found" style="visibility:visible"><picture class="contents"><img data-path="images/docs/c535461-integrations_10.png" src="https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=ef1174a58a78b04444bea74627ede083" class="object-contain" width="1198" height="699" decoding="async" sizes="(max-width: 1024px) 100vw, 704px" srcSet="https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=280&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=b587242b941365656c64f99cd8dc05c9 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=560&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=c708c30297ae6dee382a5836780b710a 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=840&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=834150052e2989bfbad4269265035aec 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=1100&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=3dd55465b81829d22d8c5f524f513f97 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=1650&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=cfcd4563c2f383bf6215228f72a6ea82 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=2500&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=9ed48b65c760339590d3eecb6299ee23 2500w" data-optimize="true" style="aspect-ratio:1198 / 699"/></picture></span></span></div><div class="absolute inset-0 pointer-events-none border border-black/5 rounded-2xl dark:border-white/5"></div><figcaption class="relative rounded-2xl text-center mt-3 pt-0 px-8 pb-2 text-sm text-gray-700 dark:text-gray-400 [&amp;_p]:m-0 [&amp;_a]:font-semibold [&amp;_a]:no-underline [&amp;_a]:border-b [&amp;_a]:border-primary [&amp;_a:hover]:border-b-2 dark:[&amp;_a]:text-white dark:[&amp;_a]:border-primary-light" data-component-part="frame-caption"><p>The Authorization URL field populates after a public connection is submitted for review</p></figcaption></figure></div>
<span data-as="p">As an example, your <code>.env</code> file using these secrets could look like this:</span>
<div data-orientation="horizontal" data-activation-direction="none" class="code-group p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0 bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light"><div class="flex items-center justify-between gap-2 relative pr-2.5" data-component-part="code-group-tab-bar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" class="min-w-0 flex-1 w-0 rounded-tl-xl"><div role="presentation" data-id="base-ui-_R_2l9lcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content"><div data-orientation="horizontal" data-activation-direction="none" role="tablist" aria-label="Code examples" class="text-xs leading-6 gap-1 flex"><button type="button" data-active="" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="true" id="base-ui-_R_bal9lcrbav5tccsnisnpfiutb_" data-composite-item-active="" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-2 text-primary dark:text-primary-light"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10">Shell</div><div class="absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"></div></button></div></div></div></div><div class="flex items-center justify-end shrink-0 gap-1.5"><div class="z-10 select-none" id="base-ui-_R_qkl9lcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="z-10 select-none" id="base-ui-_R_qsl9lcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_r4l9lcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-shellscript-code-__env__OAUTH_CLIENT_"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="flex flex-1 overflow-hidden"><div data-orientation="horizontal" data-activation-direction="none" id="base-ui-_R_359lcrbav5tccsnisnpfiutb_" role="tabpanel" tabindex="0" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white"><div role="presentation" data-id="base-ui-_R_f59lcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="shellscript"><code language="shellscript" numberOfLines="5"><span class="line"><span style="color:#6E7781;--shiki-dark:#6A9955">#.env</span></span>
<span class="line"></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">OAUTH_CLIENT_ID</span><span style="color:#CF222E;--shiki-dark:#D4D4D4">=&lt;</span><span style="color:#0A3069;--shiki-dark:#CE9178">your-client-id</span><span style="color:#CF222E;--shiki-dark:#D4D4D4">&gt;</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">OAUTH_CLIENT_SECRET</span><span style="color:#CF222E;--shiki-dark:#D4D4D4">=&lt;</span><span style="color:#0A3069;--shiki-dark:#CE9178">your-client-secret</span><span style="color:#CF222E;--shiki-dark:#D4D4D4">&gt;</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">NOTION_AUTH_URL</span><span style="color:#CF222E;--shiki-dark:#D4D4D4">=&lt;</span><span style="color:#0A3069;--shiki-dark:#CE9178">your-auth-url</span><span style="color:#CF222E;--shiki-dark:#D4D4D4">&gt;</span></span>
</code></pre></div></div></div></div><div class="print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div>
<span data-as="p">To start the authorization flow for a public connection, direct the prospective user to the authorization URL. A common pattern is to include a hyperlink in the connection app that interacts with the Notion REST API. For example, an app that lets users create Notion pages in their workspaces should send users to the authorization URL first.</span>
<span data-as="p">The following example shows an authorization URL made available through a hyperlink:</span>
<div data-orientation="horizontal" data-activation-direction="none" class="code-group p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0 bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light"><div class="flex items-center justify-between gap-2 relative pr-2.5" data-component-part="code-group-tab-bar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" class="min-w-0 flex-1 w-0 rounded-tl-xl"><div role="presentation" data-id="base-ui-_R_2lclcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content"><div data-orientation="horizontal" data-activation-direction="none" role="tablist" aria-label="Code examples" class="text-xs leading-6 gap-1 flex"><button type="button" data-active="" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="true" id="base-ui-_R_balclcrbav5tccsnisnpfiutb_" data-composite-item-active="" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-2 text-primary dark:text-primary-light"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10">HTML</div><div class="absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"></div></button></div></div></div></div><div class="flex items-center justify-end shrink-0 gap-1.5"><div class="z-10 select-none" id="base-ui-_R_qklclcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="z-10 select-none" id="base-ui-_R_qslclcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_r4lclcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-html-code-_a_href__https___api"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="flex flex-1 overflow-hidden"><div data-orientation="horizontal" data-activation-direction="none" id="base-ui-_R_35clcrbav5tccsnisnpfiutb_" role="tabpanel" tabindex="0" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white"><div role="presentation" data-id="base-ui-_R_f5clcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="html"><code language="html" numberOfLines="1"><span class="line"><span style="color:#1F2328;--shiki-dark:#808080">&lt;</span><span style="color:#116329;--shiki-dark:#569CD6">a</span><span style="color:#0550AE;--shiki-dark:#9CDCFE"> href</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">=</span><span style="color:#0A3069;--shiki-dark:#CE9178">&quot;https://api.notion.com/v1/oauth/authorize?owner=user&amp;client_id=463558a3-725e-4f37-b6d3-0889894f68de&amp;redirect_uri=https%3A%2F%2Fexample.com%2Fauth%2Fnotion%2Fcallback&amp;response_type=code&quot;</span><span style="color:#1F2328;--shiki-dark:#808080">&gt;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">Add to Notion</span><span style="color:#1F2328;--shiki-dark:#808080">&lt;/</span><span style="color:#116329;--shiki-dark:#569CD6">a</span><span style="color:#1F2328;--shiki-dark:#808080">&gt;</span></span>
</code></pre></div></div></div></div><div class="print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div>
<span data-as="p">The URL begins with <code>https://api.notion.com/v1/oauth/authorize</code> and has the following parameters:</span>
<!-- --><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" data-table-wrapper="true" class="min-w-0 [--page-padding:20px] flex w-[calc(100%+(var(--page-padding)*2))] my-[1em] py-[1em] -mx-(--page-padding) max-w-none [contain:inline-size]"><div role="region" data-id="base-ui-_R_1elcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport" aria-label="Scrollable table"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="flex"><div class="px-(--page-padding) grow max-w-none table"><table class="m-0 min-w-full w-full max-w-none table [&amp;_td]:min-w-[150px] [&amp;_th]:text-left [&amp;_td[data-numeric]]:tabular-nums"><thead><tr><th style="text-align:left">Parameter</th><th style="text-align:left">Description</th><th style="text-align:left">Required</th></tr></thead><tbody><tr><td style="text-align:left"><code>client_id</code></td><td style="text-align:left">An identifier for your connection, found in the connection settings.</td><td style="text-align:left">✅</td></tr><tr><td style="text-align:left"><code>redirect_uri</code></td><td style="text-align:left">The URL where the user should return after granting access.</td><td style="text-align:left">✅</td></tr><tr><td style="text-align:left"><code>response_type</code></td><td style="text-align:left">Always use <code>code</code>.</td><td style="text-align:left">✅</td></tr><tr><td style="text-align:left"><code>owner</code></td><td style="text-align:left">Always use <code>user</code>.</td><td style="text-align:left">✅</td></tr><tr><td style="text-align:left"><code>state</code></td><td style="text-align:left">If the user was in the middle of an interaction or operation, then this parameter can be used to restore state after the user returns. It can also be used to prevent CSRF attacks.</td><td style="text-align:left"></td></tr></tbody></table></div></div></div></div>
<span data-as="p">Once the authorization URL is visited, the user will be shown a prompt that varies depending on whether or not the connection comes with a Notion template option.</span>
<h4 class="flex whitespace-pre-wrap group font-semibold" id="prompt-for-a-standard-connection-with-no-template-option-default"><div class="absolute" tabindex="-1"><a href="#prompt-for-a-standard-connection-with-no-template-option-default" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Prompt for a standard connection with no template option (Default)</span></h4>
<span data-as="p">In the standard connection permissions flow, a prompt describes the connection <a class="link" href="/reference/capabilities">capabilities</a>, presented to the user as what the connection would like to be able to do in the workspace. A user can either select pages to grant the connection access to, or cancel the request.</span>
<div><figure data-name="frame" class="frame p-2 not-prose relative bg-gray-50/50 rounded-2xl overflow-hidden dark:bg-gray-800/25 print:print-color-exact"><div style="background-position:10px 10px" class="absolute inset-0 bg-grid-neutral-200/20 [mask-image:linear-gradient(0deg,#fff,rgba(255,255,255,0.6))] dark:bg-grid-white/5 dark:[mask-image:linear-gradient(0deg,rgba(255,255,255,0.1),rgba(255,255,255,0.5))] print:print-color-exact"></div><div class="relative rounded-xl overflow-hidden flex justify-center"><span aria-owns="rmiz-modal-" data-rmiz=""><span data-rmiz-content="not-found" style="visibility:visible"><picture class="contents"><img data-path="images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png" src="https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?fit=max&amp;auto=format&amp;n=kSI9TVzPayvF1_1o&amp;q=85&amp;s=3a82bcb02f006753164c1334e664b500" class="object-contain" width="1150" height="1390" decoding="async" sizes="(max-width: 1024px) 100vw, 704px" srcSet="https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=280&amp;fit=max&amp;auto=format&amp;n=kSI9TVzPayvF1_1o&amp;q=85&amp;s=cd5de5a9df445d715557662788dff7c2 280w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=560&amp;fit=max&amp;auto=format&amp;n=kSI9TVzPayvF1_1o&amp;q=85&amp;s=4170a3824ecac3fe95e9976e50262bd4 560w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=840&amp;fit=max&amp;auto=format&amp;n=kSI9TVzPayvF1_1o&amp;q=85&amp;s=46ae6c59a3fccd09b03adf828f73c443 840w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=1100&amp;fit=max&amp;auto=format&amp;n=kSI9TVzPayvF1_1o&amp;q=85&amp;s=f57ba2fdb324aa186b87c35aa7e1578b 1100w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=1650&amp;fit=max&amp;auto=format&amp;n=kSI9TVzPayvF1_1o&amp;q=85&amp;s=323a920f9883c9b89c689e6566e16b59 1650w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=2500&amp;fit=max&amp;auto=format&amp;n=kSI9TVzPayvF1_1o&amp;q=85&amp;s=18cb8d57b8f8093555222f83699a700a 2500w" data-optimize="true" style="aspect-ratio:1150 / 1390"/></picture></span></span></div><div class="absolute inset-0 pointer-events-none border border-black/5 rounded-2xl dark:border-white/5"></div><figcaption class="relative rounded-2xl text-center mt-3 pt-0 px-8 pb-2 text-sm text-gray-700 dark:text-gray-400 [&amp;_p]:m-0 [&amp;_a]:font-semibold [&amp;_a]:no-underline [&amp;_a]:border-b [&amp;_a]:border-primary [&amp;_a:hover]:border-b-2 dark:[&amp;_a]:text-white dark:[&amp;_a]:border-primary-light" data-component-part="frame-caption"><p>Prompt for authorizing a standard connection (no template option)</p></figcaption></figure></div>
<span data-as="p">If the user presses <strong>Cancel</strong>, they will be redirected to the redirect URI with and <code>error</code> query param added.</span>
<div class="code-block mt-5 mb-8 not-prose rounded-2xl relative group min-w-0 print:print-color-exact text-gray-950 dark:text-gray-50 codeblock-light border border-gray-950/10 dark:border-white/10 dark:twoslash-dark bg-transparent dark:bg-transparent" numberOfLines="2" language="text"><div data-floating-buttons="true" class="absolute top-3 right-4 flex items-center gap-1.5 print:hidden"><div class="z-10 select-none" id="base-ui-_R_3alklcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="z-10 select-none" id="base-ui-_R_3clklcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_3elklcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-text-code-www_example_com_my-r"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:auto;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-2xl bg-white"><div role="presentation" data-id="base-ui-_R_35klcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre leading-6"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="text"><code language="text" numberOfLines="2"><span class="line"><span>www.example.com/my-redirect-uri?error=access_denied&amp;state=</span></span>
<span class="line"><span></span></span></code></pre></div></div></div></div><div class="print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div>
<span data-as="p">You can use this <code>error</code>query parameter to conditionally update your app’s state as needed.</span>
<span data-as="p">If the user opts to <code>Select pages</code>, then a page picker interface opens. A user can search for and select pages and databases to share with the connection from the page picker.</span>
<div role="note" aria-label="Note" class="callout my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border border-blue-200 bg-blue-50 dark:border-blue-900 dark:bg-blue-600/20" data-callout-type="note"><div class="mt-0.5 w-4" data-component-part="callout-icon"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 text-blue-800 dark:text-blue-300"><path d="M 9 1.6714 C 13.0371 1.6714 16.3286 4.9629 16.3286 9 C 16.3286 13.0371 13.0371 16.3286 9 16.3286 C 7.0574 16.3252 5.1953 15.552 3.8217 14.1783 C 2.448 12.8047 1.6748 10.9426 1.6714 9 C 1.6714 4.9629 4.9629 1.6714 9 1.6714 Z M 9 0 C 4.0371 0 0 4.0371 0 9 C 0 13.9629 4.0371 18 9 18 C 13.9629 18 18 13.9629 18 9 C 18 4.0371 13.9629 0 9 0 Z M 10.2857 3.8571 H 7.7143 V 10.2857 H 10.2857 V 3.8571 Z M 10.2857 11.5714 H 7.7143 V 14.1429 H 10.2857 V 11.5714 Z" fill="currentColor" stroke="none" fill-rule="evenodd" clip-rule="evenodd"></path></svg></div><div class="text-sm prose dark:prose-invert min-w-0 w-full [&amp;_kbd]:bg-background-light dark:[&amp;_kbd]:bg-background-dark [&amp;_code]:text-current! [&amp;_kbd]:text-current! [&amp;_a]:text-current! [&amp;_a]:border-current [&amp;_strong]:text-current! text-blue-800 dark:text-blue-300" data-component-part="callout-content"><span data-as="p">The page picker only displays pages or databases to which a user has <a href="https://www.notion.com/help/sharing-and-permissions" target="_blank" rel="noreferrer" class="link">full access</a>, because a user needs full access to a resource in order to be able to share it with a connection.</span></div></div>
<div><figure data-name="frame" class="frame p-2 not-prose relative bg-gray-50/50 rounded-2xl overflow-hidden dark:bg-gray-800/25 print:print-color-exact"><div style="background-position:10px 10px" class="absolute inset-0 bg-grid-neutral-200/20 [mask-image:linear-gradient(0deg,#fff,rgba(255,255,255,0.6))] dark:bg-grid-white/5 dark:[mask-image:linear-gradient(0deg,rgba(255,255,255,0.1),rgba(255,255,255,0.5))] print:print-color-exact"></div><div class="relative rounded-xl overflow-hidden flex justify-center"><span aria-owns="rmiz-modal-" data-rmiz=""><span data-rmiz-content="not-found" style="visibility:visible"><picture class="contents"><img data-path="images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png" src="https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=94186f31f22938dc1c7d850e227e061a" class="object-contain" width="1142" height="1360" decoding="async" sizes="(max-width: 1024px) 100vw, 704px" srcSet="https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=280&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=aa81f9caa71de44fc783ac9feaf274c7 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=560&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=1c80e906ecb1e3e9275cc7adb4ac9915 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=840&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=aebe6c8ce0d2f78e9d7000e730c0e39e 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=1100&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=1270ef1211d503f45845ed49d3197836 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=1650&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=83baa449920559a120ca03b4d5f8cbdb 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=2500&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=d8b29f9d96747e4e91e2a5608f611a1f 2500w" data-optimize="true" style="aspect-ratio:1142 / 1360"/></picture></span></span></div><div class="absolute inset-0 pointer-events-none border border-black/5 rounded-2xl dark:border-white/5"></div><figcaption class="relative rounded-2xl text-center mt-3 pt-0 px-8 pb-2 text-sm text-gray-700 dark:text-gray-400 [&amp;_p]:m-0 [&amp;_a]:font-semibold [&amp;_a]:no-underline [&amp;_a]:border-b [&amp;_a]:border-primary [&amp;_a:hover]:border-b-2 dark:[&amp;_a]:text-white dark:[&amp;_a]:border-primary-light" data-component-part="frame-caption"><p>Page picker interface</p></figcaption></figure></div>
<span data-as="p">Users can select which pages to give the connection access to, including both private and public pages available to them. Parent pages can be selected to quickly provide access to child pages, as giving access to a parent page will provide access to all available child pages. Users can return to this view at a later time to update access settings if circumstances change.</span>
<span data-as="p">If the user clicks <code>Allow access</code>, they are then redirected to the <code>redirect_uri</code> with a temporary authorization <code>code</code>. If the user denies access, they are redirected to the <code>redirect_uri</code> with an <code>error</code> query parameter.</span>
<span data-as="p">If the user clicks <code>Allow access</code> and the rest of the auth flow is not completed, the connection will <em>not</em> have access to the pages that were selected.</span>
<h4 class="flex whitespace-pre-wrap group font-semibold" id="prompt-for-a-connection-with-a-notion-template-option"><div class="absolute" tabindex="-1"><a href="#prompt-for-a-connection-with-a-notion-template-option" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Prompt for a connection with a Notion template option</span></h4>
<span data-as="p">Public connections offer the option of providing a public Notion page to use as a template during the auth flow.</span>
<span data-as="p">To add a template to your workspace, complete the following steps:</span>
<ul>
<li>Choose a public page in your workspace that you want users to be able to duplicate.</li>
<li>Navigate to your connection in the <a>Developer portal</a> and open the <strong>Configuration</strong> tab, then scroll to the Basic information section.</li>
<li>Scroll to the bottom of your distribution settings and add the URL of the Notion page you selected to the <strong>Notion URL for optional template</strong> input.</li>
</ul>
<div><figure data-name="frame" class="frame p-2 not-prose relative bg-gray-50/50 rounded-2xl overflow-hidden dark:bg-gray-800/25 print:print-color-exact"><div style="background-position:10px 10px" class="absolute inset-0 bg-grid-neutral-200/20 [mask-image:linear-gradient(0deg,#fff,rgba(255,255,255,0.6))] dark:bg-grid-white/5 dark:[mask-image:linear-gradient(0deg,rgba(255,255,255,0.1),rgba(255,255,255,0.5))] print:print-color-exact"></div><div class="relative rounded-xl overflow-hidden flex justify-center"><span aria-owns="rmiz-modal-" data-rmiz=""><span data-rmiz-content="not-found" style="visibility:visible"><picture class="contents"><img data-path="images/docs/b4ae671-integrations11.png" src="https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=d83bd80077b7fb6bdab6c38cbadb6579" class="object-contain" width="1198" height="699" decoding="async" sizes="(max-width: 1024px) 100vw, 704px" srcSet="https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=280&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=a5d2e397a2888aae9d0b3a20a6ab3a57 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=560&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=39ca4045f429cb85c91546e0c1e0fecf 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=840&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=9cdf90494f856ce84fab433445005dc3 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=1100&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=3c3356f04b32cb39e7c3c6891419f945 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=1650&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=45683f06ef94b549f0bb5f03e6b59862 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=2500&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=f5cd7e893edd0864dc2aaaaef09cc031 2500w" data-optimize="true" style="aspect-ratio:1198 / 699"/></picture></span></span></div><div class="absolute inset-0 pointer-events-none border border-black/5 rounded-2xl dark:border-white/5"></div><figcaption class="relative rounded-2xl text-center mt-3 pt-0 px-8 pb-2 text-sm text-gray-700 dark:text-gray-400 [&amp;_p]:m-0 [&amp;_a]:font-semibold [&amp;_a]:no-underline [&amp;_a]:border-b [&amp;_a]:border-primary [&amp;_a:hover]:border-b-2 dark:[&amp;_a]:text-white dark:[&amp;_a]:border-primary-light" data-component-part="frame-caption"><p>Notion URL for optional template input in connection settings.</p></figcaption></figure></div>
<span data-as="p">Once this URL is added, your auth flow prompt appearance will be updated.</span>
<span data-as="p">Going back to your prompt view, if the connection offers a Notion template option, the first step in the permissions flow will describe the connection <a class="link" href="/reference/capabilities">capabilities</a>. This is presented to the user as what the connection would be able to do in the workspace, and it prompts the user to click <code>Next</code>.</span>
<div><figure data-name="frame" class="frame p-2 not-prose relative bg-gray-50/50 rounded-2xl overflow-hidden dark:bg-gray-800/25 print:print-color-exact"><div style="background-position:10px 10px" class="absolute inset-0 bg-grid-neutral-200/20 [mask-image:linear-gradient(0deg,#fff,rgba(255,255,255,0.6))] dark:bg-grid-white/5 dark:[mask-image:linear-gradient(0deg,rgba(255,255,255,0.1),rgba(255,255,255,0.5))] print:print-color-exact"></div><div class="relative rounded-xl overflow-hidden flex justify-center"><span aria-owns="rmiz-modal-" data-rmiz=""><span data-rmiz-content="not-found" style="visibility:visible"><picture class="contents"><img data-path="images/docs/77076c7-template_prompt1.png" src="https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=bce36d9f1a69a618dc886d1baf46d50f" class="object-contain" width="1102" height="1462" decoding="async" sizes="(max-width: 1024px) 100vw, 704px" srcSet="https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=280&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=6ddc1e0e9c726f155c7bac0a0fe0bed0 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=560&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=a1ae1eb9f748c32af5e88111d45d1af1 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=840&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=3af09c117c8a03d74983a9c55cded60c 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=1100&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=73e048e5cf0e2520cf8e218d4763ecd8 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=1650&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=56472acfdbdfe57e8e8ede6abee82048 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=2500&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=885dc89b073e5019cd12152a24e45550 2500w" data-optimize="true" style="aspect-ratio:1102 / 1462"/></picture></span></span></div><div class="absolute inset-0 pointer-events-none border border-black/5 rounded-2xl dark:border-white/5"></div><figcaption class="relative rounded-2xl text-center mt-3 pt-0 px-8 pb-2 text-sm text-gray-700 dark:text-gray-400 [&amp;_p]:m-0 [&amp;_a]:font-semibold [&amp;_a]:no-underline [&amp;_a]:border-b [&amp;_a]:border-primary [&amp;_a:hover]:border-b-2 dark:[&amp;_a]:text-white dark:[&amp;_a]:border-primary-light" data-component-part="frame-caption"><p>Prompt for a connection with a Notion template option</p></figcaption></figure></div>
<span data-as="p">In the next step, a user can either choose to duplicate the template that you provided or to select existing pages to share with the connection.</span>
<div><figure data-name="frame" class="frame p-2 not-prose relative bg-gray-50/50 rounded-2xl overflow-hidden dark:bg-gray-800/25 print:print-color-exact"><div style="background-position:10px 10px" class="absolute inset-0 bg-grid-neutral-200/20 [mask-image:linear-gradient(0deg,#fff,rgba(255,255,255,0.6))] dark:bg-grid-white/5 dark:[mask-image:linear-gradient(0deg,rgba(255,255,255,0.1),rgba(255,255,255,0.5))] print:print-color-exact"></div><div class="relative rounded-xl overflow-hidden flex justify-center"><span aria-owns="rmiz-modal-" data-rmiz=""><span data-rmiz-content="not-found" style="visibility:visible"><picture class="contents"><img data-path="images/docs/9788bdb-template_prompt_2.png" src="https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=d5ff31ef9083f78b60e615758b6f580e" class="object-contain" width="1052" height="1546" decoding="async" sizes="(max-width: 1024px) 100vw, 704px" srcSet="https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=280&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=d0bcebf97c2d2d47298b5eb3ed8e9667 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=560&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=0df02c964b4ba61b341057ce4ca2b7c1 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=840&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=edf55877ba383f2192ad830326ca6885 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=1100&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=c236950de91a26a9329f68e904b29565 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=1650&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=ad655a24827c812ebed25fc3e3a7edd6 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=2500&amp;fit=max&amp;auto=format&amp;n=9OFhQspLr8njnajd&amp;q=85&amp;s=2ca3fc12da1dc649db7f8128100996bf 2500w" data-optimize="true" style="aspect-ratio:1052 / 1546"/></picture></span></span></div><div class="absolute inset-0 pointer-events-none border border-black/5 rounded-2xl dark:border-white/5"></div><figcaption class="relative rounded-2xl text-center mt-3 pt-0 px-8 pb-2 text-sm text-gray-700 dark:text-gray-400 [&amp;_p]:m-0 [&amp;_a]:font-semibold [&amp;_a]:no-underline [&amp;_a]:border-b [&amp;_a]:border-primary [&amp;_a:hover]:border-b-2 dark:[&amp;_a]:text-white dark:[&amp;_a]:border-primary-light" data-component-part="frame-caption"><p>A user can select to duplicate a template or to share existing pages with the connection</p></figcaption></figure></div>
<span data-as="p">If the user chooses to duplicate the template, then the following happens automatically:</span>
<ul>
<li>The connection is added to the user’s workspace.</li>
<li>The template is duplicated as a new page in the workspace.</li>
<li>The new page is shared with the connection.</li>
</ul>
<span data-as="p">If the user chooses to select pages to share with the connection, then they continue to the page picker interface that’s part of the <a href="#prompt-for-a-standard-connection-with-no-template-option-default" class="link">prompt for a standard connection</a>.</span>
<div role="note" aria-label="Note" class="callout my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border border-blue-200 bg-blue-50 dark:border-blue-900 dark:bg-blue-600/20" data-callout-type="note"><div class="mt-0.5 w-4" data-component-part="callout-icon"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 text-blue-800 dark:text-blue-300"><path d="M 9 1.6714 C 13.0371 1.6714 16.3286 4.9629 16.3286 9 C 16.3286 13.0371 13.0371 16.3286 9 16.3286 C 7.0574 16.3252 5.1953 15.552 3.8217 14.1783 C 2.448 12.8047 1.6748 10.9426 1.6714 9 C 1.6714 4.9629 4.9629 1.6714 9 1.6714 Z M 9 0 C 4.0371 0 0 4.0371 0 9 C 0 13.9629 4.0371 18 9 18 C 13.9629 18 18 13.9629 18 9 C 18 4.0371 13.9629 0 9 0 Z M 10.2857 3.8571 H 7.7143 V 10.2857 H 10.2857 V 3.8571 Z M 10.2857 11.5714 H 7.7143 V 14.1429 H 10.2857 V 11.5714 Z" fill="currentColor" stroke="none" fill-rule="evenodd" clip-rule="evenodd"></path></svg></div><div class="text-sm prose dark:prose-invert min-w-0 w-full [&amp;_kbd]:bg-background-light dark:[&amp;_kbd]:bg-background-dark [&amp;_code]:text-current! [&amp;_kbd]:text-current! [&amp;_a]:text-current! [&amp;_a]:border-current [&amp;_strong]:text-current! text-blue-800 dark:text-blue-300" data-component-part="callout-content"><span data-as="p">After a user authorizes a public connection, only that user is able to interact or share pages and databases with the connection. Unlike internal connections, if multiple members in a workspace want to use a public connection, each prospective user needs to individually follow the auth flow for the connection.</span></div></div>
<span data-as="p"><strong>User authorization failures</strong></span>
<span data-as="p">User authorization failures can happen. If a user chooses to <code>Cancel</code> the request, then a failure is triggered. Build your connection to handle these cases gracefully, as needed.</span>
<span data-as="p">In some cases, Notion redirects the user to the <code>redirect_uri</code> that you set up when you created the public connection, along with an <code>error</code> query parameter. Notion uses the common <a href="https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2.1" target="_blank" rel="noreferrer" class="link">error codes in the OAuth specification</a>. Use the <code>error</code> code to create a helpful prompt for the user when they’re redirected here.</span>
<h3 class="flex whitespace-pre-wrap group font-semibold" id="step-2-notion-redirects-the-user-to-the-connection’s-redirect-uri-and-includes-a-code-parameter"><div class="absolute" tabindex="-1"><a href="#step-2-notion-redirects-the-user-to-the-connection’s-redirect-uri-and-includes-a-code-parameter" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Step 2 - Notion redirects the user to the connection’s redirect URI and includes a <code>code</code> parameter</span></h3>
<span data-as="p">When you first created the public connection, you specified a redirect URI. If the user follows the prompt to <code>Allow access</code> for the connection, then Notion generates a temporary <code>code</code> and sends a request to the redirect URI with the following information in the query string:</span>
<!-- --><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" data-table-wrapper="true" class="min-w-0 [--page-padding:20px] flex w-[calc(100%+(var(--page-padding)*2))] my-[1em] py-[1em] -mx-(--page-padding) max-w-none [contain:inline-size]"><div role="region" data-id="base-ui-_R_2flcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport" aria-label="Scrollable table"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="flex"><div class="px-(--page-padding) grow max-w-none table"><table class="m-0 min-w-full w-full max-w-none table [&amp;_td]:min-w-[150px] [&amp;_th]:text-left [&amp;_td[data-numeric]]:tabular-nums"><thead><tr><th style="text-align:left">Parameter</th><th style="text-align:left">Description</th><th style="text-align:left">Required</th></tr></thead><tbody><tr><td style="text-align:left"><code>code</code></td><td style="text-align:left">A temporary authorization code.</td><td style="text-align:left">✅</td></tr><tr><td style="text-align:left"><code>state</code></td><td style="text-align:left">The value provided by the connection when the user was <a href="#prompt-for-a-standard-connection-with-no-template-option-default" class="link">prompted for access</a>.</td><td style="text-align:left"></td></tr></tbody></table></div></div></div></div>
<span data-as="p">To complete the next step, retrieve the <code>code</code> query parameter provided in the redirect. The retrieval method varies depending on your app’s tech stack.</span>
<span data-as="p">In a React component, for example, the query parameters are made available through the <code>useRouter()</code> hook:</span>
<div data-orientation="horizontal" data-activation-direction="none" class="code-group p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0 bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light"><div class="flex items-center justify-between gap-2 relative pr-2.5" data-component-part="code-group-tab-bar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" class="min-w-0 flex-1 w-0 rounded-tl-xl"><div role="presentation" data-id="base-ui-_R_2milcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content"><div data-orientation="horizontal" data-activation-direction="none" role="tablist" aria-label="Code examples" class="text-xs leading-6 gap-1 flex"><button type="button" data-active="" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="true" id="base-ui-_R_bamilcrbav5tccsnisnpfiutb_" data-composite-item-active="" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-2 text-primary dark:text-primary-light"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10">JavaScript</div><div class="absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"></div></button></div></div></div></div><div class="flex items-center justify-end shrink-0 gap-1.5"><div class="z-10 select-none" id="base-ui-_R_qkmilcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="z-10 select-none" id="base-ui-_R_qsmilcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_r4milcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-javascript-code-export_default_funct"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="flex flex-1 overflow-hidden"><div data-orientation="horizontal" data-activation-direction="none" id="base-ui-_R_36ilcrbav5tccsnisnpfiutb_" role="tabpanel" tabindex="0" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white"><div role="presentation" data-id="base-ui-_R_f6ilcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="javascript"><code language="javascript" numberOfLines="5"><span class="line"><span style="color:#CF222E;--shiki-dark:#C586C0">export</span><span style="color:#CF222E;--shiki-dark:#C586C0"> default</span><span style="color:#CF222E;--shiki-dark:#569CD6"> function</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> AuthRedirectPage</span><span style="color:#953800;--shiki-dark:#D4D4D4">() </span><span style="color:#1F2328;--shiki-dark:#D4D4D4">{</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">  const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> router</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> useRouter</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">();</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">  const</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> { </span><span style="color:#0550AE;--shiki-dark:#4FC1FF">code</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> } </span><span style="color:#CF222E;--shiki-dark:#D4D4D4">=</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> router</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">query</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">;</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#D4D4D4">  ...</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">}</span></span>
</code></pre></div></div></div></div><div class="print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div>
<h3 class="flex whitespace-pre-wrap group font-semibold" id="step-3-send-the-code-in-a-post-request-to-the-notion-api"><div class="absolute" tabindex="-1"><a href="#step-3-send-the-code-in-a-post-request-to-the-notion-api" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Step 3 - Send the <code>code</code> in a <code>POST</code> request to the Notion API</span></h3>
<span data-as="p">The connection needs to exchange the temporary <code>code</code> for an <code>access_token</code>.</span>
<span data-as="p">To set up this step, retrieve the <code>code</code> from the redirect URI.</span>
<span data-as="p">Next, send the <code>code</code> as part of a <code>POST</code> request to Notion’s token endpoint: <a href="https://api.notion.com/v1/oauth/token" target="_blank" rel="noreferrer" class="link">https://api.notion.com/v1/oauth/token</a>.</span>
<span data-as="p">This endpoint is described in more detail in the API reference docs for <a class="link" href="/reference/create-a-token">creating a token</a>.</span>
<span data-as="p">The request is authorized using HTTP Basic Authentication. The credential is a colon-delimited combination of the connection’s <code>CLIENT_ID</code> and <code>CLIENT_SECRET</code>, like so:</span>
<div class="code-block mt-5 mb-8 not-prose rounded-2xl relative group min-w-0 print:print-color-exact text-gray-950 dark:text-gray-50 codeblock-light border border-gray-950/10 dark:border-white/10 dark:twoslash-dark bg-transparent dark:bg-transparent" numberOfLines="1" language="shellscript"><div data-floating-buttons="true" class="absolute top-3 right-4 flex items-center gap-1.5 print:hidden"><div class="z-10 select-none" id="base-ui-_R_3amplcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="z-10 select-none" id="base-ui-_R_3cmplcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_3emplcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-shellscript-code-CLIENT_ID_CLIENT_SEC"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:auto;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-2xl bg-white"><div role="presentation" data-id="base-ui-_R_36plcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre leading-6"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="shellscript"><code language="shellscript" numberOfLines="1"><span class="line"><span style="color:#953800;--shiki-dark:#DCDCAA">CLIENT_ID:CLIENT_SECRET</span></span>
</code></pre></div></div></div></div><div class="print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div>
<span data-as="p">Find both of these values in the <a>Developer portal</a>.</span>
<span data-as="p">Note that in <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication" target="_blank" rel="noreferrer" class="link">HTTP Basic Authentication</a>, credentials are <code>base64</code> encoded before being added to the <code>Authorization</code> header.</span>
<span data-as="p">The body of the request contains the following JSON-encoded fields:</span>
<!-- --><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" data-table-wrapper="true" class="min-w-0 [--page-padding:20px] flex w-[calc(100%+(var(--page-padding)*2))] my-[1em] py-[1em] -mx-(--page-padding) max-w-none [contain:inline-size]"><div role="region" data-id="base-ui-_R_2tlcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport" aria-label="Scrollable table"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="flex"><div class="px-(--page-padding) grow max-w-none table"><table class="m-0 min-w-full w-full max-w-none table [&amp;_td]:min-w-[150px] [&amp;_th]:text-left [&amp;_td[data-numeric]]:tabular-nums"><thead><tr><th style="text-align:left">Field</th><th style="text-align:left">Type</th><th style="text-align:left">Description</th><th style="text-align:left">Required</th></tr></thead><tbody><tr><td style="text-align:left"><code>&quot;grant_type&quot;</code></td><td style="text-align:left"><code>string</code></td><td style="text-align:left">Always use <code>&quot;authorization_code&quot;</code>.</td><td style="text-align:left">✅</td></tr><tr><td style="text-align:left"><code>&quot;code&quot;</code></td><td style="text-align:left"><code>string</code></td><td style="text-align:left">The temporary authorization code received in the incoming request to the <code>&quot;redirect_uri&quot;</code>.</td><td style="text-align:left">✅</td></tr><tr><td style="text-align:left"><code>&quot;redirect_uri&quot;</code></td><td style="text-align:left"><code>string</code></td><td style="text-align:left">The <code>&quot;redirect_uri&quot;</code> that was provided in the Authorization step.</td><td style="text-align:left">✅/❌* <br/><br/> * If the redirect URI was supplied as a query param in the Authorization URL, this field is required. If there are more than one redirect URIs included in your connection settings, this field is required. Otherwise, it is not allowed. Learn more in the <a class="link" href="/reference/create-a-token">Create a token page</a>.</td></tr></tbody></table></div></div></div></div>
<span data-as="p">The following is an example request to exchange the authorization code for an access token:</span>
<div data-orientation="horizontal" data-activation-direction="none" class="code-group p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0 bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light"><div class="flex items-center justify-between gap-2 relative pr-2.5" data-component-part="code-group-tab-bar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" class="min-w-0 flex-1 w-0 rounded-tl-xl"><div role="presentation" data-id="base-ui-_R_2mvlcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content"><div data-orientation="horizontal" data-activation-direction="none" role="tablist" aria-label="Code examples" class="text-xs leading-6 gap-1 flex"><button type="button" data-active="" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="true" id="base-ui-_R_bamvlcrbav5tccsnisnpfiutb_" data-composite-item-active="" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-2 text-primary dark:text-primary-light"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10">HTTP</div><div class="absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"></div></button></div></div></div></div><div class="flex items-center justify-end shrink-0 gap-1.5"><div class="z-10 select-none" id="base-ui-_R_qkmvlcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="z-10 select-none" id="base-ui-_R_qsmvlcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_r4mvlcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-http-code-POST__v1_oauth_token"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="flex flex-1 overflow-hidden"><div data-orientation="horizontal" data-activation-direction="none" id="base-ui-_R_36vlcrbav5tccsnisnpfiutb_" role="tabpanel" tabindex="0" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white"><div role="presentation" data-id="base-ui-_R_f6vlcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="http"><code language="http" numberOfLines="5"><span class="line"><span style="color:#CF222E;--shiki-dark:#C586C0">POST</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> /v1/oauth/token </span><span style="color:#CF222E;--shiki-dark:#569CD6">HTTP</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">/</span><span style="color:#0550AE;--shiki-dark:#B5CEA8">1.1</span></span>
<span class="line"><span style="color:#116329;--shiki-dark:#569CD6">Authorization</span><span style="color:#CF222E;--shiki-dark:#569CD6">:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> Basic &quot;$CLIENT_ID:$CLIENT_SECRET&quot;</span></span>
<span class="line"><span style="color:#116329;--shiki-dark:#569CD6">Content-Type</span><span style="color:#CF222E;--shiki-dark:#569CD6">:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> application/json</span></span>
<span class="line"></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">{</span><span style="color:#116329;--shiki-dark:#9CDCFE">&quot;grant_type&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">:</span><span style="color:#0A3069;--shiki-dark:#CE9178">&quot;authorization_code&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span><span style="color:#116329;--shiki-dark:#9CDCFE">&quot;code&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">:</span><span style="color:#0A3069;--shiki-dark:#CE9178">&quot;e202e8c9-0990-40af-855f-ff8f872b1ec6&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">, </span><span style="color:#116329;--shiki-dark:#9CDCFE">&quot;redirect_uri&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">:</span><span style="color:#0A3069;--shiki-dark:#CE9178">&quot;https://example.com/auth/notion/callback&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">}</span></span>
</code></pre></div></div></div></div><div class="print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div>
<span data-as="p">The Node-equivalent of this example would look something like this:</span>
<div data-orientation="horizontal" data-activation-direction="none" class="code-group p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0 bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light"><div class="flex items-center justify-between gap-2 relative pr-2.5" data-component-part="code-group-tab-bar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" class="min-w-0 flex-1 w-0 rounded-tl-xl"><div role="presentation" data-id="base-ui-_R_2n1lcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content"><div data-orientation="horizontal" data-activation-direction="none" role="tablist" aria-label="Code examples" class="text-xs leading-6 gap-1 flex"><button type="button" data-active="" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="true" id="base-ui-_R_ban1lcrbav5tccsnisnpfiutb_" data-composite-item-active="" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-2 text-primary dark:text-primary-light"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10">JavaScript</div><div class="absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"></div></button></div></div></div></div><div class="flex items-center justify-end shrink-0 gap-1.5"><div class="z-10 select-none" id="base-ui-_R_qkn1lcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="z-10 select-none" id="base-ui-_R_qsn1lcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_r4n1lcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-javascript-code-____const_clientId__"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="flex flex-1 overflow-hidden"><div data-orientation="horizontal" data-activation-direction="none" id="base-ui-_R_371lcrbav5tccsnisnpfiutb_" role="tabpanel" tabindex="0" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white"><div role="presentation" data-id="base-ui-_R_f71lcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="javascript"><code language="javascript" numberOfLines="22"><span class="line"><span style="color:#CF222E;--shiki-dark:#D4D4D4">...</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> clientId</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> process</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">env</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#0550AE;--shiki-dark:#4FC1FF">OAUTH_CLIENT_ID</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">;</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> clientSecret</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> process</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">env</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#0550AE;--shiki-dark:#4FC1FF">OAUTH_CLIENT_SECRET</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">;</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> redirectUri</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> process</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">env</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#0550AE;--shiki-dark:#4FC1FF">OAUTH_REDIRECT_URI</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6E7781;--shiki-dark:#6A9955">// encode in base 64</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> encoded</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> btoa</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#0A3069;--shiki-dark:#CE9178">`</span><span style="color:#0A3069;--shiki-dark:#569CD6">${</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">clientId</span><span style="color:#0A3069;--shiki-dark:#569CD6">}</span><span style="color:#0A3069;--shiki-dark:#CE9178">:</span><span style="color:#0A3069;--shiki-dark:#569CD6">${</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">clientSecret</span><span style="color:#0A3069;--shiki-dark:#569CD6">}</span><span style="color:#0A3069;--shiki-dark:#CE9178">`</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> response</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#CF222E;--shiki-dark:#C586C0"> await</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> fetch</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#0A3069;--shiki-dark:#CE9178">&quot;https://api.notion.com/v1/oauth/token&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">, {</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">	method:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &quot;POST&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">	headers:</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> {</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">	Accept:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &quot;application/json&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#0A3069;--shiki-dark:#CE9178">	&quot;Content-Type&quot;</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &quot;application/json&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">	Authorization:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> `Basic </span><span style="color:#0A3069;--shiki-dark:#569CD6">${</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">encoded</span><span style="color:#0A3069;--shiki-dark:#569CD6">}</span><span style="color:#0A3069;--shiki-dark:#CE9178">`</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">},</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">	body:</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> JSON</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">stringify</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">({</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">		grant_type:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &quot;authorization_code&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">		code:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &quot;your-temporary-code&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">		redirect_uri:</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> redirectUri</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">	}),</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">});</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#D4D4D4">...</span></span>
</code></pre></div></div></div></div><div class="print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div>
<h3 class="flex whitespace-pre-wrap group font-semibold" id="step-4-notion-responds-with-an-access_token--refresh_token-and-additional-information"><div class="absolute" tabindex="-1"><a href="#step-4-notion-responds-with-an-access_token--refresh_token-and-additional-information" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Step 4 - Notion responds with an <code>access_token</code> , <code>refresh_token</code>, and additional information</span></h3>
<span data-as="p">Notion responds to the request with an <code>access_token</code>, <code>refresh_token</code>, and additional information. The <code>access_token</code> will be used to authenticate subsequent Notion REST API requests. The <code>refresh_token</code> will be used to refresh the access token, which generates a new <code>access_token</code>.</span>
<span data-as="p">The response contains the following JSON-encoded fields:</span>
<!-- --><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" data-table-wrapper="true" class="min-w-0 [--page-padding:20px] flex w-[calc(100%+(var(--page-padding)*2))] my-[1em] py-[1em] -mx-(--page-padding) max-w-none [contain:inline-size]"><div role="region" data-id="base-ui-_R_35lcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport" aria-label="Scrollable table"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="flex"><div class="px-(--page-padding) grow max-w-none table"><table class="m-0 min-w-full w-full max-w-none table [&amp;_td]:min-w-[150px] [&amp;_th]:text-left [&amp;_td[data-numeric]]:tabular-nums"><thead><tr><th style="text-align:left">Field</th><th style="text-align:left">Type</th><th style="text-align:left">Description</th><th style="text-align:left">Not null</th></tr></thead><tbody><tr><td style="text-align:left"><code>&quot;access_token&quot;</code></td><td style="text-align:left"><code>string</code></td><td style="text-align:left">An access token used to authorize requests to the Notion API.</td><td style="text-align:left">✅</td></tr><tr><td style="text-align:left"><code>&quot;refresh_token&quot;</code></td><td style="text-align:left"><code>string</code></td><td style="text-align:left">A refresh token used to generate a new access token</td><td style="text-align:left">✅</td></tr><tr><td style="text-align:left"><code>&quot;bot_id&quot;</code></td><td style="text-align:left"><code>string</code></td><td style="text-align:left">An identifier for this authorization.</td><td style="text-align:left">✅</td></tr><tr><td style="text-align:left"><code>&quot;duplicated_template_id&quot;</code></td><td style="text-align:left"><code>string</code></td><td style="text-align:left">The ID of the new page created in the user’s workspace. The new page is a duplicate of the template that the developer provided with the connection. If the developer didn’t provide a template for the connection, then the value is <code>null</code>.</td><td style="text-align:left"></td></tr><tr><td style="text-align:left"><code>&quot;owner&quot;</code></td><td style="text-align:left"><code>object</code></td><td style="text-align:left">An object containing information about who can view and share this connection. A <a class="link" href="/reference/user">user object</a> is returned, representing the user who authorized the connection.</td><td style="text-align:left">✅</td></tr><tr><td style="text-align:left"><code>&quot;workspace_icon&quot;</code></td><td style="text-align:left"><code>string</code></td><td style="text-align:left">A URL to an image that can be used to display this authorization in the UI.</td><td style="text-align:left"></td></tr><tr><td style="text-align:left"><code>&quot;workspace_id&quot;</code></td><td style="text-align:left"><code>string</code></td><td style="text-align:left">The ID of the workspace where this authorization took place.</td><td style="text-align:left">✅</td></tr><tr><td style="text-align:left"><code>&quot;workspace_name&quot;</code></td><td style="text-align:left"><code>string</code></td><td style="text-align:left">A human-readable name that can be used to display this authorization in the UI.</td><td style="text-align:left"></td></tr></tbody></table></div></div></div></div>
<span data-as="p"><strong>Token request failures</strong></span>
<span data-as="p">If something goes wrong when the connection attempts to exchange the <code>code</code> for an <code>access_token</code>, then the response contains a JSON-encoded body with an <code>&quot;error&quot;</code> field. Notion uses the common <a href="https://datatracker.ietf.org/doc/html/rfc6749#section-5.2" target="_blank" rel="noreferrer" class="link">error codes from the OAuth specification</a>.</span>
<h3 class="flex whitespace-pre-wrap group font-semibold" id="step-5-the-connection-stores-the-access_token-and-refresh_token-for-future-requests"><div class="absolute" tabindex="-1"><a href="#step-5-the-connection-stores-the-access_token-and-refresh_token-for-future-requests" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Step 5 - The connection stores the <code>access_token</code> and <code>refresh_token</code> for future requests</span></h3>
<span data-as="p">Set up a way for your connection to store both the <code>access_token</code> and <code>refresh_token</code> that it receives. The <code>access_token</code> is used to make authorized requests to the Notion API, and the <code>refresh_token</code> is used to generate a new <code>access_token</code>.</span>
<span data-as="p"><strong>Tips for storing and using token access</strong></span>
<ul>
<li>Setting up a database is a typical solution for storing access tokens. If you’re using a database, then build relations between an <code>access_token</code>, <code>refresh_token</code>, and the corresponding Notion resources that your connection accesses with that token. For example, if you store a Notion database or page ID, relate those records with the correct <code>access_token</code> that you use to authorize requests to read or write to that database or page, and the <code>refresh_token</code> for ongoing token lifecycle support..</li>
<li>Store all of the information that your connection receives with the <code>access_token</code> and <code>refresh_token</code>. You never know when your UI or product requirements might change and you’ll need this data. It’s really hard (or impossible) to send users to repeat the authorization flow to generate the information again.</li>
<li>The <code>bot_id</code> returned along with your tokens identifies the Notion bot for the authorization. Store the token pair from each successful authorization response. This includes re-authorization of the same connection, where Notion may return a new <code>access_token</code> and <code>refresh_token</code>.</li>
</ul>
<h3 class="flex whitespace-pre-wrap group font-semibold" id="step-6-refreshing-an-access-token"><div class="absolute" tabindex="-1"><a href="#step-6-refreshing-an-access-token" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Step 6 - Refreshing an access token</span></h3>
<span data-as="p">Refreshing an access token will generate a new access token and a new refresh token.</span>
<span data-as="p">Send the <code>refresh_token</code> provided from <a href="#step-4-notion-responds-with-an-access_token--refresh_token-and-additional-information" class="link">Step 4</a> as part of a <code>POST</code> request to Notion’s token endpoint: <a href="https://api.notion.com/v1/oauth/token" target="_blank" rel="noreferrer" class="link">https://api.notion.com/v1/oauth/token</a>.</span>
<span data-as="p">This endpoint is described in more detail in the API reference docs for <a class="link" href="/reference/refresh-a-token">refreshing a token</a>.</span>
<span data-as="p">The request is authorized using HTTP Basic Authentication. The credential is a colon-delimited combination of the connection’s <code>CLIENT_ID</code> and <code>CLIENT_SECRET</code>, like so:</span>
<div class="code-block mt-5 mb-8 not-prose rounded-2xl relative group min-w-0 print:print-color-exact text-gray-950 dark:text-gray-50 codeblock-light border border-gray-950/10 dark:border-white/10 dark:twoslash-dark bg-transparent dark:bg-transparent" numberOfLines="1" language="shellscript"><div data-floating-buttons="true" class="absolute top-3 right-4 flex items-center gap-1.5 print:hidden"><div class="z-10 select-none" id="base-ui-_R_3anhlcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="z-10 select-none" id="base-ui-_R_3cnhlcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_3enhlcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-shellscript-code-CLIENT_ID_CLIENT_SEC"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:auto;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-2xl bg-white"><div role="presentation" data-id="base-ui-_R_37hlcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre leading-6"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="shellscript"><code language="shellscript" numberOfLines="1"><span class="line"><span style="color:#953800;--shiki-dark:#DCDCAA">CLIENT_ID:CLIENT_SECRET</span></span>
</code></pre></div></div></div></div><div class="print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div>
<span data-as="p">Find both of these values in the <a>Developer portal</a>.</span>
<span data-as="p">Note that in <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication" target="_blank" rel="noreferrer" class="link">HTTP Basic Authentication</a>, credentials are <code>base64</code> encoded before being added to the <code>Authorization</code> header.</span>
<span data-as="p">The body of the request contains the following JSON-encoded fields:</span>
<!-- --><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" data-table-wrapper="true" class="min-w-0 [--page-padding:20px] flex w-[calc(100%+(var(--page-padding)*2))] my-[1em] py-[1em] -mx-(--page-padding) max-w-none [contain:inline-size]"><div role="region" data-id="base-ui-_R_3llcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport" aria-label="Scrollable table"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="flex"><div class="px-(--page-padding) grow max-w-none table"><table class="m-0 min-w-full w-full max-w-none table [&amp;_td]:min-w-[150px] [&amp;_th]:text-left [&amp;_td[data-numeric]]:tabular-nums"><thead><tr><th style="text-align:left">Field</th><th style="text-align:left">Type</th><th style="text-align:left">Description</th><th style="text-align:left">Required</th></tr></thead><tbody><tr><td style="text-align:left"><code>&quot;grant_type&quot;</code></td><td style="text-align:left"><code>string</code></td><td style="text-align:left">Always use <code>&quot;refresh_token&quot;</code>.</td><td style="text-align:left">✅</td></tr><tr><td style="text-align:left"><code>&quot;refresh_token&quot;</code></td><td style="text-align:left"><code>string</code></td><td style="text-align:left">The <code>&quot;refresh_token&quot;</code> returned in the Authorization step.</td><td style="text-align:left">✅</td></tr></tbody></table></div></div></div></div>
<span data-as="p">The following is an example request to exchange the <code>refresh_token</code> for a new access token and new refresh token</span>
<div data-orientation="horizontal" data-activation-direction="none" class="code-group p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0 bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light"><div class="flex items-center justify-between gap-2 relative pr-2.5" data-component-part="code-group-tab-bar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" class="min-w-0 flex-1 w-0 rounded-tl-xl"><div role="presentation" data-id="base-ui-_R_2nnlcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content"><div data-orientation="horizontal" data-activation-direction="none" role="tablist" aria-label="Code examples" class="text-xs leading-6 gap-1 flex"><button type="button" data-active="" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="true" id="base-ui-_R_bannlcrbav5tccsnisnpfiutb_" data-composite-item-active="" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-2 text-primary dark:text-primary-light"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10">HTTP</div><div class="absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"></div></button></div></div></div></div><div class="flex items-center justify-end shrink-0 gap-1.5"><div class="z-10 select-none" id="base-ui-_R_qknnlcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="z-10 select-none" id="base-ui-_R_qsnnlcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_r4nnlcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-http-code-POST__v1_oauth_token"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="flex flex-1 overflow-hidden"><div data-orientation="horizontal" data-activation-direction="none" id="base-ui-_R_37nlcrbav5tccsnisnpfiutb_" role="tabpanel" tabindex="0" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white"><div role="presentation" data-id="base-ui-_R_f7nlcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="http"><code language="http" numberOfLines="5"><span class="line"><span style="color:#CF222E;--shiki-dark:#C586C0">POST</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> /v1/oauth/token </span><span style="color:#CF222E;--shiki-dark:#569CD6">HTTP</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">/</span><span style="color:#0550AE;--shiki-dark:#B5CEA8">1.1</span></span>
<span class="line"><span style="color:#116329;--shiki-dark:#569CD6">Authorization</span><span style="color:#CF222E;--shiki-dark:#569CD6">:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> Basic &quot;$CLIENT_ID:$CLIENT_SECRET&quot;</span></span>
<span class="line"><span style="color:#116329;--shiki-dark:#569CD6">Content-Type</span><span style="color:#CF222E;--shiki-dark:#569CD6">:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> application/json</span></span>
<span class="line"></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">{</span><span style="color:#116329;--shiki-dark:#9CDCFE">&quot;grant_type&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">:</span><span style="color:#0A3069;--shiki-dark:#CE9178">&quot;refresh_token&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span><span style="color:#116329;--shiki-dark:#9CDCFE">&quot;refresh_token&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">:</span><span style="color:#0A3069;--shiki-dark:#CE9178">&quot;nrt_4991090011501Ejc6Xn4sHguI7jZIN449mKe9PRhpMfNK&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">}</span></span>
</code></pre></div></div></div></div><div class="print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div>
<span data-as="p">The Node-equivalent of this example would look something like this:</span>
<div data-orientation="horizontal" data-activation-direction="none" class="code-group p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0 bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light"><div class="flex items-center justify-between gap-2 relative pr-2.5" data-component-part="code-group-tab-bar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" class="min-w-0 flex-1 w-0 rounded-tl-xl"><div role="presentation" data-id="base-ui-_R_2nplcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content"><div data-orientation="horizontal" data-activation-direction="none" role="tablist" aria-label="Code examples" class="text-xs leading-6 gap-1 flex"><button type="button" data-active="" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="true" id="base-ui-_R_banplcrbav5tccsnisnpfiutb_" data-composite-item-active="" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-2 text-primary dark:text-primary-light"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10">JavaScript</div><div class="absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"></div></button></div></div></div></div><div class="flex items-center justify-end shrink-0 gap-1.5"><div class="z-10 select-none" id="base-ui-_R_qknplcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="z-10 select-none" id="base-ui-_R_qsnplcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_r4nplcrbav5tccsnisnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-javascript-code-____const_clientId__"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="flex flex-1 overflow-hidden"><div data-orientation="horizontal" data-activation-direction="none" id="base-ui-_R_37plcrbav5tccsnisnpfiutb_" role="tabpanel" tabindex="0" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white"><div role="presentation" data-id="base-ui-_R_f7plcrbav5tccsnisnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="javascript"><code language="javascript" numberOfLines="20"><span class="line"><span style="color:#CF222E;--shiki-dark:#D4D4D4">...</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> clientId</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> process</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">env</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#0550AE;--shiki-dark:#4FC1FF">OAUTH_CLIENT_ID</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">;</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> clientSecret</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> process</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">env</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#0550AE;--shiki-dark:#4FC1FF">OAUTH_CLIENT_SECRET</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6E7781;--shiki-dark:#6A9955">// encode in base 64</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> encoded</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> btoa</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#0A3069;--shiki-dark:#CE9178">`</span><span style="color:#0A3069;--shiki-dark:#569CD6">${</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">clientId</span><span style="color:#0A3069;--shiki-dark:#569CD6">}</span><span style="color:#0A3069;--shiki-dark:#CE9178">:</span><span style="color:#0A3069;--shiki-dark:#569CD6">${</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">clientSecret</span><span style="color:#0A3069;--shiki-dark:#569CD6">}</span><span style="color:#0A3069;--shiki-dark:#CE9178">`</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> response</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#CF222E;--shiki-dark:#C586C0"> await</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> fetch</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#0A3069;--shiki-dark:#CE9178">&quot;https://api.notion.com/v1/oauth/token&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">, {</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">	method:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &quot;POST&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">	headers:</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> {</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">	Accept:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &quot;application/json&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#0A3069;--shiki-dark:#CE9178">	&quot;Content-Type&quot;</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &quot;application/json&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">	Authorization:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> `Basic </span><span style="color:#0A3069;--shiki-dark:#569CD6">${</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">encoded</span><span style="color:#0A3069;--shiki-dark:#569CD6">}</span><span style="color:#0A3069;--shiki-dark:#CE9178">`</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">},</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">	body:</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> JSON</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">stringify</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">({</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">		grant_type:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &quot;refresh_token&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">		refresh_token:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &quot;your-refresh-token&quot;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">	}),</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">});</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#D4D4D4">...</span></span>
</code></pre></div></div></div></div><div class="print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div></div><nav id="pagination" aria-label="Pagination" class="grid lg:grid-cols-2 gap-4"><a rel="prev" data-component-part="pagination-prev" class="group flex items-center min-w-0 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary dark:focus-visible:outline-primary-light border border-gray-200/70 dark:border-gray-800/70 rounded-xl py-3 px-4 hover:border-gray-300 dark:hover:border-gray-700 justify-start pagination-prev" href="/guides/get-started/public-connections"><div class="space-y-1 min-w-0 max-w-full"><div class="truncate font-medium text-gray-900 dark:text-gray-200" data-component-part="pagination-title">Public connections</div><div class="flex items-center text-sm text-gray-500 dark:text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300 gap-x-1"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-2.5 shrink-0 text-gray-400 dark:text-gray-600 group-hover:text-gray-500 dark:group-hover:text-gray-500" data-component-part="pagination-chevron"><path d="M11.5 15.25L5.25 9L11.5 2.75" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg><span class="font-medium" data-component-part="pagination-label">Previous</span></div></div></a><a rel="next" data-component-part="pagination-next" class="group flex items-center min-w-0 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary dark:focus-visible:outline-primary-light border border-gray-200/70 dark:border-gray-800/70 rounded-xl py-3 px-4 hover:border-gray-300 dark:hover:border-gray-700 justify-end pagination-next" href="/guides/get-started/handling-api-keys"><div class="space-y-1 min-w-0 max-w-full"><div class="truncate font-medium text-gray-900 dark:text-gray-200 text-right" data-component-part="pagination-title">Secure API tokens</div><div class="flex items-center text-sm text-gray-500 dark:text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300 gap-x-1 flex-row-reverse"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-2.5 shrink-0 text-gray-400 dark:text-gray-600 group-hover:text-gray-500 dark:group-hover:text-gray-500" data-component-part="pagination-chevron"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg><span class="font-medium" data-component-part="pagination-label">Next</span></div></div></a></nav><div class="left-0 right-0 sticky bottom-0 w-full overflow-hidden z-20 pointer-events-none print:hidden"><div class="chat-assistant-floating-input w-full group/assistant-bar relative before:content-[&quot;&quot;] before:absolute before:left-0 before:right-0 before:top-1/2 before:h-[200px] before:bg-transparent dark:before:bg-transparent translate-y-[100px] opacity-0"><div class="relative pb-4 sm:pb-6"><div class="flex flex-col w-full rounded-2xl pointer-events-auto bg-background-light dark:bg-background-dark border border-gray-200 dark:border-white/30 focus-within:border-primary dark:focus-within:border-primary-light transition-colors max-w-[386px] mx-auto"><div class="relative flex items-end"><textarea id="chat-assistant-textarea" aria-label="Ask a question..." autoComplete="off" placeholder="Ask a question..." class="chat-assistant-input w-full bg-transparent border-0 peer/input text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 outline-hidden! focus:outline-hidden! focus:ring-0 py-2.5 pl-3.5 pr-10 font-bodyWeight text-sm" style="resize:none"></textarea><span class="absolute right-11 bottom-3 text-xs font-medium text-gray-400 dark:text-gray-500 select-none pointer-events-none peer-focus/input:hidden hidden sm:inline">⌘<!-- -->I</span><button class="chat-assistant-send-button flex justify-center items-center rounded-full p-1 size-6 bg-primary/30 dark:bg-primary-dark/30 absolute right-2.5 bottom-2" aria-label="Send message" disabled=""><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-2.5 shrink-0 text-white dark:text-white"><path d="M9.0 1.5754L8.9999 16.4171" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.2563 8.319L8.9999 1.5754L15.7435 8.3191" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div></div></div><footer id="footer" class="flex gap-12 justify-between pt-10 border-t border-gray-100 sm:flex dark:border-gray-800/50 pb-28"><div class="flex gap-6 flex-wrap"><a href="https://x.com/NotionDevs" target="_blank" class="h-fit"><span class="sr-only">x</span><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! w-5 h-5 bg-gray-400 dark:bg-gray-500 hover:bg-gray-500 dark:hover:bg-gray-400" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/brands/x-twitter.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/brands/x-twitter.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></a><a href="https://join.slack.com/t/notiondevs/shared_invite/zt-3u9oid9q8-HLUBmMVWYK~g9HFo4U4raA" target="_blank" class="h-fit"><span class="sr-only">slack</span><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! w-5 h-5 bg-gray-400 dark:bg-gray-500 hover:bg-gray-500 dark:hover:bg-gray-400" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/brands/slack.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/brands/slack.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></a></div></footer></div></main></div></div><!--$--><!--/$--></div><div data-assistant-sheet-container="" class="sticky shrink-0 z-22 bg-background-light dark:bg-background-dark mt-(--banner-height,0px) top-(--banner-height,0px) h-[calc(100vh-var(--banner-height,0px))] max-lg:hidden print:hidden" style="width:var(--assistant-sheet-width, 0px);overflow:hidden"><div class="absolute left-0 top-0 bottom-0 w-px z-10 cursor-col-resize after:content-[&quot;&quot;] after:absolute after:inset-y-0 after:-inset-x-2 after:select-none bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700"></div><div id="chat-assistant-sheet" class="flex flex-col overflow-hidden shrink-0 relative h-full bg-background-light dark:bg-background-dark chat-assistant-sheet" aria-hidden="true"><div class="w-full flex flex-col flex-1 min-h-0 lg:pt-3"><div class="chat-assistant-sheet-header flex items-center justify-between pb-3 px-4"><div class="flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="size-5 text-primary dark:text-primary-light shrink-0" aria-hidden="true"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg><span class="font-medium text-gray-900 dark:text-gray-100">Assistant</span></div><div class="flex items-center gap-1"><button class="group hover:bg-gray-100 dark:hover:bg-white/10 p-1.5 rounded-lg" aria-label="Maximize assistant panel"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-4 sm:size-3.5 text-gray-500 group-hover:text-gray-700 dark:group-hover:text-gray-300 shrink-0"><path d="M10.75 2.75H15.25V7.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M15.25 2.75L10.75 7.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.75 10.75V15.25H7.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.75 15.25L7.25 10.75" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><button class="group hover:bg-gray-100 dark:hover:bg-white/10 p-1.5 rounded-lg" aria-label="Close assistant panel"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-[20px] sm:size-4 text-gray-500 group-hover:text-gray-700 dark:group-hover:text-gray-300 shrink-0"><path d="M14 4L4 14" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M4 4L14 14" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div><div id="chat-content" class="chat-assistant-sheet-content flex flex-col-reverse flex-1 overflow-y-auto relative px-5 min-h-0"><div class="grow"></div><div class="h-full flex flex-col justify-between"><div class="mt-4 flex flex-col items-center text-sm"><div class="mx-8 text-center text-gray-400 dark:text-gray-600 text-xs chat-assistant-disclaimer-text">Responses are generated using AI and may contain mistakes.</div></div></div></div><div class="px-4 pb-4 shrink-0"><div class=""><div class="flex flex-col w-full rounded-2xl pointer-events-auto bg-background-light dark:bg-background-dark border border-gray-200 dark:border-white/30 focus-within:border-primary dark:focus-within:border-primary-light transition-colors"><div class="relative flex items-end"><textarea id="chat-assistant-textarea" aria-label="Ask a question..." autoComplete="off" placeholder="Ask a question..." class="chat-assistant-input w-full bg-transparent border-0 peer/input text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 outline-hidden! focus:outline-hidden! focus:ring-0 py-2.5 pl-3.5 pr-10 font-bodyWeight text-sm pb-0!" style="resize:none"></textarea></div><div class="flex items-center justify-between px-2 pb-2"><input type="file" accept="image/*,.pdf,.js,.jsx,.ts,.tsx,.mjs,.cjs,.md,.mdx,.json,.html,.css,.py,.csv,.txt,.yaml,.yml,.xml,.sql,.sh,.bash,.zsh,.graphql,.gql,.toml,.env,.go,.rs,.rb,.java,.kt,.swift,.c,.cpp,.cc,.h,.hpp,.cs,.php,.dart,.lua,.r,.scala,.ini,.cfg,.conf,.log,.dockerfile,.makefile,.gitignore" multiple="" class="hidden"/><button type="button" class="p-1 rounded-lg text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-white/10" aria-label="Add attachment"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3.5 shrink-0"><path d="M7.75 5V11.75C7.75 12.578 8.422 13.25 9.25 13.25C10.078 13.25 10.75 12.578 10.75 11.75V4.75C10.75 3.093 9.407 1.75 7.75 1.75C6.093 1.75 4.75 3.093 4.75 4.75V11.75C4.75 14.235 6.765 16.25 9.25 16.25C11.735 16.25 13.75 14.235 13.75 11.75V5" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><button class="chat-assistant-send-button flex justify-center items-center rounded-full p-1 size-6 bg-primary/30 dark:bg-primary-dark/30" aria-label="Send message" disabled=""><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-2.5 shrink-0 text-white dark:text-white"><path d="M9.0 1.5754L8.9999 16.4171" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.2563 8.319L8.9999 1.5754L15.7435 8.3191" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div></div></div></div></div></div></div><script src="/mintlify-assets/_next/static/chunks/6d55b684068fd47e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n9:I[168027,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"default\"]\n:HL[\"/mintlify-assets/_next/static/chunks/a2c16a79b30ca688.css?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"style\"]\n:HL[\"/mintlify-assets/_next/static/chunks/ea2154a47c78cbbc.css?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"style\"]\n:HL[\"/mintlify-assets/_next/static/media/83afe278b6a6bb3c.p.3a6ba036.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/mintlify-assets/_next/static/media/PaperMono_Variable.p.590789cb.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/mintlify-assets/_next/static/media/f67ad414ed34149c.p.84166d94.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"LbZ13Pj9EjSR4_WJ5mg4E\",\"p\":\"/mintlify-assets\",\"c\":[\"\",\"_sites\",\"notion-demo\",\"guides\",\"get-started\",\"authorization\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"%5Fsites\",{\"children\":[[\"subdomain\",\"notion-demo\",\"d\"],{\"children\":[\"(multitenant)\",{\"children\":[[\"slug\",\"guides/get-started/authorization\",\"oc\"],{\"children\":[\"__PAGE__\",{}]}]}]}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/mintlify-assets/_next/static/chunks/a2c16a79b30ca688.css?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/mintlify-assets/_next/static/chunks/ea2154a47c78cbbc.css?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"suppressHydrationWarning\":true,\"lang\":\"en\",\"className\":\"inter_1d81deff-module__CYM0aG__variable papermono_89c757f2-module__6aS5zq__variable dark\",\"data-banner-state\":\"visible\",\"data-assistant-state\":\"closed\",\"data-page-mode\":\"none\",\"data-current-path\":\"/\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"script\",null,{\"type\":\"text/javascript\",\"dangerouslySetInnerHTML\":{\"__html\":\"!function(){var b=\\\"\\\";\\nfunction a(p){if(p==null)return\\\"/\\\";p=\\\"\\\"+p;if(\\\"\\\"===p)return\\\"/\\\";return\\\"/\\\"===p.charAt(0)?p:\\\"/\\\"+p}\\nfunction u(p){if(p==null)return p;p=\\\"\\\"+p;if(!p||p.charAt(p.length-1)===\\\"/\\\")return p.slice(0,-1);return p}\\nfunction i(p){if(p==null)return p;p=\\\"\\\"+p;if(6\u003c=p.length\u0026\u0026p.substring(p.length-6)===\\\"/index\\\")return p.substring(0,p.length-6);if(\\\"index\\\"===p)return\\\"\\\";return p}\\nvar p=(location.pathname||\\\"\\\").split(\\\"?\\\")[0].split(\\\"#\\\")[0]||\\\"\\\";\\nif(b)if(p===b)p=\\\"\\\";else if(0===p.indexOf(b+\\\"/\\\"))p=p.substring(b.length);\\np=a(p);p=u(p);p=i(p);p=\\\"\\\"===p||\\\"index\\\"===p?\\\"/\\\":a(p);\\ndocument.documentElement.setAttribute(\\\"data-current-path\\\",p);\\n}();\"}}],[\"$\",\"script\",null,{\"type\":\"text/javascript\",\"dangerouslySetInnerHTML\":{\"__html\":\"!function(){\\nfunction read(){try{\\nvar e=performance.getEntriesByType?performance.getEntriesByType(\\\"navigation\\\"):[];\\nvar st=(e[0]\u0026\u0026e[0].serverTiming)||[];\\nvar g={};\\nfor(var i=0;i\u003cst.length;i++){var n=st[i].name,d=st[i].description;if(!d)continue;try{d=decodeURIComponent(d)}catch(x){}\\nif(n===\\\"country\\\")g.country=d;else if(n===\\\"region\\\")g.region=d;else if(n===\\\"continent\\\")g.continent=d;}\\nvar w=window;w.mintlify=w.mintlify||{};w.mintlify.geo=g;\\n}catch(x){}}\\nread();document.addEventListener(\\\"DOMContentLoaded\\\",read);\\n}();\"}}],[\"$\",\"script\",null,{\"type\":\"text/javascript\",\"dangerouslySetInnerHTML\":{\"__html\":\"!function(){try{\\nvar w=window;w.mintlify=w.mintlify||{};\\nvar q=w.mintlify.__apiPlaygroundInputsQueue;\\nif(!Array.isArray(q)){q=[];w.mintlify.__apiPlaygroundInputsQueue=q;}\\nw.mintlify.api=w.mintlify.api||{};\\nw.mintlify.api.playground=w.mintlify.api.playground||{};\\nif(typeof w.mintlify.api.playground.setServerVariables!==\\\"function\\\"){\\nw.mintlify.api.playground.setServerVariables=function(v){q.push({type:\\\"set\\\",variables:v});};\\n}\\nif(typeof w.mintlify.api.playground.clearServerVariables!==\\\"function\\\"){\\nw.mintlify.api.playground.clearServerVariables=function(){q.push({type:\\\"clear\\\"});};\\n}\\n}catch(e){}}();\"}}],[\"$\",\"script\",null,{\"type\":\"text/javascript\",\"dangerouslySetInnerHTML\":{\"__html\":\"(function(a,b){try{let c=document.getElementById(\\\"banner\\\")?.innerText;if(c){for(let d=0;d\u003clocalStorage.length;d++){let e=localStorage.key(d);if(e?.endsWith(a)\u0026\u0026localStorage.getItem(e)===c)return void document.documentElement.setAttribute(b,\\\"hidden\\\")}document.documentElement.setAttribute(b,\\\"visible\\\");return}for(let c=0;c\u003clocalStorage.length;c++){let d=localStorage.key(c);if(d?.endsWith(a)\u0026\u0026localStorage.getItem(d))return void document.documentElement.setAttribute(b,\\\"hidden\\\")}document.documentElement.setAttribute(b,\\\"visible\\\")}catch(a){document.documentElement.setAttribute(b,\\\"hidden\\\")}})(\\n  \\\"bannerDismissed\\\",\\n  \\\"data-banner-state\\\",\\n)\"}}],false]}],\"$L2\"]}]]}],{\"children\":[\"%5Fsites\",\"$L3\",{\"children\":[[\"subdomain\",\"notion-demo\",\"d\"],\"$L4\",{\"children\":[\"(multitenant)\",\"$L5\",{\"children\":[[\"slug\",\"guides/get-started/authorization\",\"oc\"],\"$L6\",{\"children\":[\"__PAGE__\",\"$L7\",{},null,false]},null,false]},null,false]},null,false]},null,false]},null,false],\"$L8\",false]],\"m\":\"$undefined\",\"G\":[\"$9\",[\"$La\",\"$Lb\"]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"c:I[667786,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"MintlifyApiPlaygroundInputsInit\"]\nd:I[339756,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"e:I[556357,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b0309243d1680917.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"f:I[837457,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"10:I[894587,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"ThemeProvider\"]\n"])</script><script>self.__next_f.push([1,"11:I[152823,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"ColorVariables\"]\n"])</script><script>self.__next_f.push([1,"12:I[531961,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"FontScript\"]\n"])</script><script>self.__next_f.push([1,"13:I[649328,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"RoundedVariables\"]\n"])</script><script>self.__next_f.push([1,"14:I[702910,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/535329ac74b0ca01.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"RecommendedPagesList\"]\n"])</script><script>self.__next_f.push([1,"15:I[570420,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"DataCurrentPathUpdater\"]\n"])</script><script>self.__next_f.push([1,"16:I[341175,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/1954288adc1590b1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"19:I[897367,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"OutletBoundary\"]\n1b:I[711533,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"AsyncMetadataOutlet\"]\n1d:I[897367,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"ViewportBoundary\"]\n1f:I[897367,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"MetadataBoundary\"]\n20:\"$Sreact.suspense\"\n"])</script><script>self.__next_f.push([1,"2:[\"$\",\"body\",null,{\"className\":\"antialiased\",\"children\":[[\"$\",\"$Lc\",null,{}],false,[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$e\",\"errorStyles\":[],\"errorScripts\":[[\"$\",\"script\",\"script-0\",{\"src\":\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true}],[\"$\",\"script\",\"script-1\",{\"src\":\"/mintlify-assets/_next/static/chunks/b0309243d1680917.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true}],[\"$\",\"script\",\"script-2\",{\"src\":\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true}],[\"$\",\"script\",\"script-3\",{\"src\":\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true}],[\"$\",\"script\",\"script-4\",{\"src\":\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true}]],\"template\":[\"$\",\"$Lf\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"$L10\",null,{\"children\":[[\"$\",\"$L11\",null,{}],[\"$\",\"$L12\",null,{}],[\"$\",\"$L13\",null,{}],[\"$\",\"style\",null,{\"children\":\":root {\\n  --primary: 17 120 102;\\n  --primary-light: 74 222 128;\\n  --primary-dark: 22 101 52;\\n  --background-light: 255 255 255;\\n  --background-dark: 15 17 23;\\n}\"}],[\"$\",\"main\",null,{\"className\":\"h-screen bg-background-light dark:bg-background-dark text-left\",\"children\":[\"$\",\"article\",null,{\"className\":\"bg-custom bg-fixed bg-center bg-cover relative flex flex-col items-center justify-center h-full\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full max-w-xl px-10\",\"children\":[[\"$\",\"span\",null,{\"className\":\"inline-flex mb-6 rounded-full px-3 py-1 text-sm font-semibold mr-4 text-white p-1 bg-primary\",\"children\":[\"Error \",404]}],[\"$\",\"h1\",null,{\"className\":\"font-semibold mb-3 text-3xl\",\"children\":\"Page not found!\"}],[\"$\",\"p\",null,{\"className\":\"text-lg text-gray-600 dark:text-gray-400 mb-6\",\"children\":\"We couldn't find the page.\"}],[\"$\",\"$L14\",null,{}]]}]}]}]]}],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],false,[\"$\",\"$L15\",null,{}]]}]\n"])</script><script>self.__next_f.push([1,"3:[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lf\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]\n"])</script><script>self.__next_f.push([1,"4:[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$16\",\"errorStyles\":[],\"errorScripts\":[[\"$\",\"script\",\"script-0\",{\"src\":\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true}],[\"$\",\"script\",\"script-1\",{\"src\":\"/mintlify-assets/_next/static/chunks/1954288adc1590b1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true}],[\"$\",\"script\",\"script-2\",{\"src\":\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true}],[\"$\",\"script\",\"script-3\",{\"src\":\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true}],[\"$\",\"script\",\"script-4\",{\"src\":\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true}]],\"template\":[\"$\",\"$Lf\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"$L10\",null,{\"children\":[[\"$\",\"$L11\",null,{}],[\"$\",\"$L12\",null,{}],[\"$\",\"$L13\",null,{}],[\"$\",\"style\",null,{\"children\":\":root {\\n  --primary: 17 120 102;\\n  --primary-light: 74 222 128;\\n  --primary-dark: 22 101 52;\\n  --background-light: 255 255 255;\\n  --background-dark: 15 17 23;\\n}\"}],[\"$\",\"main\",null,{\"className\":\"h-screen bg-background-light dark:bg-background-dark text-left\",\"children\":[\"$\",\"article\",null,{\"className\":\"bg-custom bg-fixed bg-center bg-cover relative flex flex-col items-center justify-center h-full\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full max-w-xl px-10\",\"children\":[[\"$\",\"span\",null,{\"className\":\"inline-flex mb-6 rounded-full px-3 py-1 text-sm font-semibold mr-4 text-white p-1 bg-primary\",\"children\":[\"Error \",404]}],[\"$\",\"h1\",null,{\"className\":\"font-semibold mb-3 text-3xl\",\"children\":\"Page not found!\"}],[\"$\",\"p\",null,{\"className\":\"text-lg text-gray-600 dark:text-gray-400 mb-6\",\"children\":\"We couldn't find the page.\"}],[\"$\",\"$L14\",null,{}]]}]}]}]]}],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]\n"])</script><script>self.__next_f.push([1,"5:[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"script\",\"script-0\",{\"src\":\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-3\",{\"src\":\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-4\",{\"src\":\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-5\",{\"src\":\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-6\",{\"src\":\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-7\",{\"src\":\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-8\",{\"src\":\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-9\",{\"src\":\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-10\",{\"src\":\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-11\",{\"src\":\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}]],\"$L17\"]}]\n"])</script><script>self.__next_f.push([1,"6:[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lf\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]\n"])</script><script>self.__next_f.push([1,"7:[\"$\",\"$1\",\"c\",{\"children\":[\"$L18\",[[\"$\",\"script\",\"script-0\",{\"src\":\"/mintlify-assets/_next/static/chunks/94496c4479252ca1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/mintlify-assets/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/mintlify-assets/_next/static/chunks/be7f34c551fcffd1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-3\",{\"src\":\"/mintlify-assets/_next/static/chunks/0534993a51af00f5.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-4\",{\"src\":\"/mintlify-assets/_next/static/chunks/d9ca228e7af9807a.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-5\",{\"src\":\"/mintlify-assets/_next/static/chunks/ac544a47bf6b23f1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-6\",{\"src\":\"/mintlify-assets/_next/static/chunks/d48636393ee0b554.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-7\",{\"src\":\"/mintlify-assets/_next/static/chunks/1353a205bc2072e2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-8\",{\"src\":\"/mintlify-assets/_next/static/chunks/8bb4281d16257889.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L19\",null,{\"children\":[\"$L1a\",[\"$\",\"$L1b\",null,{\"promise\":\"$@1c\"}]]}]]}]\n"])</script><script>self.__next_f.push([1,"8:[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$L1d\",null,{\"children\":\"$L1e\"}],null],[\"$\",\"$L1f\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$20\",null,{\"fallback\":null,\"children\":\"$L21\"}]}]}]]}]\na:[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/mintlify-assets/_next/static/chunks/a2c16a79b30ca688.css?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]\nb:[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/mintlify-assets/_next/static/chunks/ea2154a47c78cbbc.css?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]\n"])</script><script>self.__next_f.push([1,"1e:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, viewport-fit=cover\"}]]\n1a:null\n"])</script><script>self.__next_f.push([1,"1c:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"Authorization - Notion Docs\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"This guide describes the authorization flows for Notion connections and personal access tokens.\"}],[\"$\",\"meta\",\"2\",{\"name\":\"application-name\",\"content\":\"Notion Docs\"}],[\"$\",\"meta\",\"3\",{\"name\":\"generator\",\"content\":\"Mintlify\"}],[\"$\",\"meta\",\"4\",{\"name\":\"msapplication-config\",\"content\":\"/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon/browserconfig.xml\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"Notion Docs\"}],[\"$\",\"meta\",\"6\",{\"name\":\"msapplication-TileColor\",\"content\":\"#000\"}],[\"$\",\"link\",\"7\",{\"rel\":\"canonical\",\"href\":\"https://developers.notion.com/guides/get-started/authorization\"}],[\"$\",\"link\",\"8\",{\"rel\":\"alternate\",\"type\":\"application/xml\",\"href\":\"/sitemap.xml\"}],[\"$\",\"link\",\"9\",{\"rel\":\"alternate\",\"type\":\"text/markdown\",\"href\":\"/guides/get-started/authorization.md\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:title\",\"content\":\"Authorization - Notion Docs\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:description\",\"content\":\"This guide describes the authorization flows for Notion connections and personal access tokens.\"}],[\"$\",\"meta\",\"12\",{\"property\":\"og:url\",\"content\":\"https://developers.notion.com/guides/get-started/authorization\"}],[\"$\",\"meta\",\"13\",{\"property\":\"og:site_name\",\"content\":\"Notion Docs\"}],[\"$\",\"meta\",\"14\",{\"property\":\"og:image\",\"content\":\"https://notion-demo.mintlify.app/images/og-image.png\"}],[\"$\",\"meta\",\"15\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"16\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"17\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"18\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"19\",{\"name\":\"twitter:title\",\"content\":\"Authorization - Notion Docs\"}],[\"$\",\"meta\",\"20\",{\"name\":\"twitter:description\",\"content\":\"This guide describes the authorization flows for Notion connections and personal access tokens.\"}],[\"$\",\"meta\",\"21\",{\"name\":\"twitter:image\",\"content\":\"https://notion-demo.mintlify.app/images/og-image.png\"}],[\"$\",\"meta\",\"22\",{\"name\":\"twitter:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"23\",{\"name\":\"twitter:image:height\",\"content\":\"630\"}],[\"$\",\"link\",\"24\",{\"rel\":\"icon\",\"href\":\"/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon/android-chrome-192x192.png\",\"type\":\"image/png\",\"sizes\":\"192x192\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"link\",\"25\",{\"rel\":\"apple-touch-icon\",\"href\":\"/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon/apple-touch-icon.png\",\"type\":\"image/png\",\"sizes\":\"180x180\",\"media\":\"$undefined\"}],[\"$\",\"link\",\"26\",{\"rel\":\"icon\",\"href\":\"/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon/favicon-16x16.png\",\"type\":\"image/png\",\"sizes\":\"16x16\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"link\",\"27\",{\"rel\":\"icon\",\"href\":\"/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon/favicon-32x32.png\",\"type\":\"image/png\",\"sizes\":\"32x32\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"link\",\"28\",{\"rel\":\"shortcut icon\",\"href\":\"/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"$undefined\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"link\",\"29\",{\"rel\":\"icon\",\"href\":\"/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon-dark/android-chrome-192x192.png\",\"type\":\"image/png\",\"sizes\":\"192x192\",\"media\":\"(prefers-color-scheme: dark)\"}],[\"$\",\"link\",\"30\",{\"rel\":\"icon\",\"href\":\"/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon-dark/favicon-16x16.png\",\"type\":\"image/png\",\"sizes\":\"16x16\",\"media\":\"(prefers-color-scheme: dark)\"}],[\"$\",\"link\",\"31\",{\"rel\":\"icon\",\"href\":\"/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon-dark/favicon-32x32.png\",\"type\":\"image/png\",\"sizes\":\"32x32\",\"media\":\"(prefers-color-scheme: dark)\"}],\"$L22\",\"$L23\"],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"21:\"$1c:metadata\"\n"])</script><script>self.__next_f.push([1,"24:I[27201,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"IconMark\"]\n22:[\"$\",\"link\",\"32\",{\"rel\":\"shortcut icon\",\"href\":\"/mintlify-assets/_mintlify/favicons/notion-demo/1PaJq9z3waub4TpE/_generated/favicon-dark/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"$undefined\",\"media\":\"(prefers-color-scheme: dark)\"}]\n23:[\"$\",\"$L24\",\"33\",{}]\n"])</script><script>self.__next_f.push([1,"25:I[707934,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"WebMcpRegistration\"]\n"])</script><script>self.__next_f.push([1,"26:I[590280,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"LivePreviewProvider\"]\n"])</script><script>self.__next_f.push([1,"27:I[479520,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"\"]\n"])</script><script>self.__next_f.push([1,"28:I[197336,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"29:I[91557,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/94496c4479252ca1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/be7f34c551fcffd1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0534993a51af00f5.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d9ca228e7af9807a.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/ac544a47bf6b23f1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d48636393ee0b554.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/1353a205bc2072e2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8bb4281d16257889.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"AuthProvider\"]\n"])</script><script>self.__next_f.push([1,"2a:I[91557,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/94496c4479252ca1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/be7f34c551fcffd1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0534993a51af00f5.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d9ca228e7af9807a.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/ac544a47bf6b23f1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d48636393ee0b554.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/1353a205bc2072e2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8bb4281d16257889.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"DeploymentMetadataProvider\"]\n"])</script><script>self.__next_f.push([1,"2b:I[91557,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/94496c4479252ca1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/be7f34c551fcffd1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0534993a51af00f5.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d9ca228e7af9807a.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/ac544a47bf6b23f1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d48636393ee0b554.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/1353a205bc2072e2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8bb4281d16257889.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"DocsConfigProvider\"]\n"])</script><script>self.__next_f.push([1,"2d:I[597003,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/94496c4479252ca1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/be7f34c551fcffd1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0534993a51af00f5.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d9ca228e7af9807a.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/ac544a47bf6b23f1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d48636393ee0b554.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/1353a205bc2072e2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8bb4281d16257889.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"ScopedNavProvider\"]\n"])</script><script>self.__next_f.push([1,"17:[null,[\"$\",\"$L25\",null,{\"subdomain\":\"notion-demo\"}],[\"$\",\"$L26\",null,{\"isLivePreviewRoute\":false,\"children\":[\"$\",\"$L10\",null,{\"appearance\":{\"default\":\"system\"},\"codeblockTheme\":\"system\",\"children\":[[\"$\",\"blockquote\",null,{\"className\":\"sr-only\",\"data-agent-docs-index\":true,\"aria-hidden\":\"true\",\"children\":[[\"$\",\"h2\",null,{\"children\":\"Documentation Index\"}],[\"$\",\"p\",null,{\"children\":[\"Fetch the complete documentation index at:\",\" \",[\"$\",\"a\",null,{\"href\":\"/llms.txt\",\"tabIndex\":-1,\"children\":\"/llms.txt\"}]]}],[\"$\",\"p\",null,{\"children\":\"Use this file to discover all available pages before exploring further.\"}]]}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root{--banner-height:0px!important}\"}}],false,null,null,[\"$\",\"$L27\",null,{\"id\":\"_mintlify-banner-script\",\"strategy\":\"beforeInteractive\",\"dangerouslySetInnerHTML\":{\"__html\":\"(function j(a,b,c,d,e){try{let f,g,h=[];try{h=window.location.pathname.split(\\\"/\\\").filter(a=\u003e\\\"\\\"!==a\u0026\u0026\\\"global\\\"!==a).slice(0,2)}catch{h=[]}let i=h.find(a=\u003ec.includes(a)),j=[];for(let c of(i?j.push(i):j.push(b),j.push(\\\"global\\\"),j)){if(!c)continue;let b=a[c];if(b?.content){f=b.content,g=c;break}}if(!f)return void document.documentElement.setAttribute(d,\\\"hidden\\\");let k=!0,l=0;for(;l\u003clocalStorage.length;){let a=localStorage.key(l);if(l++,!a?.endsWith(e))continue;let b=localStorage.getItem(a);if(b\u0026\u0026b===f){k=!1;break}g\u0026\u0026(a.startsWith(`lang:${g}_`)||!a.startsWith(\\\"lang:\\\"))\u0026\u0026(localStorage.removeItem(a),l--)}document.documentElement.setAttribute(d,k?\\\"visible\\\":\\\"hidden\\\")}catch(a){console.error(a),document.documentElement.setAttribute(d,\\\"hidden\\\")}})(\\n  {},\\n  \\\"en\\\",\\n  [],\\n  \\\"data-banner-state\\\",\\n  \\\"bannerDismissed\\\",\\n)\"}}],[\"$\",\"$L28\",null,{\"appId\":\"$undefined\",\"autoBoot\":true,\"children\":[\"$\",\"$L29\",null,{\"value\":{\"auth\":\"$undefined\",\"userAuth\":\"$undefined\"},\"children\":[\"$\",\"$L2a\",null,{\"value\":{\"subdomain\":\"notion-demo\",\"actualSubdomain\":\"notion-demo\",\"gitSource\":{\"type\":\"github\",\"owner\":\"makenotion\",\"repo\":\"notion-next\",\"deployBranch\":\"main\",\"contentDirectory\":\"src/server-publicApiDocs\",\"isPrivate\":true,\"mountPath\":\"\",\"label\":\"\"},\"inkeep\":\"$undefined\",\"chroma\":{\"liveDeploymentHistoryId\":\"6a75ffd36f1829a38f62bb88\",\"collectionId\":\"ca8a8f26-3306-421f-8fe7-f759f1f13141\",\"schemaVersion\":\"v3\",\"latestBuiltDeploymentHistoryId\":\"6a75ffd36f1829a38f62bb88\"},\"feedback\":\"$undefined\",\"entitlements\":{\"AI_CHAT\":{\"status\":\"ENABLED\"},\"REMOVE_BRANDING\":{\"status\":\"ENABLED\"},\"CONTEXTUAL_FEEDBACK\":{\"status\":\"ENABLED\"},\"CODE_SNIPPET_FEEDBACK\":{\"status\":\"ENABLED\"}},\"buildId\":\"6a7642e863f44f7ccb2edd83:in_progress\",\"clientVersion\":\"0.0.3414\",\"preview\":\"$undefined\",\"searchFilterCounts\":[{\"language\":\"default\",\"tag\":\"API Reference\",\"count\":121},{\"language\":\"default\",\"tag\":\"Endpoints\",\"count\":82},{\"language\":\"default\",\"tag\":\"Guides\",\"count\":48},{\"language\":\"default\",\"tag\":\"Webhook events\",\"count\":31},{\"language\":\"default\",\"tag\":\"Admin API\",\"count\":25},{\"language\":\"default\",\"tag\":\"Objects\",\"count\":18},{\"language\":\"default\",\"tag\":\"Pages\",\"count\":17},{\"language\":\"default\",\"tag\":\"Get started\",\"count\":14},{\"language\":\"default\",\"tag\":\"Data sources\",\"count\":14},{\"language\":\"default\",\"tag\":\"Data APIs\",\"count\":13}],\"searchSettings\":\"$undefined\"},\"children\":[\"$\",\"$L2b\",null,{\"value\":{\"docsConfig\":{\"theme\":\"aspen\",\"$schema\":\"https://mintlify.com/docs.json\",\"name\":\"Notion Docs\",\"colors\":{\"primary\":\"#000\",\"light\":\"#0075de\",\"dark\":\"#097fe8\"},\"logo\":{\"light\":\"https://mintcdn.com/notion-demo/5YdhSbldE14t5Rna/logo/light.svg?fit=max\u0026auto=format\u0026n=5YdhSbldE14t5Rna\u0026q=85\u0026s=249f5693ad929397409bf9b51d6d539d\",\"dark\":\"https://mintcdn.com/notion-demo/5YdhSbldE14t5Rna/logo/dark.svg?fit=max\u0026auto=format\u0026n=5YdhSbldE14t5Rna\u0026q=85\u0026s=a8404879d171debac543bb6c1482c909\",\"href\":\"/\"},\"favicon\":\"https://mintcdn.com/notion-demo/LHm9qfrJYJOPRxs6/favicon.png?fit=max\u0026auto=format\u0026n=LHm9qfrJYJOPRxs6\u0026q=85\u0026s=0668f0b3334eef21f0cdc65b390d22d9\",\"appearance\":\"$17:2:props:children:props:appearance\",\"background\":{\"color\":{\"light\":\"#ffffff\",\"dark\":\"#0f0f0f\"}},\"navbar\":{\"links\":[{\"href\":\"https://www.notion.com/login\",\"label\":\"Log in\"}],\"primary\":{\"type\":\"button\",\"label\":\"Developer portal\",\"href\":\"https://www.notion.so/developers\"}},\"footer\":{\"socials\":{\"x\":\"https://x.com/NotionDevs\",\"slack\":\"https://join.slack.com/t/notiondevs/shared_invite/zt-3u9oid9q8-HLUBmMVWYK~g9HFo4U4raA\"}},\"seo\":{\"metatags\":{\"og:image\":\"/images/og-image.png\"}},\"fonts\":{\"family\":\"NotionInter\"},\"contextual\":{\"options\":[\"copy\",\"view\",\"chatgpt\",\"claude\",\"perplexity\",\"mcp\",\"cursor\",\"vscode\"],\"display\":\"header\"},\"interaction\":{\"drilldown\":true},\"styling\":{\"latex\":false,\"codeblocks\":\"system\"},\"navigation\":{\"global\":{\"anchors\":[]},\"pages\":[]}},\"docsNavWithMetadata\":\"$undefined\",\"anonymizedNav\":\"$undefined\",\"hasFullNav\":false},\"children\":\"$L2c\"}]}]}]}]]}]}]]\n"])</script><script>self.__next_f.push([1,"18:[\"$\",\"$L2d\",null,{\"scopedNav\":{\"global\":{\"anchors\":[]},\"tabs\":[{\"tab\":\"Guides\",\"groups\":[{\"group\":\"Get started\",\"pages\":[{\"title\":\"Overview\",\"description\":\"Discover what Notion connections are, when to use each type, and what you can build.\",\"href\":\"/guides/get-started/overview\"},{\"title\":\"API quickstart\",\"sidebarTitle\":\"Quickstart\",\"description\":\"Create a page in your Notion workspace with a personal access token and a single API request.\",\"href\":\"/guides/get-started/quick-start\"},{\"title\":\"Personal access tokens\",\"description\":\"Create and use personal access tokens for user-scoped API and Workers access.\",\"href\":\"/guides/get-started/personal-access-tokens\"},{\"title\":\"Internal connections\",\"description\":\"Learn how internal connections work, how permissions are managed, and how to create one.\",\"href\":\"/guides/get-started/internal-connections\"},{\"title\":\"Public connections\",\"description\":\"Learn how public connections work, how users authorize them, and how to create one.\",\"href\":\"/guides/get-started/public-connections\"},{\"title\":\"Authorization\",\"description\":\"This guide describes the authorization flows for Notion connections and personal access tokens.\",\"href\":\"/guides/get-started/authorization\"},{\"title\":\"Secure API tokens\",\"sidebarTitle\":\"API token security\",\"description\":\"Learn how to manage and secure your Notion API tokens.\",\"href\":\"/guides/get-started/handling-api-keys\"},{\"title\":\"Preparing your connection for users\",\"sidebarTitle\":\"Preparing for users\",\"description\":\"Learn how to create databases, pages, and views in a user's workspace right after they install your public connection.\",\"href\":\"/guides/get-started/preparing-for-users\"},{\"title\":\"List on the Marketplace\",\"description\":\"Learn how to list your public connection on the Notion Marketplace.\",\"href\":\"/guides/get-started/marketplace-listing\"}]},{\"group\":\"Agent APIs\",\"pages\":[{\"group\":\"Notion MCP\",\"pages\":[{\"title\":\"Notion MCP\",\"description\":\"Learn how MCP clients connect to your Notion workspace.\",\"sidebarTitle\":\"Overview\",\"href\":\"/guides/mcp/overview\"},{\"title\":\"Connect to Notion MCP\",\"description\":\"Connect an MCP client to your Notion workspace.\",\"href\":\"/guides/mcp/get-started-with-mcp\"},{\"title\":\"Supported tools\",\"description\":\"Learn what you can do with Notion MCP tools.\",\"href\":\"/guides/mcp/mcp-supported-tools\"},{\"title\":\"Security best practices\",\"description\":\"Learn how to keep your workspace secure when using Notion MCP.\",\"href\":\"/guides/mcp/mcp-security-best-practices\"},{\"title\":\"Build an MCP client for Notion\",\"description\":\"Connect a custom MCP client to Notion MCP with OAuth 2.0 and PKCE.\",\"href\":\"/guides/mcp/build-mcp-client\"},{\"group\":\"Hosting a local MCP server\",\"pages\":[{\"title\":\"Hosting a local MCP server\",\"description\":\"Learn how and when to use the open-source Notion MCP server.\",\"sidebarTitle\":\"Overview\",\"href\":\"/guides/mcp/hosting-open-source-mcp\"},{\"title\":\"Common MCP clients\",\"description\":\"Find setup documentation for MCP clients that can connect to Notion MCP.\",\"href\":\"/guides/mcp/common-mcp-clients\"}]}]}]},{\"group\":\"API versions\",\"pages\":[{\"group\":\"Upgrading to 2026-03-11\",\"pages\":[{\"title\":\"Upgrade guide\",\"description\":\"Learn how to upgrade your connections to 2026-03-11.\",\"sidebarTitle\":\"Upgrade guide\",\"href\":\"/guides/get-started/upgrade-guide-2026-03-11\"}]},{\"group\":\"Upgrading to 2025-09-03\",\"pages\":[{\"title\":\"Upgrade guide\",\"description\":\"Learn how to upgrade your connections to 2025-09-03.\",\"sidebarTitle\":\"Upgrade guide\",\"href\":\"/guides/get-started/upgrade-guide-2025-09-03\"},{\"title\":\"FAQs\",\"description\":\"Commonly asked questions about migrating to 2025-09-03.\",\"href\":\"/guides/get-started/upgrade-faqs-2025-09-03\"}]}]},{\"group\":\"Data APIs\",\"pages\":[{\"title\":\"Working with page content\",\"description\":\"Learn about page content and how to add or retrieve it with the Notion API.\",\"href\":\"/guides/data-apis/working-with-page-content\"},{\"group\":\"Working with databases\",\"pages\":[{\"title\":\"Working with databases\",\"description\":\"Learn about database schemas, querying databases, and more.\",\"sidebarTitle\":\"Overview\",\"href\":\"/guides/data-apis/working-with-databases\"},{\"title\":\"Query large data sources\",\"sidebarTitle\":\"Large data sources\",\"description\":\"Read every page in a data source that holds more rows than the per-query result limit.\",\"href\":\"/guides/data-apis/query-large-data-sources\"},{\"title\":\"Creating pages from templates\",\"description\":\"Learn how to apply data source templates to pages created in the Notion API.\",\"href\":\"/guides/data-apis/creating-pages-from-templates\"}]},{\"title\":\"Working with views\",\"description\":\"Learn how to set up and manage database views using the Notion API.\",\"href\":\"/guides/data-apis/working-with-views\"},{\"title\":\"Working with comments\",\"description\":\"Learn how to add and retrieve comments with the Notion API.\",\"href\":\"/guides/data-apis/working-with-comments\"},{\"group\":\"Working with markdown content\",\"pages\":[{\"title\":\"Working with markdown content\",\"description\":\"Learn how to create, read, and update Notion page content using enhanced markdown instead of the block API.\",\"href\":\"/guides/data-apis/working-with-markdown-content\"},{\"title\":\"Enhanced markdown format\",\"description\":\"Reference for the Notion-flavored Markdown format used by the markdown content endpoints.\",\"href\":\"/guides/data-apis/enhanced-markdown\"}]},{\"group\":\"Working with files and media\",\"pages\":[{\"title\":\"Working with files and media\",\"description\":\"Learn how to add and retrieve files and media on pages with the Notion API.\",\"sidebarTitle\":\"Overview\",\"href\":\"/guides/data-apis/working-with-files-and-media\"},{\"title\":\"Uploading small files\",\"description\":\"Learn how to send and attach files up to 20 MB using the Notion API.\",\"href\":\"/guides/data-apis/uploading-small-files\"},{\"title\":\"Retrieving existing files\",\"description\":\"Learn how to get a download link for files in the Notion API.\",\"href\":\"/guides/data-apis/retrieving-files\"},{\"title\":\"Uploading larger files\",\"description\":\"Learn how to send files larger than 20 MB in multiple parts.\",\"href\":\"/guides/data-apis/sending-larger-files\"},{\"title\":\"Importing external files\",\"description\":\"Learn how to migrate files from an external URL to Notion.\",\"href\":\"/guides/data-apis/importing-external-files\"}]}]},{\"group\":\"Resources\",\"pages\":[{\"title\":\"Example code\",\"url\":\"https://developers.notion.com/page/examples\",\"description\":null,\"href\":\"/guides/resources/examples\"},{\"title\":\"Postman workspace\",\"url\":\"https://www.postman.com/notionhq/notion-s-api-workspace/collection/52041987-03f70d8f-b6e5-4306-805c-f95f7cdf05b9\",\"description\":null,\"href\":\"/guides/resources/notion-s-api-workspace\"},{\"title\":\"Historical changelog\",\"description\":\"View an archive of Notion Developers updates prior to September 2023\",\"href\":\"/guides/resources/historical-changelog\"}]},{\"group\":\"Compliance\",\"pages\":[{\"title\":\"Overview\",\"description\":\"Enterprise-grade security and compliance features for tracking and auditing workspace activity in Notion.\",\"href\":\"/compliance/overview\"},{\"group\":\"Event reference\",\"pages\":[{\"title\":\"SIEM events\",\"description\":\"A comprehensive list of webhook events available in your SIEM platform once you set up the Notion SIEM connection.\",\"href\":\"/compliance/siem-events\"},{\"title\":\"Audit log events\",\"description\":\"A comprehensive list of events tracked in the Notion audit log for compliance and security monitoring.\",\"href\":\"/compliance/audit-log-events\"}]}]},{\"group\":\"Link previews\",\"pages\":[{\"title\":\"Introduction\",\"description\":\"Learn how link previews work in Notion.\",\"href\":\"/guides/link-previews/introduction\"}]}]},{\"tab\":\"API Reference\",\"pages\":[{\"title\":\"API Reference\",\"href\":\"/reference/intro\"}]},{\"tab\":\"CLI Reference\",\"pages\":[{\"title\":\"CLI Reference\",\"href\":\"/cli/get-started/overview\"}]},{\"tab\":\"Workers\",\"pages\":[{\"title\":\"Workers\",\"href\":\"/workers/get-started/overview\"}]},{\"tab\":\"Custom blocks\",\"hidden\":true,\"pages\":[{\"title\":\"Custom blocks\",\"href\":\"/custom-blocks/overview\"}]},{\"tab\":\"Admin API\",\"hidden\":false,\"pages\":[{\"title\":\"Admin API\",\"href\":\"/reference/admin/intro\"}]},{\"tab\":\"Changelog\",\"pages\":[{\"title\":\"Changelog\",\"href\":\"/page/changelog\"}]},{\"tab\":\"Examples\",\"pages\":[{\"title\":\"Examples\",\"href\":\"/page/examples\"}]},{\"tab\":\"Internal\",\"hidden\":true,\"pages\":[{\"title\":\"Internal\",\"href\":\"/guides/internal/link-previews/building-a-link-preview\"}]}]},\"maps\":{\"firstHrefInVersion\":{},\"firstHrefInLanguage\":{}},\"children\":\"$L2e\"}]\n"])</script><script>self.__next_f.push([1,"2f:I[604804,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"LoginButtonProvider\"]\n"])</script><script>self.__next_f.push([1,"30:I[141180,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"SidebarLoginButtonProvider\"]\n"])</script><script>self.__next_f.push([1,"31:I[343590,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"NavigationContextController\"]\n"])</script><script>self.__next_f.push([1,"32:I[378486,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"PageListProvider\"]\n"])</script><script>self.__next_f.push([1,"33:I[742977,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"PrefetchProvider\"]\n"])</script><script>self.__next_f.push([1,"34:I[237978,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"PageModeOverrideProvider\"]\n"])</script><script>self.__next_f.push([1,"35:I[378896,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"ConfiguredVariationProvider\"]\n"])</script><script>self.__next_f.push([1,"36:I[557611,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"Fonts\"]\n"])</script><script>self.__next_f.push([1,"37:I[330080,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"BannerProvider\"]\n"])</script><script>self.__next_f.push([1,"38:I[864506,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"NavbarTransitionScript\"]\n"])</script><script>self.__next_f.push([1,"3a:I[540345,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"ConsentProvider\"]\n"])</script><script>self.__next_f.push([1,"3b:I[529058,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"LocalStorageAndAnalyticsProviders\"]\n"])</script><script>self.__next_f.push([1,"3c:I[958547,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"3e:I[763509,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/94496c4479252ca1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/be7f34c551fcffd1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0534993a51af00f5.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d9ca228e7af9807a.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/ac544a47bf6b23f1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d48636393ee0b554.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/1353a205bc2072e2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8bb4281d16257889.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"ThemeLayout\"]\n"])</script><script>self.__next_f.push([1,"3f:I[91557,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/94496c4479252ca1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/be7f34c551fcffd1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0534993a51af00f5.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d9ca228e7af9807a.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/ac544a47bf6b23f1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d48636393ee0b554.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/1353a205bc2072e2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8bb4281d16257889.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"ApiReferenceProvider\"]\n"])</script><script>self.__next_f.push([1,"40:I[91557,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/94496c4479252ca1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/be7f34c551fcffd1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0534993a51af00f5.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d9ca228e7af9807a.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/ac544a47bf6b23f1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d48636393ee0b554.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/1353a205bc2072e2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8bb4281d16257889.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"PageProvider\"]\n"])</script><script>self.__next_f.push([1,"39:T865,"])</script><script>self.__next_f.push([1,"(function () {\n  var measure = function(){let a=document.querySelectorAll(\"[id='navbar'], [data-top-chrome]\"),b=0;a.forEach(a=\u003e{let c=a.getBoundingClientRect();c.height\u003e0\u0026\u0026(b=Math.max(b,c.bottom))});let c=0,d=document.getElementById(\"content-container\");if(d){let{overflowY:a}=getComputedStyle(d);(\"auto\"===a||\"scroll\"===a)\u0026\u0026(c=Math.max(0,d.getBoundingClientRect().top))}let e=Math.round(Math.max(0,b-c))+40;document.documentElement.style.setProperty(\"--scroll-mt\",`${e}px`)};\n  (function(a){let b=[],c=0,d=\"undefined\"==typeof ResizeObserver?null:new ResizeObserver(f);function e(){let c=Array.from(document.querySelectorAll(\"[id='navbar'], [data-top-chrome]\"));(c.length!==b.length||c.some((a,c)=\u003ea!==b[c]))\u0026\u0026d\u0026\u0026(d.disconnect(),c.forEach(a=\u003ed.observe(a))),b=c,a()}function f(){c||(c=requestAnimationFrame(()=\u003e{c=0,e()}))}new MutationObserver(f).observe(document.documentElement,{childList:!0,subtree:!0}),window.addEventListener(\"resize\",f),\"loading\"===document.readyState\u0026\u0026document.addEventListener(\"DOMContentLoaded\",e),e()})(measure);\n  (function(a){let b=window.location.hash.slice(1);if(!b)return;function c(){return\"smooth\"===getComputedStyle(document.documentElement).scrollBehavior}function d(c){let d=document.getElementById(b);return!!d\u0026\u0026(a(),d.scrollIntoView(c?{behavior:c}:void 0),!0)}if(\"complete\"===document.readyState)return void d();let e=new MutationObserver(()=\u003e{!c()\u0026\u0026d(\"instant\")\u0026\u0026f()});function f(){e.disconnect(),window.removeEventListener(\"load\",g)}function g(){let a=c();f(),a\u0026\u0026requestAnimationFrame(()=\u003e{d(),function(){let a=[\"wheel\",\"touchstart\",\"keydown\",\"pointerdown\"],c=0,e=window.scrollY,f=setInterval(()=\u003e{c+=1;let a=document.getElementById(b);if(!a||c\u003e=6)return g();let f=Math.abs(window.scrollY-e)\u003e1;if(e=window.scrollY,f)return;let h=parseFloat(getComputedStyle(a).scrollMarginTop)||0;Math.abs(a.getBoundingClientRect().top-h)\u003e4\u0026\u0026d()},350);function g(){clearInterval(f),a.forEach(a=\u003ewindow.removeEventListener(a,g))}a.forEach(a=\u003ewindow.addEventListener(a,g,{passive:!0}))}()})}window.addEventListener(\"load\",g),e.observe(document.documentElement,{childList:!0,subtree:!0}),!c()\u0026\u0026d(\"instant\")\u0026\u0026f()})(measure);\n})();"])</script><script>self.__next_f.push([1,"2c:[\"$\",\"$L2f\",null,{\"children\":[\"$\",\"$L30\",null,{\"children\":[\"$\",\"$L31\",null,{\"children\":[\"$\",\"$L32\",null,{\"pageListDataMap\":{},\"children\":[\"$\",\"$L33\",null,{\"disabled\":\"$undefined\",\"children\":[\"$\",\"$L34\",null,{\"children\":[\"$\",\"$L35\",null,{\"children\":[[\"$\",\"$L12\",null,{\"fonts\":\"$17:2:props:children:props:children:6:props:children:props:children:props:children:props:value:docsConfig:fonts\",\"theme\":\"aspen\",\"subdomain\":\"notion-demo\"}],[[\"$\",\"$L11\",null,{\"docsConfig\":\"$17:2:props:children:props:children:6:props:children:props:children:props:children:props:value:docsConfig\"}],null,[\"$\",\"$L13\",null,{\"theme\":\"aspen\"}],[\"$\",\"$L36\",null,{\"fonts\":\"$17:2:props:children:props:children:6:props:children:props:children:props:children:props:value:docsConfig:fonts\",\"children\":[\"$\",\"$L37\",null,{\"bannersByLocale\":{},\"subdomain\":\"notion-demo\",\"children\":[[\"$\",\"$L38\",null,{\"theme\":\"aspen\"}],[\"$\",\"$L27\",null,{\"strategy\":\"beforeInteractive\",\"id\":\"_mintlify-scroll-margin-script\",\"dangerouslySetInnerHTML\":{\"__html\":\"$39\"},\"suppressHydrationWarning\":true}],[\"$\",\"$L3a\",null,{\"privacy\":\"$undefined\",\"children\":[\"$\",\"$L3b\",null,{\"subdomain\":\"notion-demo\",\"isAtlas\":false,\"children\":[\"$\",\"$L3c\",null,{\"toggles\":[{\"name\":\"tiered-billing\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"editor-profile-v2\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"dashboard-editor-theseus\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"self-serve-sso\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"force-workflows-vercel-harness\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"kill-isr\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"autumn-billing-mar-2026\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"cloudflare-cache-invalidation\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"workflows-vercel-harness\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"gitlab-workflows\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"autopilot-dashboard\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"live-preview-client\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"direct-chroma-search\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"mintlify-credits-autumn-apr-2026\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"agent_harness_kb\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"agent-page\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"dashboard-auth-revamp\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"client-credentials-grant\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"agent_harness_slack_agent\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"workflows-v2\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"assistant-integrations\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"dashboard-comments\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"workflows-in-onboarding\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"viewer-role\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"agent-panel\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"autumn-enforcement-mar-2026\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"autumn-webhooks-mar-2026\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"agent-mintlify-slack\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"workflows-onboarding\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"editor-v7-file-tree\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"atlas-vercel-harness\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"onboarding-vercel-harness\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"refresh-token-auth-mcp\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"use-run-task-generate-docs-phase-queue\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"per-tenant-auth\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"agent-integrations-settings\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"per-tenant-auth-mcp\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"async-editor-publish\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"automations-pr-grouping\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"custom-prefix\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"assistant-widget\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"analytics-v7\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"composio-integrations\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"zendesk-integration\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"process-on-consumer\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"workflows-run-detail-page\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"credits-v2-jul-2026\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"call-agent-tool\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"pylon-integration\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"user-flows-analytics\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"queue-git-webhooks-produce\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"slack-agent-chat-sdk\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"org-credit-pool-jul-2026\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"preview-search-indexing\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"approve-review-flow\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"pause-universal-search-reconcile\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false}],\"children\":\"$L3d\"}]}]}]]}]}]]]}]}]}]}]}]}]}]\n"])</script><script>self.__next_f.push([1,"2e:[\"$\",\"$L3e\",null,{\"theme\":\"aspen\",\"pageMetadata\":{\"title\":\"Authorization\",\"description\":\"This guide describes the authorization flows for Notion connections and personal access tokens.\",\"href\":\"/guides/get-started/authorization\"},\"children\":[\"$\",\"$L3f\",null,{\"value\":{\"apiReferenceData\":{},\"graphqlReferenceData\":\"$undefined\"},\"children\":[\"$\",\"$L40\",null,{\"value\":{\"pageMetadata\":\"$2e:props:pageMetadata\",\"lastModified\":\"2026-08-04T23:01:38.861Z\",\"gitLastModified\":\"$undefined\",\"originalFileLocation\":\"guides/get-started/authorization.mdx\",\"description\":{\"compiledSource\":\"\\\"use strict\\\";\\nconst {jsx: _jsx} = arguments[0];\\nconst {useMDXComponents: _provideComponents} = arguments[0];\\nfunction _createMdxContent(props) {\\n  const _components = {\\n    p: \\\"p\\\",\\n    ..._provideComponents(),\\n    ...props.components\\n  };\\n  return _jsx(_components.p, {\\n    children: \\\"This guide describes the authorization flows for Notion connections and personal access tokens.\\\"\\n  });\\n}\\nfunction MDXContent(props = {}) {\\n  const {wrapper: MDXLayout} = {\\n    ..._provideComponents(),\\n    ...props.components\\n  };\\n  return MDXLayout ? _jsx(MDXLayout, {\\n    ...props,\\n    children: _jsx(_createMdxContent, {\\n      ...props\\n    })\\n  }) : _createMdxContent(props);\\n}\\nreturn {\\n  default: MDXContent\\n};\\n\",\"frontmatter\":{},\"scope\":{}},\"mdxExtracts\":{\"tableOfContents\":[{\"title\":\"What is authorization?\",\"slug\":\"what-is-authorization\",\"depth\":2,\"children\":[]},{\"title\":\"Internal connection auth flow set-up\",\"slug\":\"internal-connection-auth-flow-set-up\",\"depth\":2,\"children\":[{\"title\":\"Connection permissions\",\"slug\":\"connection-permissions\",\"depth\":3,\"children\":[]},{\"title\":\"Making API requests with an internal connection\",\"slug\":\"making-api-requests-with-an-internal-connection\",\"depth\":3,\"children\":[]}]},{\"title\":\"Personal access token authentication\",\"slug\":\"personal-access-token-authentication\",\"depth\":2,\"children\":[]},{\"title\":\"Public connection auth flow set-up\",\"slug\":\"public-connection-auth-flow-set-up\",\"depth\":2,\"children\":[{\"title\":\"How to make a public connection\",\"slug\":\"how-to-make-a-public-connection\",\"depth\":3,\"children\":[]},{\"title\":\"Public connection authorization overview\",\"slug\":\"public-connection-authorization-overview\",\"depth\":3,\"children\":[]},{\"title\":\"Step 1 - Navigate the user to the connection’s authorization URL\",\"slug\":\"step-1-navigate-the-user-to-the-connection’s-authorization-url\",\"depth\":3,\"children\":[]},{\"title\":\"Prompt for a standard connection with no template option (Default)\",\"slug\":\"prompt-for-a-standard-connection-with-no-template-option-default\",\"depth\":4,\"children\":[]},{\"title\":\"Prompt for a connection with a Notion template option\",\"slug\":\"prompt-for-a-connection-with-a-notion-template-option\",\"depth\":4,\"children\":[]},{\"title\":\"Step 2 - Notion redirects the user to the connection’s redirect URI and includes a code parameter\",\"slug\":\"step-2-notion-redirects-the-user-to-the-connection’s-redirect-uri-and-includes-a-code-parameter\",\"depth\":3,\"children\":[]},{\"title\":\"Step 3 - Send the code in a POST request to the Notion API\",\"slug\":\"step-3-send-the-code-in-a-post-request-to-the-notion-api\",\"depth\":3,\"children\":[]},{\"title\":\"Step 4 - Notion responds with an access_token , refresh_token, and additional information\",\"slug\":\"step-4-notion-responds-with-an-access_token--refresh_token-and-additional-information\",\"depth\":3,\"children\":[]},{\"title\":\"Step 5 - The connection stores the access_token and refresh_token for future requests\",\"slug\":\"step-5-the-connection-stores-the-access_token-and-refresh_token-for-future-requests\",\"depth\":3,\"children\":[]},{\"title\":\"Step 6 - Refreshing an access token\",\"slug\":\"step-6-refreshing-an-access-token\",\"depth\":3,\"children\":[]}]}],\"codeExamples\":{}},\"pageType\":\"$undefined\",\"panelMdxSource\":\"$undefined\",\"panelMdxSourceWithNoJs\":\"$undefined\",\"contextualStarterQuestions\":\"$undefined\",\"relatedPages\":\"$undefined\"},\"children\":\"$L41\"}]}]}]\n"])</script><script>self.__next_f.push([1,"42:I[604780,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"CaptchaProvider\"]\n"])</script><script>self.__next_f.push([1,"43:I[601054,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"SearchProvider\"]\n"])</script><script>self.__next_f.push([1,"44:I[28330,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"SkipToContent\"]\n"])</script><script>self.__next_f.push([1,"45:I[87732,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"AssistantLayoutWrapper\"]\n"])</script><script>self.__next_f.push([1,"46:I[118717,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/bbe9a3c9a38b4577.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"NotFoundHydrator\"]\n"])</script><script>self.__next_f.push([1,"47:I[91557,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/94496c4479252ca1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/be7f34c551fcffd1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0534993a51af00f5.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d9ca228e7af9807a.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/ac544a47bf6b23f1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d48636393ee0b554.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/1353a205bc2072e2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8bb4281d16257889.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"OpenApiProvider\"]\n"])</script><script>self.__next_f.push([1,"48:I[525343,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/94496c4479252ca1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/be7f34c551fcffd1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0534993a51af00f5.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d9ca228e7af9807a.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/ac544a47bf6b23f1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d48636393ee0b554.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/1353a205bc2072e2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8bb4281d16257889.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"TabSyncContextProvider\"]\n"])</script><script>self.__next_f.push([1,"4a:I[228341,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/94496c4479252ca1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/be7f34c551fcffd1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0534993a51af00f5.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d9ca228e7af9807a.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/ac544a47bf6b23f1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d48636393ee0b554.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/1353a205bc2072e2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8bb4281d16257889.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"PageModeUpdater\"]\n"])</script><script>self.__next_f.push([1,"4b:I[575126,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/94496c4479252ca1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/be7f34c551fcffd1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0534993a51af00f5.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d9ca228e7af9807a.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/ac544a47bf6b23f1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d48636393ee0b554.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/1353a205bc2072e2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8bb4281d16257889.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"Background\"]\n"])</script><script>self.__next_f.push([1,"3d:[\"$\",\"$L42\",null,{\"enabled\":true,\"isPreview\":false,\"children\":[\"$\",\"$L43\",null,{\"subdomain\":\"notion-demo\",\"hasChatPermissions\":true,\"isLoggedInCli\":false,\"assistantConfig\":{},\"starterQuestions\":\"$undefined\",\"children\":[[\"$\",\"$L44\",null,{}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function i(a,b,c,d){try{if(window.matchMedia(\\\"(max-width: 1024px)\\\").matches||!d){document.documentElement.style.setProperty(c,\\\"0px\\\"),document.documentElement.setAttribute(\\\"data-assistant-state\\\",\\\"closed\\\"),d||localStorage.setItem(a,\\\"false\\\");return}let e=localStorage.getItem(a);if(null===e){document.documentElement.style.setProperty(c,\\\"0px\\\"),document.documentElement.setAttribute(\\\"data-assistant-state\\\",\\\"closed\\\");return}let f=JSON.parse(e),g=localStorage.getItem(b),h=null!==g?JSON.parse(g):368;document.documentElement.style.setProperty(c,f?h+\\\"px\\\":\\\"0px\\\"),document.documentElement.setAttribute(\\\"data-assistant-state\\\",f?\\\"open\\\":\\\"closed\\\")}catch(a){document.documentElement.style.setProperty(c,\\\"0px\\\"),document.documentElement.setAttribute(\\\"data-assistant-state\\\",\\\"closed\\\")}})(\\n    \\\"chat-assistant-sheet-open\\\",\\n    \\\"chat-assistant-sheet-width\\\",\\n    \\\"--assistant-sheet-width\\\",\\n    true\\n  )\"}}],false,[\"$\",\"$L45\",null,{\"children\":[[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lf\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"$L46\",null,{\"source\":\"multitenant\"}],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],\"$undefined\"]}]]}]}]\n"])</script><script>self.__next_f.push([1,"49:T83f,"])</script><script>self.__next_f.push([1,"{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.notion.com/#organization\",\"name\":\"Notion Docs\",\"url\":\"https://developers.notion.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/notion-demo/5YdhSbldE14t5Rna/logo/light.svg?fit=max\u0026auto=format\u0026n=5YdhSbldE14t5Rna\u0026q=85\u0026s=249f5693ad929397409bf9b51d6d539d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.notion.com#website\",\"name\":\"Notion Docs\",\"url\":\"https://developers.notion.com\",\"publisher\":{\"@id\":\"https://developers.notion.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.notion.com/guides/get-started/authorization#webpage\",\"url\":\"https://developers.notion.com/guides/get-started/authorization\",\"name\":\"Authorization\",\"description\":\"This guide describes the authorization flows for Notion connections and personal access tokens.\",\"dateModified\":\"2026-08-04T23:01:38.861Z\",\"isPartOf\":{\"@id\":\"https://developers.notion.com#website\"},\"breadcrumb\":{\"@id\":\"https://developers.notion.com/guides/get-started/authorization#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.notion.com/guides/get-started/authorization#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get started\",\"item\":\"https://developers.notion.com/guides/get-started/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authorization\",\"item\":\"https://developers.notion.com/guides/get-started/authorization\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://developers.notion.com/guides/get-started/authorization#article\",\"headline\":\"Authorization\",\"name\":\"Authorization\",\"description\":\"This guide describes the authorization flows for Notion connections and personal access tokens.\",\"url\":\"https://developers.notion.com/guides/get-started/authorization\",\"mainEntityOfPage\":{\"@id\":\"https://developers.notion.com/guides/get-started/authorization#webpage\"},\"image\":\"https://developers.notion.com/images/og-image.png\",\"dateModified\":\"2026-08-04T23:01:38.861Z\",\"publisher\":{\"@id\":\"https://developers.notion.com/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.notion.com#website\"}}]}"])</script><script>self.__next_f.push([1,"4c:T6389,"])</script><script>self.__next_f.push([1,"@font-face {\n\tfont-family: \"NotionInter\";\n\tfont-weight: 400;\n\tfont-style: normal;\n\tfont-display: optional;\n\tsrc: url(\"/fonts/NotionInter-Regular.woff2\") format(\"woff2\");\n}\n@font-face {\n\tfont-family: \"NotionInter\";\n\tfont-weight: 500;\n\tfont-style: normal;\n\tfont-display: optional;\n\tsrc: url(\"/fonts/NotionInter-Medium.woff2\") format(\"woff2\");\n}\n@font-face {\n\tfont-family: \"NotionInter\";\n\tfont-weight: 600;\n\tfont-style: normal;\n\tfont-display: optional;\n\tsrc: url(\"/fonts/NotionInter-SemiBold.woff2\") format(\"woff2\");\n}\n@font-face {\n\tfont-family: \"NotionInter\";\n\tfont-weight: 700;\n\tfont-style: normal;\n\tfont-display: optional;\n\tsrc: url(\"/fonts/NotionInter-Bold.woff2\") format(\"woff2\");\n}\n@font-face {\n\tfont-family: \"NotionInter\";\n\tfont-weight: 400;\n\tfont-style: italic;\n\tfont-display: optional;\n\tsrc: url(\"/fonts/NotionInter-Italic.woff2\") format(\"woff2\");\n}\n@font-face {\n\tfont-family: \"NotionInter\";\n\tfont-weight: 500;\n\tfont-style: italic;\n\tfont-display: optional;\n\tsrc: url(\"/fonts/NotionInter-MediumItalic.woff2\") format(\"woff2\");\n}\n@font-face {\n\tfont-family: \"NotionInter\";\n\tfont-weight: 600;\n\tfont-style: italic;\n\tfont-display: optional;\n\tsrc: url(\"/fonts/NotionInter-SemiBoldItalic.woff2\") format(\"woff2\");\n}\n@font-face {\n\tfont-family: \"NotionInter\";\n\tfont-weight: 700;\n\tfont-style: italic;\n\tfont-display: optional;\n\tsrc: url(\"/fonts/NotionInter-BoldItalic.woff2\") format(\"woff2\");\n}\n\n:root {\n\t--font-notion-stack:\n\t\t\"NotionInter\", \"Inter\", -apple-system, \"system-ui\", \"Segoe UI\", Helvetica,\n\t\tArial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n}\n\nhtml,\nbody,\nbutton,\ninput,\nselect,\ntextarea,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n\tfont-family: var(--font-notion-stack);\n}\n\n/* Top-align Card icons with the title row instead of centering them between\n   the title and the description. */\n.card \u003e .flex.items-center:has([data-component-part=\"card-icon\"]) {\n\talign-items: flex-start;\n}\n\n/* Make the Card description a step smaller than the title. */\n[data-component-part=\"card-content\"] {\n\tfont-size: 0.875rem;\n\tline-height: 1.45;\n}\n\n/* Match the marketing site nav buttons: \"Log in\" ghost (no background, subtle\n   hover only) and the topbar CTA pill with tighter corners. Hover uses NDS\n   state.hover tokens (#37352f0a light / rgba(255,255,255,0.055) dark) so the\n   warm-brown tint matches the rest of the docs and app.notion.com. */\n.navbar-link \u003e a {\n\tbackground-color: transparent !important;\n}\n.navbar-link \u003e a:hover {\n\tbackground-color: #37352f0a !important;\n}\nhtml.dark .navbar-link \u003e a:hover {\n\tbackground-color: rgba(255, 255, 255, 0.055) !important;\n}\n.bg-primary-dark.rounded-xl {\n\tborder-radius: 8px !important;\n}\n\n/* Top search trigger: Mintlify defaults to Tailwind cool gray\n   (bg-gray-950/[0.03], hover:bg-gray-950/10) which reads blue-tinted next to\n   the rest of the Notion UI. Swap to NDS state tokens so the surface picks up\n   the warm-brown tint, and recolor the placeholder text + magnifying-glass\n   icon to match the gray scale used elsewhere in the docs. */\n#search-bar-entry {\n\tbackground-color: #37352f0a !important;\n\tcolor: #7d7a75 !important;\n}\n#search-bar-entry:hover {\n\tbackground-color: #37352f1a !important;\n}\n#search-bar-entry svg {\n\tcolor: #7d7a75 !important;\n}\n#search-bar-entry:hover svg {\n\tcolor: #37352f !important;\n}\nhtml.dark #search-bar-entry {\n\tbackground-color: rgba(255, 255, 255, 0.055) !important;\n\tcolor: rgba(255, 255, 255, 0.5) !important;\n}\nhtml.dark #search-bar-entry:hover {\n\tbackground-color: rgba(255, 255, 255, 0.129) !important;\n}\nhtml.dark #search-bar-entry svg {\n\tcolor: rgba(255, 255, 255, 0.5) !important;\n}\nhtml.dark #search-bar-entry:hover svg {\n\tcolor: #ffffff !important;\n}\n\n/* Mobile-only search trigger (icon-only button shown below the lg breakpoint).\n   The icon is rendered as a CSS mask whose color comes from the element's\n   background, so we set both color and background-color to the same value. */\n#search-bar-entry-mobile,\n#search-bar-entry-mobile svg {\n\tcolor: #7d7a75 !important;\n\tbackground-color: #7d7a75 !important;\n}\n#search-bar-entry-mobile:hover,\n#search-bar-entry-mobile:hover svg {\n\tcolor: #37352f !important;\n\tbackground-color: #37352f !important;\n}\nhtml.dark #search-bar-entry-mobile,\nhtml.dark #search-bar-entry-mobile svg {\n\tcolor: rgba(255, 255, 255, 0.5) !important;\n\tbackground-color: rgba(255, 255, 255, 0.5) !important;\n}\nhtml.dark #search-bar-entry-mobile:hover,\nhtml.dark #search-bar-entry-mobile:hover svg {\n\tcolor: #ffffff !important;\n\tbackground-color: #ffffff !important;\n}\n\n/* Theme toggle (sun/moon button next to the topbar CTA): Mintlify defaults to\n   bg-gray-800/[0.04] which is cool gray. Add a hover state and warm both\n   resting + hover to NDS state tokens for parity with the rest of the chrome. */\nbutton[data-component-name=\"theme-toggle\"] {\n\tbackground-color: #37352f0a !important;\n}\nbutton[data-component-name=\"theme-toggle\"]:hover {\n\tbackground-color: #37352f1a !important;\n}\nhtml.dark button[data-component-name=\"theme-toggle\"] {\n\tbackground-color: rgba(255, 255, 255, 0.055) !important;\n}\nhtml.dark button[data-component-name=\"theme-toggle\"]:hover {\n\tbackground-color: rgba(255, 255, 255, 0.129) !important;\n}\nbutton[data-component-name=\"theme-toggle\"] svg {\n\tcolor: #7d7a75 !important;\n}\nbutton[data-component-name=\"theme-toggle\"]:hover svg {\n\tcolor: #37352f !important;\n}\nhtml.dark button[data-component-name=\"theme-toggle\"] svg {\n\tcolor: rgba(255, 255, 255, 0.5) !important;\n}\nhtml.dark button[data-component-name=\"theme-toggle\"]:hover svg {\n\tcolor: #ffffff !important;\n}\n\n/* Navbar bottom border: Mintlify uses border-gray-100 (cool) / border-gray-800\n   in dark. Swap to NDS gray border tokens (warm-brown) for parity with the\n   sidebar border and content dividers. */\n#navbar [class*=\"border-gray-100\"] {\n\tborder-color: #e6e5e3 !important;\n}\nhtml.dark #navbar [class*=\"border-gray-800\"] {\n\tborder-color: rgba(255, 255, 255, 0.094) !important;\n}\n\n/* Top tab hover underline (API Reference / Changelog / Examples). Mintlify\n   uses bg-gray-200 / bg-gray-700 — cool grays. Match the NDS border token in\n   light mode and the same translucent-white the sidebar uses in dark. */\n.nav-tabs-item div[class*=\"bg-gray-200\"] {\n\tbackground-color: #e6e5e3 !important;\n}\nhtml.dark .nav-tabs-item div[class*=\"bg-gray-700\"] {\n\tbackground-color: rgba(255, 255, 255, 0.18) !important;\n}\n\n/* Sidebar right edge + within-sidebar group dividers. Same swap from cool\n   border-gray-100 to NDS warm border-primary. In dark mode the sidebar uses\n   border-white/10, so target that as well. */\n#sidebar-content[class*=\"border-gray-100\"] {\n\tborder-color: #e6e5e3 !important;\n}\nhtml.dark #sidebar-content[class*=\"border-white\"] {\n\tborder-color: rgba(255, 255, 255, 0.094) !important;\n}\n.sidebar-nav-group-divider {\n\tbackground-color: #e6e5e3 !important;\n}\nhtml.dark .sidebar-nav-group-divider {\n\tbackground-color: rgba(255, 255, 255, 0.094) !important;\n}\n\n/* Sidebar leaf text colors. Mintlify defaults to text-gray-700 (cool) with a\n   text-gray-900 hover. Snap both to NDS text tokens (warm). The dark-mode\n   side is already handled further down via the prose-invert + sidebar-group\n   overrides; this block targets light mode. */\n:is(a, button)[class*=\"outline-offset\"][class*=\"text-gray-700\"] {\n\tcolor: #37352f !important;\n}\n:is(a, button)[class*=\"outline-offset\"][class*=\"hover:text-gray-900\"]:hover {\n\tcolor: #37352f !important;\n}\n\n/* Sidebar collapse chevron next to expandable groups. Defaults to text-gray-400\n   with a hover bump to text-gray-600 — both cool. Use NDS text tertiary /\n   secondary so the chevron matches the surrounding row. */\n:is(a, button)[class*=\"outline-offset\"]\n\tsvg[class*=\"text-gray-400\"][class*=\"group-hover:text-gray-600\"] {\n\tcolor: #ada9a3 !important;\n}\n:is(a, button)[class*=\"outline-offset\"]:hover\n\tsvg[class*=\"text-gray-400\"][class*=\"group-hover:text-gray-600\"] {\n\tcolor: #7d7a75 !important;\n}\n\n/* Card chrome (used on the home page grid of API areas):\n     - border-gray-950/10 → NDS border primary (warm)\n     - title text-gray-800 → NDS text primary\n     - content text-gray-600 → NDS text secondary\n     - arrow text-gray-400/500 → NDS text tertiary\n*/\n.card[class*=\"border-gray-950\"] {\n\tborder-color: #e6e5e3 !important;\n}\nhtml.dark .card[class*=\"border-white\"] {\n\tborder-color: rgba(255, 255, 255, 0.094) !important;\n}\n[data-component-part=\"card-title\"] {\n\tcolor: #37352f !important;\n}\nhtml.dark [data-component-part=\"card-title\"] {\n\tcolor: #ffffff !important;\n}\n[data-component-part=\"card-content\"] {\n\tcolor: #7d7a75 !important;\n}\nhtml.dark [data-component-part=\"card-content\"] {\n\tcolor: #ada9a3 !important;\n}\n#card-link-arrow-icon {\n\tcolor: #ada9a3 !important;\n}\nhtml.dark #card-link-arrow-icon {\n\tcolor: #7d7a75 !important;\n}\n\n/* Tighten sidebar nav item corners — Mintlify defaults to rounded-xl (12px),\n   which reads too soft at this size. Covers both leaf links (\u003ca\u003e) and\n   collapsible group rows (\u003cbutton\u003e). */\n:is(a, button)[class*=\"outline-offset\"][class*=\"rounded-xl\"] {\n\tborder-radius: 6px !important;\n}\n\n/* Mintlify simulates bold on the active sidebar item with a text-shadow\n   trick. Drop it and use the real 600 cut from NotionInter. */\na[class*=\"text-shadow\"] {\n\ttext-shadow: none !important;\n\tfont-weight: 600 !important;\n}\n\n/* Disable automatic hyphenation in sidebar nav labels. Mintlify lets the\n   browser hyphenate long labels, so in the narrow sidebar entries like\n   \"Personal access tokens\" break mid-word into \"to-kens\". Turning hyphens\n   off makes each word wrap atomically at whitespace instead. */\n.sidebar-group :is(a, button, span) {\n\thyphens: none !important;\n}\n\n/* Dark-mode nav accents: keep them neutral (white) instead of inheriting\n   the primary-light blue. Mirrors the black/gray accents in light mode so\n   tabs / sidebar / TOC stay visually consistent across themes. Content\n   links and CTA buttons keep their blue. */\n\n/* Sidebar leaf links and collapsible group rows */\nhtml.dark :is(a, button)[class*=\"outline-offset\"][class*=\"text-primary-light\"] {\n\tcolor: #ffffff !important;\n}\nhtml.dark :is(a, button)[class*=\"outline-offset\"][class*=\"bg-primary-light\"] {\n\tbackground-color: rgba(255, 255, 255, 0.129) !important;\n}\n\n/* Align sidebar item hover + active backgrounds with NDS state tokens so the\n   docs sidebar matches app.notion.com. Mintlify defaults:\n     - active: bg-primary/10        → rgba(0, 0, 0, 0.10), cool\n     - hover:  hover:bg-gray-600/5  → Tailwind cool gray\n   NDS values (from src/shared-styles/colors/tokens/...):\n     - state.pressed (light) = #37352f1a   (warm-brown, 10% alpha)\n     - state.hover   (light) = #37352f0a   (warm-brown, 4% alpha)\n     - state.pressed (dark)  = rgba(255, 255, 255, 0.129)\n     - state.hover   (dark)  = rgba(255, 255, 255, 0.055) */\n:is(a, button)[class*=\"outline-offset\"][class*=\"bg-primary/10\"] {\n\tbackground-color: #37352f1a !important;\n}\n:is(a, button)[class*=\"outline-offset\"][class*=\"hover:bg-gray-600\"]:hover {\n\tbackground-color: #37352f0a !important;\n}\nhtml.dark\n\t:is(a, button)[class*=\"outline-offset\"][class*=\"hover:bg-gray-200\"]:hover {\n\tbackground-color: rgba(255, 255, 255, 0.055) !important;\n}\n\n/* TOC active item — H2-level (border + text on the same \u003ca\u003e) */\nhtml.dark a[class*=\"border-primary-light\"][class*=\"text-primary-light\"] {\n\tcolor: #ffffff !important;\n\tborder-color: #ffffff !important;\n}\n\n/* TOC active item — H3-level sub-item (border on .toc-item parent, text on\n   the inner \u003ca\u003e) */\nhtml.dark .toc-item[class*=\"border-primary\"] {\n\tborder-color: #ffffff !important;\n}\nhtml.dark .toc-item a[class*=\"text-primary-light\"] {\n\tcolor: #ffffff !important;\n}\n\n/* Top tab active state — text on \u003ca\u003e, underline on a child \u003cdiv\u003e */\nhtml.dark a.nav-tabs-item[class*=\"text-primary\"] {\n\tcolor: #ffffff !important;\n}\nhtml.dark a.nav-tabs-item div[class*=\"bg-primary-light\"] {\n\tbackground-color: #ffffff !important;\n}\n\n/* Page eyebrow defaults to the primary color (black in light, blue in dark).\n   Use a neutral mid-gray instead so it reads as a quiet supertitle. */\n.eyebrow {\n\tcolor: #78736f !important;\n}\nhtml.dark .eyebrow {\n\tcolor: #a3a39e !important;\n}\n\n/* Hide the left sidebar on long-form one-page tabs (Changelog, Examples).\n   The right-hand \"On this page\" TOC is preserved so readers can still jump\n   around. Mintlify's SPA updates html[data-current-path] on navigation, so\n   this activates the moment the route changes — no full reload needed.\n   Add more paths to the :is() list to opt additional pages into this\n   \"no-sidebar, full-bleed\" layout. */\nhtml:is(\n\t[data-current-path=\"/page/changelog\"],\n\t[data-current-path=\"/page/examples\"]\n)\n#sidebar-content {\n\tdisplay: none !important;\n}\n\n/* With the sidebar gone, expand the content out to the left so its first\n   column starts at the page edge. Mintlify's #content-container is the\n   culprit: it has `mx-auto max-w-6xl lg:pl-[5.5rem]`, which centers a\n   72rem-wide column AND adds 88px of internal left padding on top — leaving\n   ~110px of empty space on the left even after the sidebar is hidden. Zero\n   out the left-side mx-auto and the max-w cap; the right side keeps its\n   breathing room for the TOC, and the original `lg:pl-[5.5rem]` stays put\n   so the content still has a comfortable left gutter. */\nhtml:is(\n\t[data-current-path=\"/page/changelog\"],\n\t[data-current-path=\"/page/examples\"]\n)\n#content-container {\n\tmax-width: none !important;\n\tmargin-left: 0 !important;\n}\n\n/* The inner #content-area also has `mx-auto`, which would re-center it\n   inside the now-full-width container. Kill the auto margins so its existing\n   `grow` (flex-grow: 1) actually claims the freed space. */\nhtml:is(\n\t[data-current-path=\"/page/changelog\"],\n\t[data-current-path=\"/page/examples\"]\n)\n#content-area {\n\tmargin-left: 0 !important;\n\tmargin-right: 0 !important;\n}\n\n/* Render \u003cUpdate\u003e bodies on the changelog with `prose`-equivalent sizing\n   instead of Mintlify's hardcoded `prose-sm` (14px). The class is baked\n   into the component and can't be changed from MDX, so we bump the\n   container font-size from 0.875rem → 1rem. prose-sm uses em-relative\n   spacing for children, so they scale up proportionally — no per-element\n   overrides needed. */\nhtml[data-current-path=\"/page/changelog\"]\n[data-component-part=\"update-content\"] {\n\tfont-size: 1rem;\n}\n\n/* Sidebar group titles (\"Get started\", \"Data APIs\", etc.) render as\n   \u003ch5 id=\"sidebar-title\"\u003e with Mintlify's default near-black color. Push\n   them to the same neutral gray as the page eyebrow so they read as quiet\n   section labels above the nav rows, not full-strength body text. */\nh5#sidebar-title {\n\tcolor: #78736f !important;\n}\nhtml.dark h5#sidebar-title {\n\tcolor: #a3a39e !important;\n}\n\n/* Mintlify's dark-mode neutrals read too dim against the near-black background\n   (h1 ~#dedede, body/sidebar/TOC ~#9e9e9e). Bump page title to pure white and\n   shift dim grays up to ~#c7c7c7 so the contrast feels closer to light mode.\n   Body copy is rendered through the Tailwind Typography plugin's prose-invert\n   variant — overriding its CSS vars catches paragraphs, list items, spans,\n   and table cells in one shot. */\nhtml.dark [class*=\"prose-invert\"] {\n\tcolor: #c7c7c7 !important;\n\t--tw-prose-invert-body: #c7c7c7 !important;\n\t--tw-prose-invert-bullets: #c7c7c7 !important;\n\t--tw-prose-invert-counters: #c7c7c7 !important;\n}\nhtml.dark h1#page-title {\n\tcolor: #ffffff !important;\n}\nhtml.dark #header p {\n\tcolor: #c7c7c7 !important;\n}\nhtml.dark #table-of-contents-content a {\n\tcolor: #c7c7c7 !important;\n}\nhtml.dark .sidebar-group a:not([class*=\"text-shadow\"]),\nhtml.dark .sidebar-group button {\n\tcolor: #c7c7c7 !important;\n}\n\n/* Notion-style content links: inherit body text color with a soft gray\n   underline at rest, full-strength text-color underline on hover. Scoped\n   to the article body via #content so we don't disturb sidebar nav,\n   banner, TOC, or card links. */\n#content a.link {\n\tcolor: inherit !important;\n\ttext-decoration: underline !important;\n\ttext-decoration-color: rgba(55, 53, 47, 0.25) !important;\n\ttext-underline-offset: 3px !important;\n\ttext-decoration-thickness: 1px !important;\n\tborder-bottom: 0 !important;\n\tfont-weight: inherit !important;\n}\n#content a.link:hover {\n\tcolor: inherit !important;\n\ttext-decoration-color: currentColor !important;\n}\nhtml.dark #content a.link {\n\ttext-decoration-color: rgba(255, 255, 255, 0.25) !important;\n}\nhtml.dark #content a.link:hover {\n\ttext-decoration-color: currentColor !important;\n}\n\n/* Notion-aligned callout colors. Mintlify defaults to Tailwind palette\n   (bg-blue-50, etc); these overrides snap the surface, border, and icon\n   to NDS values. */\n.callout[class*=\"bg-blue\"] {\n\tbackground-color: #e5f2fc !important;\n\tborder-color: #b6d4f3 !important;\n}\n.callout[class*=\"bg-blue\"] [data-component-part=\"callout-icon\"],\n.callout[class*=\"bg-blue\"] [data-component-part=\"callout-icon\"] svg {\n\tcolor: #2783de !important;\n}\n.callout[class*=\"bg-blue\"] [data-component-part=\"callout-content\"] {\n\tcolor: #355f8b !important;\n}\n.callout[class*=\"bg-green\"] {\n\tbackground-color: #e8f1ec !important;\n\tborder-color: #bed9c9 !important;\n}\n.callout[class*=\"bg-green\"] [data-component-part=\"callout-icon\"],\n.callout[class*=\"bg-green\"] [data-component-part=\"callout-icon\"] svg {\n\tcolor: #46a171 !important;\n}\n.callout[class*=\"bg-green\"] [data-component-part=\"callout-content\"] {\n\tcolor: #37674c !important;\n}\n.callout[class*=\"bg-yellow\"] {\n\tbackground-color: #f9f3dc !important;\n\tborder-color: #e8d497 !important;\n}\n.callout[class*=\"bg-yellow\"] [data-component-part=\"callout-icon\"],\n.callout[class*=\"bg-yellow\"] [data-component-part=\"callout-icon\"] svg {\n\tcolor: #d8a32f !important;\n}\n.callout[class*=\"bg-yellow\"] [data-component-part=\"callout-content\"] {\n\tcolor: #836426 !important;\n}\n.callout[class*=\"bg-red\"] {\n\tbackground-color: #fce9e7 !important;\n\tborder-color: #f0c5be !important;\n}\n.callout[class*=\"bg-red\"] [data-component-part=\"callout-icon\"],\n.callout[class*=\"bg-red\"] [data-component-part=\"callout-icon\"] svg {\n\tcolor: #e56458 !important;\n}\n.callout[class*=\"bg-red\"] [data-component-part=\"callout-content\"] {\n\tcolor: #924943 !important;\n}\n.callout[class*=\"bg-neutral\"],\n.callout[class*=\"bg-gray\"] {\n\tbackground-color: #f0efed !important;\n\tborder-color: #e6e5e3 !important;\n}\n.callout[class*=\"bg-neutral\"] [data-component-part=\"callout-icon\"],\n.callout[class*=\"bg-gray\"] [data-component-part=\"callout-icon\"],\n.callout[class*=\"bg-neutral\"] [data-component-part=\"callout-icon\"] svg,\n.callout[class*=\"bg-gray\"] [data-component-part=\"callout-icon\"] svg {\n\tcolor: #5f5e59 !important;\n}\n.callout[class*=\"bg-neutral\"] [data-component-part=\"callout-content\"],\n.callout[class*=\"bg-gray\"] [data-component-part=\"callout-content\"] {\n\tcolor: #494846 !important;\n}\n\n/* Dark-mode callout surfaces use a tinted overlay derived from the same\n   accent so the callout still reads as a flavored surface. */\nhtml.dark .callout[class*=\"bg-blue\"] {\n\tbackground-color: rgba(39, 131, 222, 0.12) !important;\n\tborder-color: rgba(39, 131, 222, 0.3) !important;\n}\nhtml.dark .callout[class*=\"bg-green\"] {\n\tbackground-color: rgba(70, 161, 113, 0.12) !important;\n\tborder-color: rgba(70, 161, 113, 0.3) !important;\n}\nhtml.dark .callout[class*=\"bg-yellow\"] {\n\tbackground-color: rgba(216, 163, 47, 0.12) !important;\n\tborder-color: rgba(216, 163, 47, 0.3) !important;\n}\nhtml.dark .callout[class*=\"bg-red\"] {\n\tbackground-color: rgba(229, 100, 88, 0.12) !important;\n\tborder-color: rgba(229, 100, 88, 0.3) !important;\n}\nhtml.dark .callout[class*=\"bg-neutral\"],\nhtml.dark .callout[class*=\"bg-gray\"] {\n\tbackground-color: rgba(255, 255, 255, 0.05) !important;\n\tborder-color: rgba(255, 255, 255, 0.12) !important;\n}\nhtml.dark .callout[class*=\"bg-blue\"] [data-component-part=\"callout-content\"] {\n\tcolor: #9dc0ea !important;\n}\nhtml.dark .callout[class*=\"bg-green\"] [data-component-part=\"callout-content\"] {\n\tcolor: #a6c7b4 !important;\n}\nhtml.dark .callout[class*=\"bg-yellow\"] [data-component-part=\"callout-content\"] {\n\tcolor: #e2ca88 !important;\n}\nhtml.dark .callout[class*=\"bg-red\"] [data-component-part=\"callout-content\"] {\n\tcolor: #e0aea6 !important;\n}\nhtml.dark .callout[class*=\"bg-neutral\"] [data-component-part=\"callout-content\"],\nhtml.dark .callout[class*=\"bg-gray\"] [data-component-part=\"callout-content\"] {\n\tcolor: #bcbab6 !important;\n}\n\n/* Inside callouts, strip the link blue and just rely on an underline so the\n   link doesn't fight with the colored callout chrome. */\n.callout a.link,\n#content .callout a.link {\n\tcolor: inherit !important;\n\ttext-decoration: underline !important;\n\tborder-bottom: 0 !important;\n}\n.callout a.link:hover,\n#content .callout a.link:hover {\n\tcolor: inherit !important;\n\ttext-decoration: underline !important;\n}\n\n/* Recolor Card icons to Notion blue. The icons are loaded as \u003cimg\u003e tags so\n   they can't pick up CSS color/fill — this filter recipe converts the black\n   render to ~#0075de in light mode and ~#097fe8 in dark. */\n[data-component-part=\"card-icon\"] img {\n\tfilter: brightness(0) saturate(100%) invert(31%) sepia(85%) saturate(2280%)\n\t\thue-rotate(196deg) brightness(96%) contrast(101%);\n}\nhtml.dark [data-component-part=\"card-icon\"] img {\n\tfilter: brightness(0) saturate(100%) invert(45%) sepia(98%) saturate(1480%)\n\t\thue-rotate(196deg) brightness(101%) contrast(96%);\n}\n\n/* Match brand-icon widths to NDS icons. Mintlify renders brand icons (icon=\n   \"node-js\", \"npm\", \"github\", etc) as an empty \u003csvg\u003e with size-6 (24×24)\n   and a mask-image of the FA brand asset. That makes them noticeably wider\n   than the NDS icons next to them, which render as \u003cimg\u003e from a 20×20\n   viewBox and end up ~20×24 inside the same size-6 container. Clamp the\n   brand SVGs to 20×20 (and pin mask-size: contain so the masked icon scales\n   instead of being clipped) so mixed rows of brand + NDS icons feel even. */\n[data-component-part=\"card-icon\"] \u003e svg {\n\twidth: 1.25rem !important;\n\theight: 1.25rem !important;\n\tmask-size: contain !important;\n\t-webkit-mask-size: contain !important;\n}\n\n/* Replace the heavy primary-color ring on Card hover with a soft elevation\n   shadow that mimics Notion's hovered card cards. */\n.card {\n\ttransition:\n\t\tbox-shadow 180ms ease-out,\n\t\tborder-color 180ms ease-out;\n}\n.card:hover {\n\t--tw-ring-shadow: 0 0 #0000 !important;\n\t--tw-ring-color: transparent !important;\n\tborder-color: transparent !important;\n\tbox-shadow:\n\t\t0 0 0 1px rgba(0, 0, 0, 0.06),\n\t\t0 4px 10px rgba(15, 15, 15, 0.05),\n\t\t0 1px 3px rgba(15, 15, 15, 0.04) !important;\n}\n/* Dark hover: drop shadows read as muddy on the dark surface, so just brighten\n   the existing border slightly and skip the shadow layers. */\nhtml.dark .card:hover {\n\t--tw-ring-shadow: 0 0 #0000 !important;\n\t--tw-ring-color: transparent !important;\n\tborder-color: rgba(255, 255, 255, 0.18) !important;\n\tbox-shadow: none !important;\n}\n\n/* Bottom-of-page Previous/Next pagination: drop the boxed treatment for a\n   clean text-only pair. */\na[class*=\"border-gray-200/70\"][class*=\"rounded-xl\"][class*=\"py-3\"][class*=\"px-4\"] {\n\tborder: 0 !important;\n\tpadding: 0 !important;\n}\n\n/* Tighten the monospace code-block size from 14px to 12px so multi-line\n   snippets feel less heavy. Tab labels keep the default 14px since they\n   sit in the chrome alongside the copy button. */\n[data-component-part=\"code-block-root\"],\n[data-component-part=\"code-block-root\"] pre,\n[data-component-part=\"code-block-root\"] code,\n[data-component-part=\"code-block-root\"] code * {\n\tfont-size: 12px !important;\n\tline-height: 20px !important;\n}\n\n/* \"Copy page\" / chevron split button at the top of each page: tighten the\n   12px outer corners and shrink the label from text-sm (14px) to 12px so\n   the control reads as utility chrome rather than a CTA. The hover/active\n   surfaces also need to be remapped to NDS state tokens — Mintlify defaults\n   to Tailwind cool grays. */\n#page-context-menu [class*=\"rounded-l-xl\"] {\n\tborder-radius: 6px 0 0 6px !important;\n}\n#page-context-menu [class*=\"rounded-r-xl\"] {\n\tborder-radius: 0 6px 6px 0 !important;\n}\n#page-context-menu [class*=\"text-sm\"] {\n\tfont-size: 12px !important;\n}\n#page-context-menu :is(button, a)[class*=\"bg-gray\"],\n#page-context-menu :is(button, a)[class*=\"border-gray\"] {\n\tbackground-color: transparent !important;\n\tborder-color: #e6e5e3 !important;\n}\n#page-context-menu :is(button, a):hover {\n\tbackground-color: #37352f0a !important;\n}\nhtml.dark #page-context-menu :is(button, a)[class*=\"bg-gray\"],\nhtml.dark #page-context-menu :is(button, a)[class*=\"border-gray\"] {\n\tborder-color: rgba(255, 255, 255, 0.094) !important;\n}\nhtml.dark #page-context-menu :is(button, a):hover {\n\tbackground-color: rgba(255, 255, 255, 0.055) !important;\n}\n\n/* Changelog date labels (the pill next to each \u003cUpdate\u003e): Mintlify defaults\n   to text-sm on a primary-tinted background. Shrink the type and swap to a\n   lighter neutral gray so the date reads as a quiet timestamp rather than a\n   badge. */\n[data-component-part=\"update-label\"] {\n\tbackground-color: #f7f6f3 !important;\n\tcolor: #5f5e59 !important;\n\tfont-size: 14px !important;\n\tline-height: 20px !important;\n\tfont-weight: 400 !important;\n}\nhtml.dark [data-component-part=\"update-label\"] {\n\tbackground-color: rgba(255, 255, 255, 0.04) !important;\n\tcolor: #bcbab6 !important;\n}\n\n/* Tooltips (e.g. the \"Copy\" label on code-block copy buttons): Mintlify\n   renders the visible tooltip as a div with `text-tooltip-foreground` and\n   `bg-primary-dark` (Notion blue). Swap to a black bubble with white text. */\n[class*=\"text-tooltip-foreground\"] {\n\tbackground-color: #1f1f1d !important;\n\tcolor: #ffffff !important;\n\tborder-color: #1f1f1d !important;\n}\n"])</script><script>self.__next_f.push([1,"41:[\"$\",\"$L47\",null,{\"pageMetadata\":\"$2e:props:pageMetadata\",\"mdxExtracts\":\"$2e:props:children:props:children:props:value:mdxExtracts\",\"openApiReferenceData\":\"$undefined\",\"children\":[\"$\",\"$L48\",null,{\"children\":[[\"$\",\"script\",null,{\"type\":\"application/ld+json\",\"dangerouslySetInnerHTML\":{\"__html\":\"$49\"}}],[[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"document.documentElement.setAttribute('data-page-mode', \\\"none\\\");\"}}],[\"$\",\"$L4a\",null,{\"pageMetadata\":\"$2e:props:pageMetadata\"}]],[\"$\",\"$L4b\",null,{\"pageMetadata\":\"$2e:props:pageMetadata\"}],[[\"$\",\"style\",\"0\",{\"data-custom-css-index\":0,\"data-custom-css-path\":\"style.css\",\"dangerouslySetInnerHTML\":{\"__html\":\"$4c\"}}]],\"$L4d\",\"$L4e\"]}]}]\n"])</script><script>self.__next_f.push([1,"4f:I[36098,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/94496c4479252ca1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/be7f34c551fcffd1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0534993a51af00f5.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d9ca228e7af9807a.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/ac544a47bf6b23f1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d48636393ee0b554.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/1353a205bc2072e2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8bb4281d16257889.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"CustomJsFiles\"]\n"])</script><script>self.__next_f.push([1,"50:I[530359,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/94496c4479252ca1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/be7f34c551fcffd1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0534993a51af00f5.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d9ca228e7af9807a.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/ac544a47bf6b23f1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d48636393ee0b554.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/1353a205bc2072e2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8bb4281d16257889.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"MDXContentController\"]\n"])</script><script>self.__next_f.push([1,"51:I[448287,[\"/mintlify-assets/_next/static/chunks/dbec6d618ca953dc.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/adc25738f338aef0.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/5cef6355575ab0a2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8f67bf095c00b60e.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d5d9a7e9a99b7523.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/21232b734a5d3c05.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/28168a9f128ca063.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/93547d7f17b78422.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/23bc28adc0570f79.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/eea398f2a77f0884.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d1e2d2b721e56bbf.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d619bd614f0bfd6b.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/94496c4479252ca1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/be7f34c551fcffd1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/0534993a51af00f5.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d9ca228e7af9807a.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/ac544a47bf6b23f1.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/d48636393ee0b554.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/1353a205bc2072e2.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\",\"/mintlify-assets/_next/static/chunks/8bb4281d16257889.js?dpl=dpl_2HoCPhodiNdQCGFHuj6wuuZTb4Yb\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"4d:[\"$\",\"$L4f\",null,{\"customJsDisabled\":false,\"jsFiles\":[]}]\n52:T17146,"])</script><script>self.__next_f.push([1,"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const developerPortalUrl=`https://www.notion.so/developers`;const developerConnectionsUrl=`https://app.notion.com/developers/connections`;function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Frame,Heading,Note,OptimizedImage,Step,Steps,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`what-is-authorization`,children:`What is authorization?`}),`\n`,_jsxs(_components.p,{children:[`Authorization is the process of granting a connection or token access to Notion data. `,_jsx(_components.a,{href:`/guides/get-started/internal-connections`,children:`Internal connections`}),` use a static API token, `,_jsx(_components.a,{href:`/guides/get-started/personal-access-tokens`,children:`personal access tokens`}),` use a user-scoped static API token, and `,_jsx(_components.a,{href:`/guides/get-started/public-connections`,children:`public connections`}),` use the `,_jsx(_components.a,{href:`https://oauth.net/2/`,children:`OAuth 2.0`}),` protocol.`]}),`\n`,_jsx(Heading,{level:`2`,id:`internal-connection-auth-flow-set-up`,children:`Internal connection auth flow set-up`}),`\n`,_jsxs(_components.p,{children:[`To use an internal connection, start by creating your connection in the `,_jsx(`a`,{href:developerConnectionsUrl,children:`Developer portal`}),`.`]}),`\n`,_jsx(_components.p,{children:`The internal connection will be associated with the workspace of your choice. You are required to be a workspace owner to create a connection.`}),`\n`,_jsx(Frame,{caption:`Create a new connection from the Developer portal.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=6fcebc5334c9c3499b58208b91b798ae`,\"data-og-width\":`1198`,width:`1198`,\"data-og-height\":`699`,height:`699`,\"data-path\":`images/docs/fd25d1f-integrations_7.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=280\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=cb7c51998785b7c2f88f11658014be5f 280w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=560\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=c1a92ab2d5c7413c6d73c288ed84246b 560w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=840\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=49f8e846a3495e9674129bdbbd4a51c8 840w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=1100\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=5638368c0a7c3e876d0945aee50d8f26 1100w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=1650\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=aeba43b917d31cb847d5c044ccc83627 1650w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=2500\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=a3d54f2aa4e0405039a9a88ac58733db 2500w`})}),`\n`,_jsxs(_components.p,{children:[`Once the connection is created, you can update its settings as needed under the `,_jsx(_components.code,{children:`Configuration`}),` tab and retrieve the installation access token in this tab.`]}),`\n`,_jsx(_components.p,{children:`The installation access token will be used to authenticate REST API requests. The connection sends the same token in every API request.`}),`\n`,_jsx(Frame,{caption:`Find the installation access token in the Configuration tab.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=34d293a88ef5911ff43aefe4dde91e2d`,\"data-og-width\":`1198`,width:`1198`,\"data-og-height\":`699`,height:`699`,\"data-path\":`images/docs/69c7487-integrations_8.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=280\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=9af91249ad204650765be96b857ab205 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=560\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=db81a6d3d2f63dcffaba7bc3a004f38e 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=840\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=bdc99c1625bd6e736addf812ff924d98 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=1100\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=2c859481c58b6b96aa82ae1354373c81 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=1650\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=147a15fb10f97a9601b754da8d71d45c 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=2500\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=2cfdc4db42a0f68849cefb49df7d7b84 2500w`})}),`\n`,_jsx(Heading,{level:`3`,id:`connection-permissions`,children:`Connection permissions`}),`\n`,_jsxs(_components.p,{children:[`Before a connection can interact with your Notion workspace page(s), the page must be manually shared with the connection. To share a page with a connection, visit the page in your Notion workspace, click the ••• menu at the top right of a page, scroll down to `,_jsx(_components.code,{children:`Add connections`}),`, and use the search bar to find and select the connection from the dropdown list.`]}),`\n`,_jsx(_components.p,{children:`Once the connection is shared, you can start making API requests. If the page is not shared, any API requests made will respond with an error.`}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Never share your installation access token`})}),_jsx(_components.p,{children:`Your installation access token is a secret. To keep your connection secure, never store the token in your source code or commit it in version control. Instead, read the token from an environment variable. Use a secret manager or deployment system to set the token in the environment.`}),_jsx(_components.p,{children:_jsx(_components.a,{href:`/guides/get-started/handling-api-keys`,children:`Learn more: Best Practices for Handling API Keys`})})]}),`\n`,_jsx(Heading,{level:`3`,id:`making-api-requests-with-an-internal-connection`,children:`Making API requests with an internal connection`}),`\n`,_jsxs(_components.p,{children:[`Any time your connection interacts with your workspace, include the installation access token in the `,_jsx(_components.code,{children:`Authorization`}),` header with every API request. However, if you are using Notion’s `,_jsx(_components.a,{href:`https://github.com/makenotion/notion-sdk-js`,children:`SDK for JavaScript`}),` to interact with the REST API, the token is set once when a client is initialized.`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`HTTP`,numberOfLines:`2`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`GET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v1/pages/b55c9c91-384d-452b-81db-d1ef79372b75 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`HTTP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Bearer {INTEGRATION_TOKEN}`})]}),`\n`]})})})}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`10`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`Client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` require`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"@notionhq/client\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Initializing a client`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` notion`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tauth:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`NOTION_TOKEN`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getUsers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=\u003e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\tconst`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` listUsersResponse`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` notion`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`users`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`list`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({})`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsxs(Note,{children:[_jsxs(_components.p,{children:[`If you are not using the `,_jsx(_components.a,{href:`https://github.com/makenotion/notion-sdk-js`,children:`Notion SDK for JavaScript`}),`, also set the `,_jsx(_components.a,{href:`/reference/versioning`,children:_jsx(_components.code,{children:`Notion-Version`})}),` and `,_jsx(_components.a,{href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type`,children:_jsx(_components.code,{children:`Content-type`})}),` headers in all of your requests, like so:`]}),_jsx(CodeBlock,{filename:`JSON`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`  Authorization`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:\"`Bearer\"}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` $`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`process.env.NOTION_TOKEN`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`  \"Notion-Version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-03-11\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`  \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`If you receive an error response from the API, check if the connection has been properly `,_jsx(_components.a,{href:`https://www.notion.com/help/add-and-manage-connections-with-the-api#manage-connections-in-your-workspace`,children:`added to the page`}),`. If this does not solve the problem, refer to our `,_jsx(_components.a,{href:`/reference/status-codes`,children:`Status codes`}),` page for more information.`]}),`\n`,_jsx(Heading,{level:`2`,id:`personal-access-token-authentication`,children:`Personal access token authentication`}),`\n`,_jsxs(_components.p,{children:[`Personal access tokens (PATs) are created directly by a Notion user in the `,_jsx(`a`,{href:developerPortalUrl,children:`Developer portal`}),`. There is no OAuth flow and no page picker. A PAT acts as the user who created it and uses that user’s permissions in the selected workspace.`]}),`\n`,_jsx(_components.p,{children:`Use a PAT when a script, CLI workflow, Worker, or trusted tool should act as you. Use an internal connection for team-owned workspace automations, or a public connection when other Notion users need to install your app.`}),`\n`,_jsxs(_components.p,{children:[`PATs use the same `,_jsx(_components.code,{children:`Authorization`}),` header as other Notion API tokens:`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`HTTP`,numberOfLines:`3`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`GET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v1/users/me `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`HTTP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Bearer {PERSONAL_ACCESS_TOKEN}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Notion-Version`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 2026-03-11`})]}),`\n`]})})})}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/guides/get-started/personal-access-tokens`,children:`Personal access tokens`}),` for creation steps, workspace admin controls, tier defaults, and security guidance.`]}),`\n`,_jsx(Heading,{level:`2`,id:`public-connection-auth-flow-set-up`,children:`Public connection auth flow set-up`}),`\n`,_jsxs(_components.p,{children:[`A public connection can be installed in any Notion workspace within its `,_jsx(_components.a,{href:`/guides/get-started/public-connections#installation-scope`,children:`installation scope`}),` — either any workspace, or a specific set chosen at creation time.`]}),`\n`,_jsxs(_components.p,{children:[`Since a public connection is not tied to a single workspace with a single installation access token, public connections instead follow the `,_jsx(_components.a,{href:`https://oauth.net/2/`,children:`OAuth 2.0 protocol`}),` to authorize a connection to interact with a workspace.`]}),`\n`,_jsx(Heading,{level:`3`,id:`how-to-make-a-public-connection`,children:`How to make a public connection`}),`\n`,_jsxs(_components.p,{children:[`Navigate to the `,_jsx(`a`,{href:developerConnectionsUrl,children:`Developer portal`}),` and create a new public connection.`]}),`\n`,_jsxs(_components.p,{children:[`Fill out the form with your connection details, including your redirect URI(s) under the OAuth configuration section and the connection’s `,_jsx(_components.a,{href:`/guides/get-started/public-connections#installation-scope`,children:`installation scope`}),` — either `,_jsx(_components.strong,{children:`Any workspace`}),` or `,_jsx(_components.strong,{children:`Selected workspaces only`}),`. This can’t be changed after creation.`]}),`\n`,_jsxs(_components.p,{children:[`The redirect URI is the URI your users will be redirected to after authorizing the public connection. To learn more, read `,_jsx(_components.a,{href:`https://www.oauth.com/oauth2-servers/redirect-uris/`,children:`OAuth’s description of redirect URIs`}),`.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Marketplace listing details (such as descriptions, categories, and images) are managed separately through the `,_jsx(_components.strong,{children:`Listings`}),` section. Refer to the `,_jsx(_components.a,{href:`/guides/get-started/marketplace-listing`,children:`List on the Marketplace`}),` guide to learn more.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`public-connection-authorization-overview`,children:`Public connection authorization overview`}),`\n`,_jsx(_components.p,{children:`Once your connection has been made public, you can update your connection code to use the public auth flow.`}),`\n`,_jsx(_components.p,{children:`As an overview, the authorization flow includes the following steps. Each step will be described in more detail below.`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{children:_jsxs(_components.p,{children:[`Navigate the user to the connection’s authorization URL. This URL is provided in the `,_jsx(`a`,{href:developerConnectionsUrl,children:`Developer portal`}),`.`]})}),_jsx(Step,{children:_jsxs(_components.p,{children:[`After the user selects which workspace pages to share, Notion redirects the user to the connection’s redirect URI and includes a `,_jsx(_components.code,{children:`code`}),` query parameter. The redirect URI is the one you specified in your `,_jsx(`a`,{href:developerConnectionsUrl,children:`Developer portal`}),`.`]})}),_jsx(Step,{children:_jsxs(_components.p,{children:[`Make a `,_jsx(_components.code,{children:`POST`}),` request to `,_jsx(_components.a,{href:`/reference/create-a-token`,children:`create an access token`}),`, which exchanges the temporary `,_jsx(_components.code,{children:`code`}),` for an access token.`]})}),_jsx(Step,{children:_jsx(_components.p,{children:`The Notion API responds with an access token and some additional information.`})}),_jsx(Step,{children:_jsxs(_components.p,{children:[`Store the access token for future API requests. View the `,_jsx(_components.a,{href:`/reference/intro`,children:`API reference docs`}),` to learn about available endpoints.`]})})]}),`\n`,_jsx(Heading,{level:`3`,id:`step-1-navigate-the-user-to-the-connection’s-authorization-url`,children:`Step 1 - Navigate the user to the connection’s authorization URL`}),`\n`,_jsxs(_components.p,{children:[`After creating a public connection in the `,_jsx(`a`,{href:developerConnectionsUrl,children:`Developer portal`}),`, access the connection’s secrets in the `,_jsx(_components.strong,{children:`Configuration`}),` tab. Similarly to the internal connections, these values should be protected and should never be included in source code or version control.`]}),`\n`,_jsx(Frame,{caption:`The Authorization URL field populates after a public connection is submitted for review`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=ef1174a58a78b04444bea74627ede083`,\"data-og-width\":`1198`,width:`1198`,\"data-og-height\":`699`,height:`699`,\"data-path\":`images/docs/c535461-integrations_10.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=280\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=b587242b941365656c64f99cd8dc05c9 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=560\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=c708c30297ae6dee382a5836780b710a 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=840\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=834150052e2989bfbad4269265035aec 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=1100\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=3dd55465b81829d22d8c5f524f513f97 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=1650\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=cfcd4563c2f383bf6215228f72a6ea82 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=2500\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=9ed48b65c760339590d3eecb6299ee23 2500w`})}),`\n`,_jsxs(_components.p,{children:[`As an example, your `,_jsx(_components.code,{children:`.env`}),` file using these secrets could look like this:`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Shell`,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`#.env`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OAUTH_CLIENT_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=\u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`your-client-id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003e`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OAUTH_CLIENT_SECRET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=\u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`your-client-secret`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003e`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NOTION_AUTH_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=\u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`your-auth-url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003e`})]}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:`To start the authorization flow for a public connection, direct the prospective user to the authorization URL. A common pattern is to include a hyperlink in the connection app that interacts with the Notion REST API. For example, an app that lets users create Notion pages in their workspaces should send users to the authorization URL first.`}),`\n`,_jsx(_components.p,{children:`The following example shows an authorization URL made available through a hyperlink:`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`HTML`,numberOfLines:`1`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`a`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` href`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.notion.com/v1/oauth/authorize?owner=user\u0026client_id=463558a3-725e-4f37-b6d3-0889894f68de\u0026redirect_uri=https%3A%2F%2Fexample.com%2Fauth%2Fnotion%2Fcallback\u0026response_type=code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Add to Notion`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003e`})]}),`\n`]})})})}),`\n`,_jsxs(_components.p,{children:[`The URL begins with `,_jsx(_components.code,{children:`https://api.notion.com/v1/oauth/authorize`}),` and has the following parameters:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Parameter`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Required`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`client_id`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`An identifier for your connection, found in the connection settings.`}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`redirect_uri`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`The URL where the user should return after granting access.`}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`response_type`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Always use `,_jsx(_components.code,{children:`code`}),`.`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`owner`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Always use `,_jsx(_components.code,{children:`user`}),`.`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`state`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`If the user was in the middle of an interaction or operation, then this parameter can be used to restore state after the user returns. It can also be used to prevent CSRF attacks.`}),_jsx(_components.td,{style:{textAlign:`left`}})]})]})]}),`\n`,_jsx(_components.p,{children:`Once the authorization URL is visited, the user will be shown a prompt that varies depending on whether or not the connection comes with a Notion template option.`}),`\n`,_jsx(Heading,{level:`4`,id:`prompt-for-a-standard-connection-with-no-template-option-default`,children:`Prompt for a standard connection with no template option (Default)`}),`\n`,_jsxs(_components.p,{children:[`In the standard connection permissions flow, a prompt describes the connection `,_jsx(_components.a,{href:`/reference/capabilities`,children:`capabilities`}),`, presented to the user as what the connection would like to be able to do in the workspace. A user can either select pages to grant the connection access to, or cancel the request.`]}),`\n`,_jsx(Frame,{caption:`Prompt for authorizing a standard connection (no template option)`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=3a82bcb02f006753164c1334e664b500`,\"data-og-width\":`1150`,width:`1150`,\"data-og-height\":`1390`,height:`1390`,\"data-path\":`images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=280\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=cd5de5a9df445d715557662788dff7c2 280w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=560\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=4170a3824ecac3fe95e9976e50262bd4 560w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=840\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=46ae6c59a3fccd09b03adf828f73c443 840w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=1100\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=f57ba2fdb324aa186b87c35aa7e1578b 1100w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=1650\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=323a920f9883c9b89c689e6566e16b59 1650w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=2500\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=18cb8d57b8f8093555222f83699a700a 2500w`})}),`\n`,_jsxs(_components.p,{children:[`If the user presses `,_jsx(_components.strong,{children:`Cancel`}),`, they will be redirected to the redirect URI with and `,_jsx(_components.code,{children:`error`}),` query param added.`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`www.example.com/my-redirect-uri?error=access_denied\u0026state=`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`You can use this `,_jsx(_components.code,{children:`error`}),`query parameter to conditionally update your app’s state as needed.`]}),`\n`,_jsxs(_components.p,{children:[`If the user opts to `,_jsx(_components.code,{children:`Select pages`}),`, then a page picker interface opens. A user can search for and select pages and databases to share with the connection from the page picker.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`The page picker only displays pages or databases to which a user has `,_jsx(_components.a,{href:`https://www.notion.com/help/sharing-and-permissions`,children:`full access`}),`, because a user needs full access to a resource in order to be able to share it with a connection.`]})}),`\n`,_jsx(Frame,{caption:`Page picker interface`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=94186f31f22938dc1c7d850e227e061a`,\"data-og-width\":`1142`,width:`1142`,\"data-og-height\":`1360`,height:`1360`,\"data-path\":`images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=280\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=aa81f9caa71de44fc783ac9feaf274c7 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=560\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=1c80e906ecb1e3e9275cc7adb4ac9915 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=840\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=aebe6c8ce0d2f78e9d7000e730c0e39e 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=1100\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=1270ef1211d503f45845ed49d3197836 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=1650\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=83baa449920559a120ca03b4d5f8cbdb 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=2500\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=d8b29f9d96747e4e91e2a5608f611a1f 2500w`})}),`\n`,_jsx(_components.p,{children:`Users can select which pages to give the connection access to, including both private and public pages available to them. Parent pages can be selected to quickly provide access to child pages, as giving access to a parent page will provide access to all available child pages. Users can return to this view at a later time to update access settings if circumstances change.`}),`\n`,_jsxs(_components.p,{children:[`If the user clicks `,_jsx(_components.code,{children:`Allow access`}),`, they are then redirected to the `,_jsx(_components.code,{children:`redirect_uri`}),` with a temporary authorization `,_jsx(_components.code,{children:`code`}),`. If the user denies access, they are redirected to the `,_jsx(_components.code,{children:`redirect_uri`}),` with an `,_jsx(_components.code,{children:`error`}),` query parameter.`]}),`\n`,_jsxs(_components.p,{children:[`If the user clicks `,_jsx(_components.code,{children:`Allow access`}),` and the rest of the auth flow is not completed, the connection will `,_jsx(_components.em,{children:`not`}),` have access to the pages that were selected.`]}),`\n`,_jsx(Heading,{level:`4`,id:`prompt-for-a-connection-with-a-notion-template-option`,children:`Prompt for a connection with a Notion template option`}),`\n`,_jsx(_components.p,{children:`Public connections offer the option of providing a public Notion page to use as a template during the auth flow.`}),`\n`,_jsx(_components.p,{children:`To add a template to your workspace, complete the following steps:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Choose a public page in your workspace that you want users to be able to duplicate.`}),`\n`,_jsxs(_components.li,{children:[`Navigate to your connection in the `,_jsx(`a`,{href:developerConnectionsUrl,children:`Developer portal`}),` and open the `,_jsx(_components.strong,{children:`Configuration`}),` tab, then scroll to the Basic information section.`]}),`\n`,_jsxs(_components.li,{children:[`Scroll to the bottom of your distribution settings and add the URL of the Notion page you selected to the `,_jsx(_components.strong,{children:`Notion URL for optional template`}),` input.`]}),`\n`]}),`\n`,_jsx(Frame,{caption:`Notion URL for optional template input in connection settings.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=d83bd80077b7fb6bdab6c38cbadb6579`,\"data-og-width\":`1198`,width:`1198`,\"data-og-height\":`699`,height:`699`,\"data-path\":`images/docs/b4ae671-integrations11.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=280\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=a5d2e397a2888aae9d0b3a20a6ab3a57 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=560\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=39ca4045f429cb85c91546e0c1e0fecf 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=840\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=9cdf90494f856ce84fab433445005dc3 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=1100\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=3c3356f04b32cb39e7c3c6891419f945 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=1650\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=45683f06ef94b549f0bb5f03e6b59862 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=2500\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=f5cd7e893edd0864dc2aaaaef09cc031 2500w`})}),`\n`,_jsx(_components.p,{children:`Once this URL is added, your auth flow prompt appearance will be updated.`}),`\n`,_jsxs(_components.p,{children:[`Going back to your prompt view, if the connection offers a Notion template option, the first step in the permissions flow will describe the connection `,_jsx(_components.a,{href:`/reference/capabilities`,children:`capabilities`}),`. This is presented to the user as what the connection would be able to do in the workspace, and it prompts the user to click `,_jsx(_components.code,{children:`Next`}),`.`]}),`\n`,_jsx(Frame,{caption:`Prompt for a connection with a Notion template option`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=bce36d9f1a69a618dc886d1baf46d50f`,\"data-og-width\":`1102`,width:`1102`,\"data-og-height\":`1462`,height:`1462`,\"data-path\":`images/docs/77076c7-template_prompt1.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=280\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=6ddc1e0e9c726f155c7bac0a0fe0bed0 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=560\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=a1ae1eb9f748c32af5e88111d45d1af1 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=840\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=3af09c117c8a03d74983a9c55cded60c 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=1100\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=73e048e5cf0e2520cf8e218d4763ecd8 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=1650\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=56472acfdbdfe57e8e8ede6abee82048 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=2500\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=885dc89b073e5019cd12152a24e45550 2500w`})}),`\n`,_jsx(_components.p,{children:`In the next step, a user can either choose to duplicate the template that you provided or to select existing pages to share with the connection.`}),`\n`,_jsx(Frame,{caption:`A user can select to duplicate a template or to share existing pages with the connection`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=d5ff31ef9083f78b60e615758b6f580e`,\"data-og-width\":`1052`,width:`1052`,\"data-og-height\":`1546`,height:`1546`,\"data-path\":`images/docs/9788bdb-template_prompt_2.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=280\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=d0bcebf97c2d2d47298b5eb3ed8e9667 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=560\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=0df02c964b4ba61b341057ce4ca2b7c1 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=840\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=edf55877ba383f2192ad830326ca6885 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=1100\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=c236950de91a26a9329f68e904b29565 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=1650\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=ad655a24827c812ebed25fc3e3a7edd6 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=2500\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=2ca3fc12da1dc649db7f8128100996bf 2500w`})}),`\n`,_jsx(_components.p,{children:`If the user chooses to duplicate the template, then the following happens automatically:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The connection is added to the user’s workspace.`}),`\n`,_jsx(_components.li,{children:`The template is duplicated as a new page in the workspace.`}),`\n`,_jsx(_components.li,{children:`The new page is shared with the connection.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If the user chooses to select pages to share with the connection, then they continue to the page picker interface that’s part of the `,_jsx(_components.a,{href:`#prompt-for-a-standard-connection-with-no-template-option-default`,children:`prompt for a standard connection`}),`.`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`After a user authorizes a public connection, only that user is able to interact or share pages and databases with the connection. Unlike internal connections, if multiple members in a workspace want to use a public connection, each prospective user needs to individually follow the auth flow for the connection.`})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`User authorization failures`})}),`\n`,_jsxs(_components.p,{children:[`User authorization failures can happen. If a user chooses to `,_jsx(_components.code,{children:`Cancel`}),` the request, then a failure is triggered. Build your connection to handle these cases gracefully, as needed.`]}),`\n`,_jsxs(_components.p,{children:[`In some cases, Notion redirects the user to the `,_jsx(_components.code,{children:`redirect_uri`}),` that you set up when you created the public connection, along with an `,_jsx(_components.code,{children:`error`}),` query parameter. Notion uses the common `,_jsx(_components.a,{href:`https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2.1`,children:`error codes in the OAuth specification`}),`. Use the `,_jsx(_components.code,{children:`error`}),` code to create a helpful prompt for the user when they’re redirected here.`]}),`\n`,_jsxs(Heading,{level:`3`,id:`step-2-notion-redirects-the-user-to-the-connection’s-redirect-uri-and-includes-a-code-parameter`,children:[`Step 2 - Notion redirects the user to the connection’s redirect URI and includes a `,_jsx(_components.code,{children:`code`}),` parameter`]}),`\n`,_jsxs(_components.p,{children:[`When you first created the public connection, you specified a redirect URI. If the user follows the prompt to `,_jsx(_components.code,{children:`Allow access`}),` for the connection, then Notion generates a temporary `,_jsx(_components.code,{children:`code`}),` and sends a request to the redirect URI with the following information in the query string:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Parameter`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Required`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`code`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`A temporary authorization code.`}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`state`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The value provided by the connection when the user was `,_jsx(_components.a,{href:`#prompt-for-a-standard-connection-with-no-template-option-default`,children:`prompted for access`}),`.`]}),_jsx(_components.td,{style:{textAlign:`left`}})]})]})]}),`\n`,_jsxs(_components.p,{children:[`To complete the next step, retrieve the `,_jsx(_components.code,{children:`code`}),` query parameter provided in the redirect. The retrieval method varies depending on your app’s tech stack.`]}),`\n`,_jsxs(_components.p,{children:[`In a React component, for example, the query parameters are made available through the `,_jsx(_components.code,{children:`useRouter()`}),` hook:`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`5`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` AuthRedirectPage`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`  const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` router`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` useRouter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`  const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`code`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` router`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`  ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsxs(Heading,{level:`3`,id:`step-3-send-the-code-in-a-post-request-to-the-notion-api`,children:[`Step 3 - Send the `,_jsx(_components.code,{children:`code`}),` in a `,_jsx(_components.code,{children:`POST`}),` request to the Notion API`]}),`\n`,_jsxs(_components.p,{children:[`The connection needs to exchange the temporary `,_jsx(_components.code,{children:`code`}),` for an `,_jsx(_components.code,{children:`access_token`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`To set up this step, retrieve the `,_jsx(_components.code,{children:`code`}),` from the redirect URI.`]}),`\n`,_jsxs(_components.p,{children:[`Next, send the `,_jsx(_components.code,{children:`code`}),` as part of a `,_jsx(_components.code,{children:`POST`}),` request to Notion’s token endpoint: `,_jsx(_components.a,{href:`https://api.notion.com/v1/oauth/token`,children:`https://api.notion.com/v1/oauth/token`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`This endpoint is described in more detail in the API reference docs for `,_jsx(_components.a,{href:`/reference/create-a-token`,children:`creating a token`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The request is authorized using HTTP Basic Authentication. The credential is a colon-delimited combination of the connection’s `,_jsx(_components.code,{children:`CLIENT_ID`}),` and `,_jsx(_components.code,{children:`CLIENT_SECRET`}),`, like so:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`CLIENT_ID:CLIENT_SECRET`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Find both of these values in the `,_jsx(`a`,{href:developerConnectionsUrl,children:`Developer portal`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Note that in `,_jsx(_components.a,{href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication`,children:`HTTP Basic Authentication`}),`, credentials are `,_jsx(_components.code,{children:`base64`}),` encoded before being added to the `,_jsx(_components.code,{children:`Authorization`}),` header.`]}),`\n`,_jsx(_components.p,{children:`The body of the request contains the following JSON-encoded fields:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Field`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Type`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Required`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"grant_type\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Always use `,_jsx(_components.code,{children:`\"authorization_code\"`}),`.`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"code\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The temporary authorization code received in the incoming request to the `,_jsx(_components.code,{children:`\"redirect_uri\"`}),`.`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"redirect_uri\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The `,_jsx(_components.code,{children:`\"redirect_uri\"`}),` that was provided in the Authorization step.`]}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`✅/❌* `,_jsx(`br`,{}),_jsx(`br`,{}),` * If the redirect URI was supplied as a query param in the Authorization URL, this field is required. If there are more than one redirect URIs included in your connection settings, this field is required. Otherwise, it is not allowed. Learn more in the `,_jsx(_components.a,{href:`/reference/create-a-token`,children:`Create a token page`}),`.`]})]})]})]}),`\n`,_jsx(_components.p,{children:`The following is an example request to exchange the authorization code for an access token:`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`HTTP`,numberOfLines:`5`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v1/oauth/token `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`HTTP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Basic \"$CLIENT_ID:$CLIENT_SECRET\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Content-Type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` application/json`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"grant_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"authorization_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"e202e8c9-0990-40af-855f-ff8f872b1ec6\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"redirect_uri\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/auth/notion/callback\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:`The Node-equivalent of this example would look something like this:`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`22`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`22`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` clientId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`OAUTH_CLIENT_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` clientSecret`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`OAUTH_CLIENT_SECRET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` redirectUri`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`OAUTH_REDIRECT_URI`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// encode in base 64`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` encoded`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` btoa`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`clientId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`clientSecret`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.notion.com/v1/oauth/token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tmethod:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\theaders:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tAccept:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\t\"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tAuthorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Basic \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`encoded`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tbody:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tgrant_type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"authorization_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tcode:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"your-temporary-code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tredirect_uri:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` redirectUri`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t}),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`})}),`\n`]})})})}),`\n`,_jsxs(Heading,{level:`3`,id:`step-4-notion-responds-with-an-access_token--refresh_token-and-additional-information`,children:[`Step 4 - Notion responds with an `,_jsx(_components.code,{children:`access_token`}),` , `,_jsx(_components.code,{children:`refresh_token`}),`, and additional information`]}),`\n`,_jsxs(_components.p,{children:[`Notion responds to the request with an `,_jsx(_components.code,{children:`access_token`}),`, `,_jsx(_components.code,{children:`refresh_token`}),`, and additional information. The `,_jsx(_components.code,{children:`access_token`}),` will be used to authenticate subsequent Notion REST API requests. The `,_jsx(_components.code,{children:`refresh_token`}),` will be used to refresh the access token, which generates a new `,_jsx(_components.code,{children:`access_token`}),`.`]}),`\n`,_jsx(_components.p,{children:`The response contains the following JSON-encoded fields:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Field`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Type`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Not null`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"access_token\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`An access token used to authorize requests to the Notion API.`}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"refresh_token\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`A refresh token used to generate a new access token`}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"bot_id\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`An identifier for this authorization.`}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"duplicated_template_id\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The ID of the new page created in the user’s workspace. The new page is a duplicate of the template that the developer provided with the connection. If the developer didn’t provide a template for the connection, then the value is `,_jsx(_components.code,{children:`null`}),`.`]}),_jsx(_components.td,{style:{textAlign:`left`}})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"owner\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`object`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`An object containing information about who can view and share this connection. A `,_jsx(_components.a,{href:`/reference/user`,children:`user object`}),` is returned, representing the user who authorized the connection.`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"workspace_icon\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`A URL to an image that can be used to display this authorization in the UI.`}),_jsx(_components.td,{style:{textAlign:`left`}})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"workspace_id\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`The ID of the workspace where this authorization took place.`}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"workspace_name\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`A human-readable name that can be used to display this authorization in the UI.`}),_jsx(_components.td,{style:{textAlign:`left`}})]})]})]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Token request failures`})}),`\n`,_jsxs(_components.p,{children:[`If something goes wrong when the connection attempts to exchange the `,_jsx(_components.code,{children:`code`}),` for an `,_jsx(_components.code,{children:`access_token`}),`, then the response contains a JSON-encoded body with an `,_jsx(_components.code,{children:`\"error\"`}),` field. Notion uses the common `,_jsx(_components.a,{href:`https://datatracker.ietf.org/doc/html/rfc6749#section-5.2`,children:`error codes from the OAuth specification`}),`.`]}),`\n`,_jsxs(Heading,{level:`3`,id:`step-5-the-connection-stores-the-access_token-and-refresh_token-for-future-requests`,children:[`Step 5 - The connection stores the `,_jsx(_components.code,{children:`access_token`}),` and `,_jsx(_components.code,{children:`refresh_token`}),` for future requests`]}),`\n`,_jsxs(_components.p,{children:[`Set up a way for your connection to store both the `,_jsx(_components.code,{children:`access_token`}),` and `,_jsx(_components.code,{children:`refresh_token`}),` that it receives. The `,_jsx(_components.code,{children:`access_token`}),` is used to make authorized requests to the Notion API, and the `,_jsx(_components.code,{children:`refresh_token`}),` is used to generate a new `,_jsx(_components.code,{children:`access_token`}),`.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Tips for storing and using token access`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Setting up a database is a typical solution for storing access tokens. If you’re using a database, then build relations between an `,_jsx(_components.code,{children:`access_token`}),`, `,_jsx(_components.code,{children:`refresh_token`}),`, and the corresponding Notion resources that your connection accesses with that token. For example, if you store a Notion database or page ID, relate those records with the correct `,_jsx(_components.code,{children:`access_token`}),` that you use to authorize requests to read or write to that database or page, and the `,_jsx(_components.code,{children:`refresh_token`}),` for ongoing token lifecycle support..`]}),`\n`,_jsxs(_components.li,{children:[`Store all of the information that your connection receives with the `,_jsx(_components.code,{children:`access_token`}),` and `,_jsx(_components.code,{children:`refresh_token`}),`. You never know when your UI or product requirements might change and you’ll need this data. It’s really hard (or impossible) to send users to repeat the authorization flow to generate the information again.`]}),`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.code,{children:`bot_id`}),` returned along with your tokens identifies the Notion bot for the authorization. Store the token pair from each successful authorization response. This includes re-authorization of the same connection, where Notion may return a new `,_jsx(_components.code,{children:`access_token`}),` and `,_jsx(_components.code,{children:`refresh_token`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`step-6-refreshing-an-access-token`,children:`Step 6 - Refreshing an access token`}),`\n`,_jsx(_components.p,{children:`Refreshing an access token will generate a new access token and a new refresh token.`}),`\n`,_jsxs(_components.p,{children:[`Send the `,_jsx(_components.code,{children:`refresh_token`}),` provided from `,_jsx(_components.a,{href:`#step-4-notion-responds-with-an-access_token--refresh_token-and-additional-information`,children:`Step 4`}),` as part of a `,_jsx(_components.code,{children:`POST`}),` request to Notion’s token endpoint: `,_jsx(_components.a,{href:`https://api.notion.com/v1/oauth/token`,children:`https://api.notion.com/v1/oauth/token`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`This endpoint is described in more detail in the API reference docs for `,_jsx(_components.a,{href:`/reference/refresh-a-token`,children:`refreshing a token`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The request is authorized using HTTP Basic Authentication. The credential is a colon-delimited combination of the connection’s `,_jsx(_components.code,{children:`CLIENT_ID`}),` and `,_jsx(_components.code,{children:`CLIENT_SECRET`}),`, like so:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`CLIENT_ID:CLIENT_SECRET`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Find both of these values in the `,_jsx(`a`,{href:developerConnectionsUrl,children:`Developer portal`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Note that in `,_jsx(_components.a,{href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication`,children:`HTTP Basic Authentication`}),`, credentials are `,_jsx(_components.code,{children:`base64`}),` encoded before being added to the `,_jsx(_components.code,{children:`Authorization`}),` header.`]}),`\n`,_jsx(_components.p,{children:`The body of the request contains the following JSON-encoded fields:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Field`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Type`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Required`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"grant_type\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Always use `,_jsx(_components.code,{children:`\"refresh_token\"`}),`.`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"refresh_token\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The `,_jsx(_components.code,{children:`\"refresh_token\"`}),` returned in the Authorization step.`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The following is an example request to exchange the `,_jsx(_components.code,{children:`refresh_token`}),` for a new access token and new refresh token`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`HTTP`,numberOfLines:`5`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v1/oauth/token `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`HTTP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Basic \"$CLIENT_ID:$CLIENT_SECRET\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Content-Type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` application/json`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"grant_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"refresh_token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"refresh_token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"nrt_4991090011501Ejc6Xn4sHguI7jZIN449mKe9PRhpMfNK\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:`The Node-equivalent of this example would look something like this:`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`20`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`20`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` clientId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`OAUTH_CLIENT_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` clientSecret`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`OAUTH_CLIENT_SECRET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// encode in base 64`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` encoded`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` btoa`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`clientId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`clientSecret`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.notion.com/v1/oauth/token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tmethod:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\theaders:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tAccept:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\t\"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tAuthorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Basic \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`encoded`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tbody:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tgrant_type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"refresh_token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\trefresh_token:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"your-refresh-token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t}),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`})}),`\n`]})})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{developerPortalUrl,developerConnectionsUrl,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}"])</script><script>self.__next_f.push([1,"53:T17107,"])</script><script>self.__next_f.push([1,"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const developerPortalUrl=undefined;const developerConnectionsUrl=undefined;function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Frame,Heading,Note,OptimizedImage,Step,Steps,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`what-is-authorization`,children:`What is authorization?`}),`\n`,_jsxs(_components.p,{children:[`Authorization is the process of granting a connection or token access to Notion data. `,_jsx(_components.a,{href:`/guides/get-started/internal-connections`,children:`Internal connections`}),` use a static API token, `,_jsx(_components.a,{href:`/guides/get-started/personal-access-tokens`,children:`personal access tokens`}),` use a user-scoped static API token, and `,_jsx(_components.a,{href:`/guides/get-started/public-connections`,children:`public connections`}),` use the `,_jsx(_components.a,{href:`https://oauth.net/2/`,children:`OAuth 2.0`}),` protocol.`]}),`\n`,_jsx(Heading,{level:`2`,id:`internal-connection-auth-flow-set-up`,children:`Internal connection auth flow set-up`}),`\n`,_jsxs(_components.p,{children:[`To use an internal connection, start by creating your connection in the `,_jsx(`a`,{href:developerConnectionsUrl,children:`Developer portal`}),`.`]}),`\n`,_jsx(_components.p,{children:`The internal connection will be associated with the workspace of your choice. You are required to be a workspace owner to create a connection.`}),`\n`,_jsx(Frame,{caption:`Create a new connection from the Developer portal.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=6fcebc5334c9c3499b58208b91b798ae`,\"data-og-width\":`1198`,width:`1198`,\"data-og-height\":`699`,height:`699`,\"data-path\":`images/docs/fd25d1f-integrations_7.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=280\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=cb7c51998785b7c2f88f11658014be5f 280w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=560\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=c1a92ab2d5c7413c6d73c288ed84246b 560w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=840\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=49f8e846a3495e9674129bdbbd4a51c8 840w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=1100\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=5638368c0a7c3e876d0945aee50d8f26 1100w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=1650\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=aeba43b917d31cb847d5c044ccc83627 1650w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/fd25d1f-integrations_7.png?w=2500\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=a3d54f2aa4e0405039a9a88ac58733db 2500w`})}),`\n`,_jsxs(_components.p,{children:[`Once the connection is created, you can update its settings as needed under the `,_jsx(_components.code,{children:`Configuration`}),` tab and retrieve the installation access token in this tab.`]}),`\n`,_jsx(_components.p,{children:`The installation access token will be used to authenticate REST API requests. The connection sends the same token in every API request.`}),`\n`,_jsx(Frame,{caption:`Find the installation access token in the Configuration tab.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=34d293a88ef5911ff43aefe4dde91e2d`,\"data-og-width\":`1198`,width:`1198`,\"data-og-height\":`699`,height:`699`,\"data-path\":`images/docs/69c7487-integrations_8.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=280\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=9af91249ad204650765be96b857ab205 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=560\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=db81a6d3d2f63dcffaba7bc3a004f38e 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=840\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=bdc99c1625bd6e736addf812ff924d98 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=1100\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=2c859481c58b6b96aa82ae1354373c81 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=1650\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=147a15fb10f97a9601b754da8d71d45c 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/69c7487-integrations_8.png?w=2500\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=2cfdc4db42a0f68849cefb49df7d7b84 2500w`})}),`\n`,_jsx(Heading,{level:`3`,id:`connection-permissions`,children:`Connection permissions`}),`\n`,_jsxs(_components.p,{children:[`Before a connection can interact with your Notion workspace page(s), the page must be manually shared with the connection. To share a page with a connection, visit the page in your Notion workspace, click the ••• menu at the top right of a page, scroll down to `,_jsx(_components.code,{children:`Add connections`}),`, and use the search bar to find and select the connection from the dropdown list.`]}),`\n`,_jsx(_components.p,{children:`Once the connection is shared, you can start making API requests. If the page is not shared, any API requests made will respond with an error.`}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Never share your installation access token`})}),_jsx(_components.p,{children:`Your installation access token is a secret. To keep your connection secure, never store the token in your source code or commit it in version control. Instead, read the token from an environment variable. Use a secret manager or deployment system to set the token in the environment.`}),_jsx(_components.p,{children:_jsx(_components.a,{href:`/guides/get-started/handling-api-keys`,children:`Learn more: Best Practices for Handling API Keys`})})]}),`\n`,_jsx(Heading,{level:`3`,id:`making-api-requests-with-an-internal-connection`,children:`Making API requests with an internal connection`}),`\n`,_jsxs(_components.p,{children:[`Any time your connection interacts with your workspace, include the installation access token in the `,_jsx(_components.code,{children:`Authorization`}),` header with every API request. However, if you are using Notion’s `,_jsx(_components.a,{href:`https://github.com/makenotion/notion-sdk-js`,children:`SDK for JavaScript`}),` to interact with the REST API, the token is set once when a client is initialized.`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`HTTP`,numberOfLines:`2`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`GET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v1/pages/b55c9c91-384d-452b-81db-d1ef79372b75 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`HTTP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Bearer {INTEGRATION_TOKEN}`})]}),`\n`]})})})}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`10`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`Client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` require`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"@notionhq/client\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Initializing a client`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` notion`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tauth:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`NOTION_TOKEN`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getUsers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=\u003e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\tconst`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` listUsersResponse`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` notion`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`users`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`list`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({})`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsxs(Note,{children:[_jsxs(_components.p,{children:[`If you are not using the `,_jsx(_components.a,{href:`https://github.com/makenotion/notion-sdk-js`,children:`Notion SDK for JavaScript`}),`, also set the `,_jsx(_components.a,{href:`/reference/versioning`,children:_jsx(_components.code,{children:`Notion-Version`})}),` and `,_jsx(_components.a,{href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type`,children:_jsx(_components.code,{children:`Content-type`})}),` headers in all of your requests, like so:`]}),_jsx(CodeBlock,{filename:`JSON`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`  Authorization`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:\"`Bearer\"}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` $`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`process.env.NOTION_TOKEN`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`  \"Notion-Version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-03-11\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`  \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`If you receive an error response from the API, check if the connection has been properly `,_jsx(_components.a,{href:`https://www.notion.com/help/add-and-manage-connections-with-the-api#manage-connections-in-your-workspace`,children:`added to the page`}),`. If this does not solve the problem, refer to our `,_jsx(_components.a,{href:`/reference/status-codes`,children:`Status codes`}),` page for more information.`]}),`\n`,_jsx(Heading,{level:`2`,id:`personal-access-token-authentication`,children:`Personal access token authentication`}),`\n`,_jsxs(_components.p,{children:[`Personal access tokens (PATs) are created directly by a Notion user in the `,_jsx(`a`,{href:developerPortalUrl,children:`Developer portal`}),`. There is no OAuth flow and no page picker. A PAT acts as the user who created it and uses that user’s permissions in the selected workspace.`]}),`\n`,_jsx(_components.p,{children:`Use a PAT when a script, CLI workflow, Worker, or trusted tool should act as you. Use an internal connection for team-owned workspace automations, or a public connection when other Notion users need to install your app.`}),`\n`,_jsxs(_components.p,{children:[`PATs use the same `,_jsx(_components.code,{children:`Authorization`}),` header as other Notion API tokens:`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`HTTP`,numberOfLines:`3`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`GET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v1/users/me `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`HTTP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Bearer {PERSONAL_ACCESS_TOKEN}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Notion-Version`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 2026-03-11`})]}),`\n`]})})})}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/guides/get-started/personal-access-tokens`,children:`Personal access tokens`}),` for creation steps, workspace admin controls, tier defaults, and security guidance.`]}),`\n`,_jsx(Heading,{level:`2`,id:`public-connection-auth-flow-set-up`,children:`Public connection auth flow set-up`}),`\n`,_jsxs(_components.p,{children:[`A public connection can be installed in any Notion workspace within its `,_jsx(_components.a,{href:`/guides/get-started/public-connections#installation-scope`,children:`installation scope`}),` — either any workspace, or a specific set chosen at creation time.`]}),`\n`,_jsxs(_components.p,{children:[`Since a public connection is not tied to a single workspace with a single installation access token, public connections instead follow the `,_jsx(_components.a,{href:`https://oauth.net/2/`,children:`OAuth 2.0 protocol`}),` to authorize a connection to interact with a workspace.`]}),`\n`,_jsx(Heading,{level:`3`,id:`how-to-make-a-public-connection`,children:`How to make a public connection`}),`\n`,_jsxs(_components.p,{children:[`Navigate to the `,_jsx(`a`,{href:developerConnectionsUrl,children:`Developer portal`}),` and create a new public connection.`]}),`\n`,_jsxs(_components.p,{children:[`Fill out the form with your connection details, including your redirect URI(s) under the OAuth configuration section and the connection’s `,_jsx(_components.a,{href:`/guides/get-started/public-connections#installation-scope`,children:`installation scope`}),` — either `,_jsx(_components.strong,{children:`Any workspace`}),` or `,_jsx(_components.strong,{children:`Selected workspaces only`}),`. This can’t be changed after creation.`]}),`\n`,_jsxs(_components.p,{children:[`The redirect URI is the URI your users will be redirected to after authorizing the public connection. To learn more, read `,_jsx(_components.a,{href:`https://www.oauth.com/oauth2-servers/redirect-uris/`,children:`OAuth’s description of redirect URIs`}),`.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Marketplace listing details (such as descriptions, categories, and images) are managed separately through the `,_jsx(_components.strong,{children:`Listings`}),` section. Refer to the `,_jsx(_components.a,{href:`/guides/get-started/marketplace-listing`,children:`List on the Marketplace`}),` guide to learn more.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`public-connection-authorization-overview`,children:`Public connection authorization overview`}),`\n`,_jsx(_components.p,{children:`Once your connection has been made public, you can update your connection code to use the public auth flow.`}),`\n`,_jsx(_components.p,{children:`As an overview, the authorization flow includes the following steps. Each step will be described in more detail below.`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{children:_jsxs(_components.p,{children:[`Navigate the user to the connection’s authorization URL. This URL is provided in the `,_jsx(`a`,{href:developerConnectionsUrl,children:`Developer portal`}),`.`]})}),_jsx(Step,{children:_jsxs(_components.p,{children:[`After the user selects which workspace pages to share, Notion redirects the user to the connection’s redirect URI and includes a `,_jsx(_components.code,{children:`code`}),` query parameter. The redirect URI is the one you specified in your `,_jsx(`a`,{href:developerConnectionsUrl,children:`Developer portal`}),`.`]})}),_jsx(Step,{children:_jsxs(_components.p,{children:[`Make a `,_jsx(_components.code,{children:`POST`}),` request to `,_jsx(_components.a,{href:`/reference/create-a-token`,children:`create an access token`}),`, which exchanges the temporary `,_jsx(_components.code,{children:`code`}),` for an access token.`]})}),_jsx(Step,{children:_jsx(_components.p,{children:`The Notion API responds with an access token and some additional information.`})}),_jsx(Step,{children:_jsxs(_components.p,{children:[`Store the access token for future API requests. View the `,_jsx(_components.a,{href:`/reference/intro`,children:`API reference docs`}),` to learn about available endpoints.`]})})]}),`\n`,_jsx(Heading,{level:`3`,id:`step-1-navigate-the-user-to-the-connection’s-authorization-url`,children:`Step 1 - Navigate the user to the connection’s authorization URL`}),`\n`,_jsxs(_components.p,{children:[`After creating a public connection in the `,_jsx(`a`,{href:developerConnectionsUrl,children:`Developer portal`}),`, access the connection’s secrets in the `,_jsx(_components.strong,{children:`Configuration`}),` tab. Similarly to the internal connections, these values should be protected and should never be included in source code or version control.`]}),`\n`,_jsx(Frame,{caption:`The Authorization URL field populates after a public connection is submitted for review`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=ef1174a58a78b04444bea74627ede083`,\"data-og-width\":`1198`,width:`1198`,\"data-og-height\":`699`,height:`699`,\"data-path\":`images/docs/c535461-integrations_10.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=280\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=b587242b941365656c64f99cd8dc05c9 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=560\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=c708c30297ae6dee382a5836780b710a 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=840\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=834150052e2989bfbad4269265035aec 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=1100\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=3dd55465b81829d22d8c5f524f513f97 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=1650\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=cfcd4563c2f383bf6215228f72a6ea82 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/c535461-integrations_10.png?w=2500\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=9ed48b65c760339590d3eecb6299ee23 2500w`})}),`\n`,_jsxs(_components.p,{children:[`As an example, your `,_jsx(_components.code,{children:`.env`}),` file using these secrets could look like this:`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Shell`,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`#.env`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OAUTH_CLIENT_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=\u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`your-client-id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003e`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OAUTH_CLIENT_SECRET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=\u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`your-client-secret`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003e`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NOTION_AUTH_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=\u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`your-auth-url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003e`})]}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:`To start the authorization flow for a public connection, direct the prospective user to the authorization URL. A common pattern is to include a hyperlink in the connection app that interacts with the Notion REST API. For example, an app that lets users create Notion pages in their workspaces should send users to the authorization URL first.`}),`\n`,_jsx(_components.p,{children:`The following example shows an authorization URL made available through a hyperlink:`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`HTML`,numberOfLines:`1`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`a`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` href`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.notion.com/v1/oauth/authorize?owner=user\u0026client_id=463558a3-725e-4f37-b6d3-0889894f68de\u0026redirect_uri=https%3A%2F%2Fexample.com%2Fauth%2Fnotion%2Fcallback\u0026response_type=code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Add to Notion`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`a`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003e`})]}),`\n`]})})})}),`\n`,_jsxs(_components.p,{children:[`The URL begins with `,_jsx(_components.code,{children:`https://api.notion.com/v1/oauth/authorize`}),` and has the following parameters:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Parameter`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Required`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`client_id`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`An identifier for your connection, found in the connection settings.`}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`redirect_uri`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`The URL where the user should return after granting access.`}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`response_type`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Always use `,_jsx(_components.code,{children:`code`}),`.`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`owner`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Always use `,_jsx(_components.code,{children:`user`}),`.`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`state`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`If the user was in the middle of an interaction or operation, then this parameter can be used to restore state after the user returns. It can also be used to prevent CSRF attacks.`}),_jsx(_components.td,{style:{textAlign:`left`}})]})]})]}),`\n`,_jsx(_components.p,{children:`Once the authorization URL is visited, the user will be shown a prompt that varies depending on whether or not the connection comes with a Notion template option.`}),`\n`,_jsx(Heading,{level:`4`,id:`prompt-for-a-standard-connection-with-no-template-option-default`,children:`Prompt for a standard connection with no template option (Default)`}),`\n`,_jsxs(_components.p,{children:[`In the standard connection permissions flow, a prompt describes the connection `,_jsx(_components.a,{href:`/reference/capabilities`,children:`capabilities`}),`, presented to the user as what the connection would like to be able to do in the workspace. A user can either select pages to grant the connection access to, or cancel the request.`]}),`\n`,_jsx(Frame,{caption:`Prompt for authorizing a standard connection (no template option)`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=3a82bcb02f006753164c1334e664b500`,\"data-og-width\":`1150`,width:`1150`,\"data-og-height\":`1390`,height:`1390`,\"data-path\":`images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=280\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=cd5de5a9df445d715557662788dff7c2 280w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=560\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=4170a3824ecac3fe95e9976e50262bd4 560w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=840\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=46ae6c59a3fccd09b03adf828f73c443 840w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=1100\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=f57ba2fdb324aa186b87c35aa7e1578b 1100w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=1650\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=323a920f9883c9b89c689e6566e16b59 1650w, https://mintcdn.com/notion-demo/kSI9TVzPayvF1_1o/images/docs/ec39f97-Screen_Shot_2021-07-22_at_2.58.28_PM.png?w=2500\u0026fit=max\u0026auto=format\u0026n=kSI9TVzPayvF1_1o\u0026q=85\u0026s=18cb8d57b8f8093555222f83699a700a 2500w`})}),`\n`,_jsxs(_components.p,{children:[`If the user presses `,_jsx(_components.strong,{children:`Cancel`}),`, they will be redirected to the redirect URI with and `,_jsx(_components.code,{children:`error`}),` query param added.`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`www.example.com/my-redirect-uri?error=access_denied\u0026state=`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`You can use this `,_jsx(_components.code,{children:`error`}),`query parameter to conditionally update your app’s state as needed.`]}),`\n`,_jsxs(_components.p,{children:[`If the user opts to `,_jsx(_components.code,{children:`Select pages`}),`, then a page picker interface opens. A user can search for and select pages and databases to share with the connection from the page picker.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`The page picker only displays pages or databases to which a user has `,_jsx(_components.a,{href:`https://www.notion.com/help/sharing-and-permissions`,children:`full access`}),`, because a user needs full access to a resource in order to be able to share it with a connection.`]})}),`\n`,_jsx(Frame,{caption:`Page picker interface`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=94186f31f22938dc1c7d850e227e061a`,\"data-og-width\":`1142`,width:`1142`,\"data-og-height\":`1360`,height:`1360`,\"data-path\":`images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=280\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=aa81f9caa71de44fc783ac9feaf274c7 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=560\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=1c80e906ecb1e3e9275cc7adb4ac9915 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=840\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=aebe6c8ce0d2f78e9d7000e730c0e39e 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=1100\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=1270ef1211d503f45845ed49d3197836 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=1650\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=83baa449920559a120ca03b4d5f8cbdb 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/a4009ce-Screen_Shot_2021-07-22_at_3.09.51_PM.png?w=2500\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=d8b29f9d96747e4e91e2a5608f611a1f 2500w`})}),`\n`,_jsx(_components.p,{children:`Users can select which pages to give the connection access to, including both private and public pages available to them. Parent pages can be selected to quickly provide access to child pages, as giving access to a parent page will provide access to all available child pages. Users can return to this view at a later time to update access settings if circumstances change.`}),`\n`,_jsxs(_components.p,{children:[`If the user clicks `,_jsx(_components.code,{children:`Allow access`}),`, they are then redirected to the `,_jsx(_components.code,{children:`redirect_uri`}),` with a temporary authorization `,_jsx(_components.code,{children:`code`}),`. If the user denies access, they are redirected to the `,_jsx(_components.code,{children:`redirect_uri`}),` with an `,_jsx(_components.code,{children:`error`}),` query parameter.`]}),`\n`,_jsxs(_components.p,{children:[`If the user clicks `,_jsx(_components.code,{children:`Allow access`}),` and the rest of the auth flow is not completed, the connection will `,_jsx(_components.em,{children:`not`}),` have access to the pages that were selected.`]}),`\n`,_jsx(Heading,{level:`4`,id:`prompt-for-a-connection-with-a-notion-template-option`,children:`Prompt for a connection with a Notion template option`}),`\n`,_jsx(_components.p,{children:`Public connections offer the option of providing a public Notion page to use as a template during the auth flow.`}),`\n`,_jsx(_components.p,{children:`To add a template to your workspace, complete the following steps:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Choose a public page in your workspace that you want users to be able to duplicate.`}),`\n`,_jsxs(_components.li,{children:[`Navigate to your connection in the `,_jsx(`a`,{href:developerConnectionsUrl,children:`Developer portal`}),` and open the `,_jsx(_components.strong,{children:`Configuration`}),` tab, then scroll to the Basic information section.`]}),`\n`,_jsxs(_components.li,{children:[`Scroll to the bottom of your distribution settings and add the URL of the Notion page you selected to the `,_jsx(_components.strong,{children:`Notion URL for optional template`}),` input.`]}),`\n`]}),`\n`,_jsx(Frame,{caption:`Notion URL for optional template input in connection settings.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=d83bd80077b7fb6bdab6c38cbadb6579`,\"data-og-width\":`1198`,width:`1198`,\"data-og-height\":`699`,height:`699`,\"data-path\":`images/docs/b4ae671-integrations11.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=280\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=a5d2e397a2888aae9d0b3a20a6ab3a57 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=560\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=39ca4045f429cb85c91546e0c1e0fecf 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=840\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=9cdf90494f856ce84fab433445005dc3 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=1100\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=3c3356f04b32cb39e7c3c6891419f945 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=1650\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=45683f06ef94b549f0bb5f03e6b59862 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/b4ae671-integrations11.png?w=2500\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=f5cd7e893edd0864dc2aaaaef09cc031 2500w`})}),`\n`,_jsx(_components.p,{children:`Once this URL is added, your auth flow prompt appearance will be updated.`}),`\n`,_jsxs(_components.p,{children:[`Going back to your prompt view, if the connection offers a Notion template option, the first step in the permissions flow will describe the connection `,_jsx(_components.a,{href:`/reference/capabilities`,children:`capabilities`}),`. This is presented to the user as what the connection would be able to do in the workspace, and it prompts the user to click `,_jsx(_components.code,{children:`Next`}),`.`]}),`\n`,_jsx(Frame,{caption:`Prompt for a connection with a Notion template option`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=bce36d9f1a69a618dc886d1baf46d50f`,\"data-og-width\":`1102`,width:`1102`,\"data-og-height\":`1462`,height:`1462`,\"data-path\":`images/docs/77076c7-template_prompt1.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=280\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=6ddc1e0e9c726f155c7bac0a0fe0bed0 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=560\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=a1ae1eb9f748c32af5e88111d45d1af1 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=840\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=3af09c117c8a03d74983a9c55cded60c 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=1100\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=73e048e5cf0e2520cf8e218d4763ecd8 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=1650\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=56472acfdbdfe57e8e8ede6abee82048 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/77076c7-template_prompt1.png?w=2500\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=885dc89b073e5019cd12152a24e45550 2500w`})}),`\n`,_jsx(_components.p,{children:`In the next step, a user can either choose to duplicate the template that you provided or to select existing pages to share with the connection.`}),`\n`,_jsx(Frame,{caption:`A user can select to duplicate a template or to share existing pages with the connection`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=d5ff31ef9083f78b60e615758b6f580e`,\"data-og-width\":`1052`,width:`1052`,\"data-og-height\":`1546`,height:`1546`,\"data-path\":`images/docs/9788bdb-template_prompt_2.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=280\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=d0bcebf97c2d2d47298b5eb3ed8e9667 280w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=560\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=0df02c964b4ba61b341057ce4ca2b7c1 560w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=840\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=edf55877ba383f2192ad830326ca6885 840w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=1100\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=c236950de91a26a9329f68e904b29565 1100w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=1650\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=ad655a24827c812ebed25fc3e3a7edd6 1650w, https://mintcdn.com/notion-demo/9OFhQspLr8njnajd/images/docs/9788bdb-template_prompt_2.png?w=2500\u0026fit=max\u0026auto=format\u0026n=9OFhQspLr8njnajd\u0026q=85\u0026s=2ca3fc12da1dc649db7f8128100996bf 2500w`})}),`\n`,_jsx(_components.p,{children:`If the user chooses to duplicate the template, then the following happens automatically:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The connection is added to the user’s workspace.`}),`\n`,_jsx(_components.li,{children:`The template is duplicated as a new page in the workspace.`}),`\n`,_jsx(_components.li,{children:`The new page is shared with the connection.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If the user chooses to select pages to share with the connection, then they continue to the page picker interface that’s part of the `,_jsx(_components.a,{href:`#prompt-for-a-standard-connection-with-no-template-option-default`,children:`prompt for a standard connection`}),`.`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`After a user authorizes a public connection, only that user is able to interact or share pages and databases with the connection. Unlike internal connections, if multiple members in a workspace want to use a public connection, each prospective user needs to individually follow the auth flow for the connection.`})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`User authorization failures`})}),`\n`,_jsxs(_components.p,{children:[`User authorization failures can happen. If a user chooses to `,_jsx(_components.code,{children:`Cancel`}),` the request, then a failure is triggered. Build your connection to handle these cases gracefully, as needed.`]}),`\n`,_jsxs(_components.p,{children:[`In some cases, Notion redirects the user to the `,_jsx(_components.code,{children:`redirect_uri`}),` that you set up when you created the public connection, along with an `,_jsx(_components.code,{children:`error`}),` query parameter. Notion uses the common `,_jsx(_components.a,{href:`https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2.1`,children:`error codes in the OAuth specification`}),`. Use the `,_jsx(_components.code,{children:`error`}),` code to create a helpful prompt for the user when they’re redirected here.`]}),`\n`,_jsxs(Heading,{level:`3`,id:`step-2-notion-redirects-the-user-to-the-connection’s-redirect-uri-and-includes-a-code-parameter`,children:[`Step 2 - Notion redirects the user to the connection’s redirect URI and includes a `,_jsx(_components.code,{children:`code`}),` parameter`]}),`\n`,_jsxs(_components.p,{children:[`When you first created the public connection, you specified a redirect URI. If the user follows the prompt to `,_jsx(_components.code,{children:`Allow access`}),` for the connection, then Notion generates a temporary `,_jsx(_components.code,{children:`code`}),` and sends a request to the redirect URI with the following information in the query string:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Parameter`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Required`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`code`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`A temporary authorization code.`}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`state`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The value provided by the connection when the user was `,_jsx(_components.a,{href:`#prompt-for-a-standard-connection-with-no-template-option-default`,children:`prompted for access`}),`.`]}),_jsx(_components.td,{style:{textAlign:`left`}})]})]})]}),`\n`,_jsxs(_components.p,{children:[`To complete the next step, retrieve the `,_jsx(_components.code,{children:`code`}),` query parameter provided in the redirect. The retrieval method varies depending on your app’s tech stack.`]}),`\n`,_jsxs(_components.p,{children:[`In a React component, for example, the query parameters are made available through the `,_jsx(_components.code,{children:`useRouter()`}),` hook:`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`5`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` AuthRedirectPage`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`  const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` router`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` useRouter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`  const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`code`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` router`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`  ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsxs(Heading,{level:`3`,id:`step-3-send-the-code-in-a-post-request-to-the-notion-api`,children:[`Step 3 - Send the `,_jsx(_components.code,{children:`code`}),` in a `,_jsx(_components.code,{children:`POST`}),` request to the Notion API`]}),`\n`,_jsxs(_components.p,{children:[`The connection needs to exchange the temporary `,_jsx(_components.code,{children:`code`}),` for an `,_jsx(_components.code,{children:`access_token`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`To set up this step, retrieve the `,_jsx(_components.code,{children:`code`}),` from the redirect URI.`]}),`\n`,_jsxs(_components.p,{children:[`Next, send the `,_jsx(_components.code,{children:`code`}),` as part of a `,_jsx(_components.code,{children:`POST`}),` request to Notion’s token endpoint: `,_jsx(_components.a,{href:`https://api.notion.com/v1/oauth/token`,children:`https://api.notion.com/v1/oauth/token`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`This endpoint is described in more detail in the API reference docs for `,_jsx(_components.a,{href:`/reference/create-a-token`,children:`creating a token`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The request is authorized using HTTP Basic Authentication. The credential is a colon-delimited combination of the connection’s `,_jsx(_components.code,{children:`CLIENT_ID`}),` and `,_jsx(_components.code,{children:`CLIENT_SECRET`}),`, like so:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`CLIENT_ID:CLIENT_SECRET`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Find both of these values in the `,_jsx(`a`,{href:developerConnectionsUrl,children:`Developer portal`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Note that in `,_jsx(_components.a,{href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication`,children:`HTTP Basic Authentication`}),`, credentials are `,_jsx(_components.code,{children:`base64`}),` encoded before being added to the `,_jsx(_components.code,{children:`Authorization`}),` header.`]}),`\n`,_jsx(_components.p,{children:`The body of the request contains the following JSON-encoded fields:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Field`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Type`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Required`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"grant_type\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Always use `,_jsx(_components.code,{children:`\"authorization_code\"`}),`.`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"code\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The temporary authorization code received in the incoming request to the `,_jsx(_components.code,{children:`\"redirect_uri\"`}),`.`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"redirect_uri\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The `,_jsx(_components.code,{children:`\"redirect_uri\"`}),` that was provided in the Authorization step.`]}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`✅/❌* `,_jsx(`br`,{}),_jsx(`br`,{}),` * If the redirect URI was supplied as a query param in the Authorization URL, this field is required. If there are more than one redirect URIs included in your connection settings, this field is required. Otherwise, it is not allowed. Learn more in the `,_jsx(_components.a,{href:`/reference/create-a-token`,children:`Create a token page`}),`.`]})]})]})]}),`\n`,_jsx(_components.p,{children:`The following is an example request to exchange the authorization code for an access token:`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`HTTP`,numberOfLines:`5`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v1/oauth/token `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`HTTP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Basic \"$CLIENT_ID:$CLIENT_SECRET\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Content-Type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` application/json`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"grant_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"authorization_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"e202e8c9-0990-40af-855f-ff8f872b1ec6\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"redirect_uri\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/auth/notion/callback\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:`The Node-equivalent of this example would look something like this:`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`22`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`22`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` clientId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`OAUTH_CLIENT_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` clientSecret`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`OAUTH_CLIENT_SECRET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` redirectUri`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`OAUTH_REDIRECT_URI`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// encode in base 64`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` encoded`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` btoa`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`clientId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`clientSecret`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.notion.com/v1/oauth/token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tmethod:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\theaders:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tAccept:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\t\"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tAuthorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Basic \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`encoded`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tbody:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tgrant_type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"authorization_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tcode:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"your-temporary-code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tredirect_uri:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` redirectUri`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t}),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`})}),`\n`]})})})}),`\n`,_jsxs(Heading,{level:`3`,id:`step-4-notion-responds-with-an-access_token--refresh_token-and-additional-information`,children:[`Step 4 - Notion responds with an `,_jsx(_components.code,{children:`access_token`}),` , `,_jsx(_components.code,{children:`refresh_token`}),`, and additional information`]}),`\n`,_jsxs(_components.p,{children:[`Notion responds to the request with an `,_jsx(_components.code,{children:`access_token`}),`, `,_jsx(_components.code,{children:`refresh_token`}),`, and additional information. The `,_jsx(_components.code,{children:`access_token`}),` will be used to authenticate subsequent Notion REST API requests. The `,_jsx(_components.code,{children:`refresh_token`}),` will be used to refresh the access token, which generates a new `,_jsx(_components.code,{children:`access_token`}),`.`]}),`\n`,_jsx(_components.p,{children:`The response contains the following JSON-encoded fields:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Field`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Type`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Not null`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"access_token\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`An access token used to authorize requests to the Notion API.`}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"refresh_token\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`A refresh token used to generate a new access token`}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"bot_id\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`An identifier for this authorization.`}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"duplicated_template_id\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The ID of the new page created in the user’s workspace. The new page is a duplicate of the template that the developer provided with the connection. If the developer didn’t provide a template for the connection, then the value is `,_jsx(_components.code,{children:`null`}),`.`]}),_jsx(_components.td,{style:{textAlign:`left`}})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"owner\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`object`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`An object containing information about who can view and share this connection. A `,_jsx(_components.a,{href:`/reference/user`,children:`user object`}),` is returned, representing the user who authorized the connection.`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"workspace_icon\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`A URL to an image that can be used to display this authorization in the UI.`}),_jsx(_components.td,{style:{textAlign:`left`}})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"workspace_id\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`The ID of the workspace where this authorization took place.`}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"workspace_name\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`A human-readable name that can be used to display this authorization in the UI.`}),_jsx(_components.td,{style:{textAlign:`left`}})]})]})]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Token request failures`})}),`\n`,_jsxs(_components.p,{children:[`If something goes wrong when the connection attempts to exchange the `,_jsx(_components.code,{children:`code`}),` for an `,_jsx(_components.code,{children:`access_token`}),`, then the response contains a JSON-encoded body with an `,_jsx(_components.code,{children:`\"error\"`}),` field. Notion uses the common `,_jsx(_components.a,{href:`https://datatracker.ietf.org/doc/html/rfc6749#section-5.2`,children:`error codes from the OAuth specification`}),`.`]}),`\n`,_jsxs(Heading,{level:`3`,id:`step-5-the-connection-stores-the-access_token-and-refresh_token-for-future-requests`,children:[`Step 5 - The connection stores the `,_jsx(_components.code,{children:`access_token`}),` and `,_jsx(_components.code,{children:`refresh_token`}),` for future requests`]}),`\n`,_jsxs(_components.p,{children:[`Set up a way for your connection to store both the `,_jsx(_components.code,{children:`access_token`}),` and `,_jsx(_components.code,{children:`refresh_token`}),` that it receives. The `,_jsx(_components.code,{children:`access_token`}),` is used to make authorized requests to the Notion API, and the `,_jsx(_components.code,{children:`refresh_token`}),` is used to generate a new `,_jsx(_components.code,{children:`access_token`}),`.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Tips for storing and using token access`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Setting up a database is a typical solution for storing access tokens. If you’re using a database, then build relations between an `,_jsx(_components.code,{children:`access_token`}),`, `,_jsx(_components.code,{children:`refresh_token`}),`, and the corresponding Notion resources that your connection accesses with that token. For example, if you store a Notion database or page ID, relate those records with the correct `,_jsx(_components.code,{children:`access_token`}),` that you use to authorize requests to read or write to that database or page, and the `,_jsx(_components.code,{children:`refresh_token`}),` for ongoing token lifecycle support..`]}),`\n`,_jsxs(_components.li,{children:[`Store all of the information that your connection receives with the `,_jsx(_components.code,{children:`access_token`}),` and `,_jsx(_components.code,{children:`refresh_token`}),`. You never know when your UI or product requirements might change and you’ll need this data. It’s really hard (or impossible) to send users to repeat the authorization flow to generate the information again.`]}),`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.code,{children:`bot_id`}),` returned along with your tokens identifies the Notion bot for the authorization. Store the token pair from each successful authorization response. This includes re-authorization of the same connection, where Notion may return a new `,_jsx(_components.code,{children:`access_token`}),` and `,_jsx(_components.code,{children:`refresh_token`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`step-6-refreshing-an-access-token`,children:`Step 6 - Refreshing an access token`}),`\n`,_jsx(_components.p,{children:`Refreshing an access token will generate a new access token and a new refresh token.`}),`\n`,_jsxs(_components.p,{children:[`Send the `,_jsx(_components.code,{children:`refresh_token`}),` provided from `,_jsx(_components.a,{href:`#step-4-notion-responds-with-an-access_token--refresh_token-and-additional-information`,children:`Step 4`}),` as part of a `,_jsx(_components.code,{children:`POST`}),` request to Notion’s token endpoint: `,_jsx(_components.a,{href:`https://api.notion.com/v1/oauth/token`,children:`https://api.notion.com/v1/oauth/token`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`This endpoint is described in more detail in the API reference docs for `,_jsx(_components.a,{href:`/reference/refresh-a-token`,children:`refreshing a token`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The request is authorized using HTTP Basic Authentication. The credential is a colon-delimited combination of the connection’s `,_jsx(_components.code,{children:`CLIENT_ID`}),` and `,_jsx(_components.code,{children:`CLIENT_SECRET`}),`, like so:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`CLIENT_ID:CLIENT_SECRET`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Find both of these values in the `,_jsx(`a`,{href:developerConnectionsUrl,children:`Developer portal`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Note that in `,_jsx(_components.a,{href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication`,children:`HTTP Basic Authentication`}),`, credentials are `,_jsx(_components.code,{children:`base64`}),` encoded before being added to the `,_jsx(_components.code,{children:`Authorization`}),` header.`]}),`\n`,_jsx(_components.p,{children:`The body of the request contains the following JSON-encoded fields:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Field`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Type`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Required`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"grant_type\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Always use `,_jsx(_components.code,{children:`\"refresh_token\"`}),`.`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`\"refresh_token\"`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The `,_jsx(_components.code,{children:`\"refresh_token\"`}),` returned in the Authorization step.`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`✅`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The following is an example request to exchange the `,_jsx(_components.code,{children:`refresh_token`}),` for a new access token and new refresh token`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`HTTP`,numberOfLines:`5`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v1/oauth/token `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`HTTP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Basic \"$CLIENT_ID:$CLIENT_SECRET\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Content-Type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` application/json`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"grant_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"refresh_token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"refresh_token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"nrt_4991090011501Ejc6Xn4sHguI7jZIN449mKe9PRhpMfNK\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:`The Node-equivalent of this example would look something like this:`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`20`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`20`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` clientId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`OAUTH_CLIENT_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` clientSecret`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`OAUTH_CLIENT_SECRET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// encode in base 64`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` encoded`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` btoa`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`clientId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`clientSecret`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.notion.com/v1/oauth/token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tmethod:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\theaders:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tAccept:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\t\"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tAuthorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Basic \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`encoded`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tbody:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\tgrant_type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"refresh_token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t\trefresh_token:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"your-refresh-token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t}),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`})}),`\n`]})})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{developerPortalUrl,developerConnectionsUrl,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}"])</script><script>self.__next_f.push([1,"4e:[\"$\",\"$L50\",null,{\"slug\":\"guides/get-started/authorization\",\"pageMetadata\":\"$2e:props:pageMetadata\",\"theme\":\"aspen\",\"children\":[\"$\",\"$L51\",null,{\"mdxSource\":{\"compiledSource\":\"$52\",\"frontmatter\":{},\"scope\":{\"config\":{},\"pageMetadata\":{\"title\":\"Authorization\",\"description\":\"This guide describes the authorization flows for Notion connections and personal access tokens.\",\"href\":\"/guides/get-started/authorization\"}}},\"mdxSourceWithNoJs\":{\"compiledSource\":\"$53\",\"frontmatter\":{},\"scope\":{\"config\":{},\"pageMetadata\":{\"title\":\"Authorization\",\"description\":\"This guide describes the authorization flows for Notion connections and personal access tokens.\",\"href\":\"/guides/get-started/authorization\"}}},\"displayDomain\":\"developers.notion.com\"}]}]\n"])</script><script type="module" src="https://static.cloudflareinsights.com/beacon.min.js/v4513226cdae34746b4dedf0b4dfa099e1781791509496" integrity="sha512-ZE9pZaUXND66v380QUtch/5sE9tPFh2zg45pR2PB0CVkCtOREv2AJKkSidISWkysEuQ0EH8faUU5du78bx87UQ==" data-cf-beacon='{"version":"2024.11.0","token":"ec498eeaf978486e97df12e6f8e98ec0"}' crossorigin="anonymous"></script>
</body></html>