Get an Access Token by using an authorized Secret Key. The API returns the Access Token along with its expiry and a Refresh Token. To obtain a renewed Access Token after expiry, make the same call with the Refresh Token.
Send the Access Token in the X-AccessToken header on every other call:Send the Access Token in the X-AccessToken request header on every authenticated call:
X-AccessToken: YOUR_ACCESS_TOKEN
When the token expires, request a new one with grantType=refresh instead of sending your Secret Key again.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"PureWL DPP","description":"Developer guides and API reference for the PureWL Data Privacy Protection (DPP) platform.","colors":{"primary":"#635BEB","light":"#A794FF","dark":"#5B47D6"},"logo":{"light":"/logo/light.svg","dark":"/logo/dark.svg"},"favicon":"/favicon.svg","api":{"playground":{"display":"interactive","proxy":false},"mdx":{"auth":{"method":"key","name":"X-AccessToken"},"server":"https://atomapi.com"}},"navbar":{"primary":{"type":"button","label":"Partner Console","href":"https://console.purewl.com"}},"footer":{"socials":{"website":"https://www.purewl.com"}},"integrations":{"telemetry":{"enabled":false}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"hasAudioNarration":false,"customDomains":[],"gitSource":{"type":"github","owner":"local","repo":"local","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"local","isBase":true},"buildId":"local","clientVersion":"0.0.4051"},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false,"isLoggedInCli":false,"mintExport":{}},"customCss":[{"filePath":"demo-visibility.css","content":"html:not(.dpp-demos) a[href=\"/demo\"],html:not(.dpp-demos) a[href^=\"/demo/\"]{display:none!important}html:not(.dpp-demos)[data-current-path^=\"/demo\"] #content-container{visibility:hidden}"},{"filePath":"page-gate.css","content":"#content[data-page-href$=\"/api-reference/dark-web-monitoring/asset-management\"],#content[data-page-href$=\"/api-reference/dark-web-monitoring/identity-management\"],#content[data-page-href$=\"/api-reference/dark-web-monitoring/monitoring-detection\"],#content[data-page-href$=\"/api-reference/dark-web-monitoring/webhooks\"],#content[data-page-href$=\"/api-reference/identity-exposure-intelligence/user-profile-enrichment\"],#content[data-page-href$=\"/api-reference/identity-exposure-intelligence/user-profile-enrichment-pro\"]{visibility:hidden}#content-container:has(#content[data-page-href$=\"/api-reference/dark-web-monitoring/asset-management\"]),#content-container:has(#content[data-page-href$=\"/api-reference/dark-web-monitoring/identity-management\"]),#content-container:has(#content[data-page-href$=\"/api-reference/dark-web-monitoring/monitoring-detection\"]),#content-container:has(#content[data-page-href$=\"/api-reference/dark-web-monitoring/webhooks\"]),#content-container:has(#content[data-page-href$=\"/api-reference/identity-exposure-intelligence/user-profile-enrichment\"]),#content-container:has(#content[data-page-href$=\"/api-reference/identity-exposure-intelligence/user-profile-enrichment-pro\"]){visibility:hidden}html.dpp-gate-unlocked #content,html.dpp-gate-unlocked #content-container{visibility:visible}:root{--dpp-lock-icon:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E\")}html.dpp-gate-authed{--dpp-lock-icon:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 9.9-1'/%3E%3C/svg%3E\")}#navigation-items li[data-title=\"ID Intelligence\"]>button::after,#navigation-items li[id=\"/api-reference/dark-web-monitoring/asset-management\"]>a::after,#navigation-items li[id=\"/api-reference/dark-web-monitoring/identity-management\"]>a::after,#navigation-items li[id=\"/api-reference/dark-web-monitoring/monitoring-detection\"]>a::after,#navigation-items li[id=\"/api-reference/dark-web-monitoring/webhooks\"]>a::after,#navigation-items li[id=\"/api-reference/identity-exposure-intelligence/user-profile-enrichment\"]>a::after,#navigation-items li[id=\"/api-reference/identity-exposure-intelligence/user-profile-enrichment-pro\"]>a::after{content:\"\";flex:none;align-self:flex-start;width:.9em;height:.9em;margin-top:.2em;opacity:.5;background-color:currentColor;-webkit-mask:var(--dpp-lock-icon) center/contain no-repeat;mask:var(--dpp-lock-icon) center/contain no-repeat}#navigation-items li[data-title=\"ID Intelligence\"]>button::after{order:1;margin-top:.3em}#navigation-items li[data-title=\"ID Intelligence\"]>button>div:last-child{order:2}#navigation-items li[data-title=\"ID Intelligence\"]>button[aria-expanded=true]::after{display:none}#dpp-gate-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(9,9,11,.55);backdrop-filter:blur(6px)}.dpp-gate-card{width:100%;max-width:26rem;padding:28px 26px;border-radius:14px;border:1px solid var(--tin-accent-strong, rgba(99, 91, 235, 0.28));background:var(--tin-card, #ffffff);box-shadow:0 18px 50px rgba(0,0,0,.28);text-align:center}.dpp-gate-title{margin:0 0 8px;font-size:18px;font-weight:700;color:var(--tin-count, #5b47d6)}.dpp-gate-sub{margin:0 0 18px;font-size:13px;line-height:1.55;color:var(--tin-muted, #71717a)}.dpp-gate-form{display:flex;flex-direction:column;gap:8px}.dpp-gate-input{width:100%;box-sizing:border-box;padding:10px 12px;font-size:14px;border-radius:8px;border:1px solid var(--tin-accent-strong, rgba(99, 91, 235, 0.28));background:0 0;color:inherit}.dpp-gate-input:focus{outline:2px solid var(--tin-count, #5b47d6);outline-offset:-1px}.dpp-gate-actions{display:flex;gap:8px;margin-top:2px}.dpp-gate-btn{flex:1;padding:10px 18px;font-size:14px;font-weight:600;border-radius:8px;border:1px solid transparent;cursor:pointer;color:#fff;background:var(--tin-count, #5b47d6)}.dpp-gate-btn:hover{filter:brightness(1.08)}.dpp-gate-btn-ghost{color:var(--tin-muted, #71717a);background:0 0;border-color:var(--tin-accent-strong, rgba(99, 91, 235, 0.28))}.dpp-gate-btn-ghost:hover{filter:none;color:var(--tin-count, #5b47d6);background:var(--tin-accent, rgba(99, 91, 235, 0.08))}.dpp-gate-error{margin:12px 0 0;font-size:13px;color:#dc2626}@media (prefers-color-scheme:dark){.dpp-gate-card{background:var(--tin-card, #18181b)}}"},{"filePath":"search.css","content":".dpp-search{--s-bg:#ffffff;--s-panel:#ffffff;--s-text:#1d1b2e;--s-muted:#6b6884;--s-border:#e4e1f5;--s-hover:#f3f1ff;--s-brand:#635BEB;--s-mark:rgba(99, 91, 235, 0.16);--s-kbd:#f1effa;position:fixed;inset:0;z-index:2147483000;display:none;align-items:flex-start;justify-content:center;padding:10vh 16px 16px;font-family:inherit}html.dark .dpp-search{--s-panel:#17161f;--s-text:#ecebf5;--s-muted:#a29fba;--s-border:#2c2a40;--s-hover:#221f36;--s-brand:#A794FF;--s-mark:rgba(167, 148, 255, 0.22);--s-kbd:#24223a}.dpp-search.is-open{display:flex}html.dpp-search-open{overflow:hidden}.dpp-search-backdrop{position:absolute;inset:0;background:rgba(10,8,25,.45);backdrop-filter:blur(3px)}.dpp-search-panel{position:relative;width:100%;max-width:680px;max-height:72vh;display:flex;flex-direction:column;background:var(--s-panel);color:var(--s-text);border:1px solid var(--s-border);border-radius:16px;box-shadow:0 24px 60px rgba(20,10,60,.35);overflow:hidden}.dpp-search-bar{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--s-border);color:var(--s-muted)}.dpp-search-bar input{flex:1;min-width:0;border:0;outline:0;background:0 0;color:var(--s-text);font-size:16px;font-family:inherit}.dpp-search-bar input::-webkit-search-cancel-button{display:none}.dpp-search kbd{font:600 11px/1 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--s-muted);background:var(--s-kbd);border:1px solid var(--s-border);border-radius:6px;padding:3px 6px}.dpp-search-list{overflow-y:auto;padding:8px}.dpp-search-label{font-size:12px;font-weight:600;color:var(--s-muted);text-transform:uppercase;letter-spacing:.04em;padding:8px 10px 4px}.dpp-search-item{display:block;padding:10px 12px;border-radius:10px;text-decoration:none!important;color:inherit;border:1px solid transparent}.dpp-search-item.is-active,.dpp-search-item:hover{background:var(--s-hover);border-color:var(--s-border)}.dpp-search-item.is-active{box-shadow:inset 3px 0 0 var(--s-brand)}.dpp-search-crumb{font-size:12px;color:var(--s-muted);margin-bottom:2px}.dpp-search-title{font-size:15px;font-weight:600;display:flex;align-items:center;gap:8px}.dpp-search-path{font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--s-muted);margin-top:2px;word-break:break-all}.dpp-search-snippet{font-size:13px;color:var(--s-muted);margin-top:4px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.dpp-search mark{background:var(--s-mark);color:inherit;border-radius:3px;padding:0 1px}.dpp-search-empty{padding:28px 12px;text-align:center;color:var(--s-muted);font-size:14px}.dpp-search-method{font:700 10px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.02em}.dpp-m-get{color:#2f80ed}.dpp-m-post{color:#16a34a}.dpp-m-patch{color:#d4a106}.dpp-m-delete{color:#dc2626}html.dark .dpp-m-get{color:#60a5fa}html.dark .dpp-m-post{color:#4ade80}html.dark .dpp-m-patch{color:#facc15}html.dark .dpp-m-delete{color:#f87171}.dpp-search-foot{display:flex;gap:16px;padding:10px 16px;border-top:1px solid var(--s-border);font-size:12px;color:var(--s-muted)}.dpp-search-foot kbd{margin-right:3px}@media (max-width:640px){.dpp-search{padding:12px 8px}.dpp-search-panel{max-height:86vh}.dpp-search-foot{display:none}}"},{"filePath":"sidebar.css","content":"#sidebar-content li>button>div:first-child{flex:1 1 auto;min-width:0}#sidebar #sidebar-content ul.sidebar-group.mt-6{margin-top:1.5rem}#sidebar-content li>a:has(.method-nav-pill){align-items:flex-start}#sidebar-content li>a>div:has(>.method-nav-pill){order:2;margin-left:auto;padding-left:.5rem}#sidebar-content .method-nav-pill{width:auto;justify-content:flex-end}#sidebar-content .method-nav-pill>span{background:0 0!important;padding:0;font-size:.6rem;letter-spacing:.02em}#sidebar-content .method-nav-pill>span[class*=text-green]{color:#2f80ed!important}#sidebar-content .method-nav-pill>span[class*=text-blue]{color:#16a34a!important}#sidebar-content .method-nav-pill>span[class*=text-orange]{color:#d4a106!important}#sidebar-content .method-nav-pill>span[class*=text-red]{color:#dc2626!important}:root.dark #sidebar-content .method-nav-pill>span[class*=text-green]{color:#60a5fa!important}:root.dark #sidebar-content .method-nav-pill>span[class*=text-blue]{color:#4ade80!important}:root.dark #sidebar-content .method-nav-pill>span[class*=text-orange]{color:#facc15!important}:root.dark #sidebar-content .method-nav-pill>span[class*=text-red]{color:#f87171!important}@view-transition{navigation:auto}html:not(.dpp-local) div[role=status][class*=cursor-grab][class*=touch-none]{display:none!important}"},{"filePath":"try-it-now.css","content":"@keyframes docs-scan-spin{to{transform:rotate(360deg)}}@keyframes dppShimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes dppPulse{0%,to{opacity:.35;transform:scale(.8)}50%{opacity:1;transform:scale(1.15)}}:root{--tin-card-bg:#ffffff;--tin-border:#e5e7eb;--tin-title:#111827;--tin-sub:#6b7280;--tin-input-bg:#ffffff;--tin-input-border:#d1d5db;--tin-input-text:#111827;--tin-placeholder:#9ca3af;--tin-prefix-bg:#f3f4f6;--tin-prefix-text:#1f2937;--tin-prefix-border:#e5e7eb;--tin-th:#6b7280;--tin-td:#374151;--tin-row-border:#f3f4f6;--tin-wrap-border:#e5e7eb;--tin-site:#111827;--tin-chip-bg:#f3f4f6;--tin-chip-text:#374151;--tin-tile-bg:#f9fafb;--tin-tile-num:#111827;--tin-tabs-bg:#f3f4f6;--tin-tab:#6b7280;--tin-tab-hover:#111827;--tin-filter-bg:#f3f4f6;--tin-filter-text:#52525b;--tin-filter-border:#e5e7eb;--tin-modal-bg:#ffffff;--tin-modal-body-bg:#f3f4f6;--tin-muted:#9ca3af;--tin-code-bg:#f1edff;--tin-code-text:#6d28d9;--tin-page-border:#d1d5db;--tin-page-text:#374151;--tin-logo-bg:#1f2433;--tin-accent:#635beb;--tin-accent-2:#5b47d6;--tin-accent-soft:rgba(99, 91, 235, 0.12);--tin-accent-strong:rgba(99, 91, 235, 0.28);--tin-count:#5b47d6;--tin-grad:linear-gradient(135deg, #635beb 0%, #5b47d6 100%);--tin-danger:#dc2626;--tin-danger-soft:rgba(220, 38, 38, 0.1)}.docs-scan{margin:28px 0 36px}.docs-scan-card-sub,.docs-scan-evidence-note,.docs-scan-legal,.docs-scan-results-sub,.docs-try-page-sub{display:block}.docs-try-page{max-width:1400px;margin:0 auto;padding:32px clamp(16px,3vw,40px) 80px}.docs-try-page-title{font-size:28px;font-weight:800;color:var(--tin-title);margin:0 0 4px;line-height:1.2}.docs-try-page-sub{font-size:15px;color:var(--tin-sub);margin:0 0 18px;line-height:1.5}.docs-try-page-back{display:inline-flex;align-items:center;gap:6px;color:var(--tin-sub);text-decoration:none;font-size:13px;font-weight:600;margin-bottom:20px}.docs-try-page-back:hover{color:var(--tin-accent)}.docs-try-page .docs-scan{margin:8px 0 0}.dark{--tin-card-bg:#14141b;--tin-border:rgba(255, 255, 255, 0.1);--tin-title:#f4f4f5;--tin-sub:#a1a1aa;--tin-input-bg:#1d1d27;--tin-input-border:rgba(255, 255, 255, 0.14);--tin-input-text:#e4e4e7;--tin-placeholder:#6b7280;--tin-prefix-bg:rgba(255, 255, 255, 0.04);--tin-prefix-text:#e4e4e7;--tin-prefix-border:rgba(255, 255, 255, 0.12);--tin-th:#a1a1aa;--tin-td:#d4d4d8;--tin-row-border:rgba(255, 255, 255, 0.06);--tin-wrap-border:rgba(255, 255, 255, 0.08);--tin-site:#f4f4f5;--tin-chip-bg:rgba(255, 255, 255, 0.06);--tin-chip-text:#d4d4d8;--tin-tile-bg:rgba(255, 255, 255, 0.03);--tin-tile-num:#f4f4f5;--tin-tabs-bg:rgba(255, 255, 255, 0.05);--tin-tab:#a1a1aa;--tin-tab-hover:#e4e4e7;--tin-filter-bg:rgba(255, 255, 255, 0.04);--tin-filter-text:#a1a1aa;--tin-filter-border:rgba(255, 255, 255, 0.14);--tin-modal-bg:#14141b;--tin-modal-body-bg:#0a0a0f;--tin-muted:#71717a;--tin-code-bg:rgba(115, 90, 255, 0.14);--tin-code-text:#c4b5fd;--tin-page-border:rgba(255, 255, 255, 0.18);--tin-page-text:#d4d4d8;--tin-accent-soft:rgba(115, 90, 255, 0.14);--tin-count:#9d86ff}.docs-scan-card,.docs-scan-results{position:relative;border:1px solid var(--tin-border);border-radius:14px;padding:28px 30px;background:var(--tin-card-bg)}.docs-scan-card-title{font-size:20px;font-weight:700;color:var(--tin-title);margin:0 0 6px}.docs-scan-card-sub{font-size:14px;color:var(--tin-sub);margin:0 0 22px;line-height:1.5}.docs-scan-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.docs-scan-grid,.docs-scan-single{margin-bottom:16px}.docs-scan-input{width:100%;padding:11px 13px;background:var(--tin-input-bg);border:1px solid var(--tin-input-border);border-radius:8px;color:var(--tin-input-text);font-size:14px;outline:0;transition:border-color .12s ease}.docs-phone-input::placeholder,.docs-scan-input::placeholder{color:var(--tin-placeholder)}.docs-scan-input:focus{border-color:var(--tin-accent)}.docs-scan-input:disabled{opacity:.6}.docs-scan-select{cursor:pointer}.docs-phone-field.docs-scan-input-err,.docs-scan-input.docs-scan-input-err{border-color:var(--tin-danger)!important}.docs-phone-field{display:flex;align-items:stretch;width:100%;background:var(--tin-input-bg);border:1px solid var(--tin-input-border);border-radius:8px;overflow:hidden;transition:border-color .12s ease}.docs-phone-field:focus-within{border-color:var(--tin-accent)}.docs-phone-prefix{display:flex;align-items:center;gap:6px;padding:0 12px;font-size:14px;font-weight:600;color:var(--tin-prefix-text);white-space:nowrap;background:var(--tin-prefix-bg);border-right:1px solid var(--tin-prefix-border)}.docs-phone-flag{font-size:18px;line-height:1}.docs-phone-country-select{border:0;background:var(--tin-prefix-bg);border-right:1px solid var(--tin-prefix-border);color:var(--tin-prefix-text);font-size:13px;font-weight:600;padding:0 8px;cursor:pointer;outline:0;align-self:stretch}.docs-phone-input{flex:1;min-width:0;padding:11px 13px;background:0 0;border:0;outline:0;color:var(--tin-input-text);font-size:14px}.docs-scan-legal{font-size:12px;color:var(--tin-muted);margin:18px 0 20px;line-height:1.5}.docs-scan-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.docs-scan-submit{display:inline-flex;align-items:center;gap:8px;padding:11px 22px;background:var(--tin-grad);color:#fff;border:0;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;box-shadow:0 6px 16px var(--tin-accent-strong);transition:box-shadow .15s ease,transform .15s ease,filter .15s ease}.docs-scan-submit:hover{filter:brightness(1.07);box-shadow:0 8px 22px var(--tin-accent-strong);transform:translateY(-1px)}.docs-scan-submit:disabled{opacity:.7;cursor:default}.docs-scan-alert{background:var(--tin-danger-soft);border:1px solid rgba(220,38,38,.4);color:var(--tin-danger);padding:10px 14px;border-radius:8px;font-size:13px;margin-bottom:14px}.docs-scan-field-err{display:block;margin-top:5px;font-size:12px;color:var(--tin-danger);line-height:1.35}.docs-scan-spin{animation:docs-scan-spin .9s linear infinite}.docs-scan-tabs{display:inline-flex;gap:4px;padding:4px;margin-bottom:18px;background:var(--tin-tabs-bg);border:1px solid var(--tin-border);border-radius:10px}.docs-scan-tab{padding:7px 18px;border:0;background:0 0;color:var(--tin-tab);font-size:13px;font-weight:600;border-radius:7px;cursor:pointer;transition:background .12s ease,color .12s ease}.docs-scan-tab:hover{color:var(--tin-tab-hover)}.docs-scan-tab-active{background:var(--tin-grad);color:#fff;box-shadow:0 3px 10px var(--tin-accent-strong)}.docs-scan-tab:disabled{opacity:.6;cursor:default}.docs-scan-filters{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}.docs-scan-filter{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;font-size:12px;font-weight:500;color:var(--tin-filter-text);background:var(--tin-filter-bg);border:1px solid var(--tin-filter-border);border-radius:999px;cursor:pointer;transition:color .12s ease,border-color .12s ease,background .12s ease}.docs-scan-filter:hover{color:var(--tin-tab-hover);border-color:var(--tin-page-border)}.docs-scan-filter svg{opacity:.85}.docs-scan-filter.docs-scan-filter-active{color:#fff;background:var(--tin-grad);border-color:transparent;box-shadow:0 3px 10px var(--tin-accent-strong)}.docs-scan-filter.docs-scan-filter-active:hover{color:#fff;filter:brightness(1.06)}.docs-scan-field{display:flex;flex-direction:column;gap:5px}.docs-scan-field-label{font-size:12px;font-weight:500;color:var(--tin-sub)}.docs-scan-results-head{text-align:center;margin-bottom:22px}.docs-scan-results-title{font-size:24px;font-weight:700;color:var(--tin-title);margin:0 0 10px}.docs-scan-count{color:var(--tin-count)}.docs-scan-risk{color:#ef4444;font-weight:600}.docs-scan-results-sub{font-size:14px;color:var(--tin-sub);margin:0 auto 18px;max-width:620px;line-height:1.55}.docs-scan-results-icon{display:block;margin:0 auto 8px}.docs-scan-result-icon{color:#f59e0b}.docs-scan-result-icon-ok{color:#22c55e}.docs-scan-pager{display:flex;align-items:center;justify-content:center;gap:8px;margin:18px 0}.docs-scan-pager-bottom{margin-top:20px}.docs-scan-page,.docs-scan-page-arrow{min-width:34px;height:34px;padding:0 8px;border:1px solid var(--tin-page-border);background:0 0;color:var(--tin-page-text);border-radius:7px;font-size:14px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.docs-scan-page-active,.docs-scan-page-arrow:hover,.docs-scan-page:hover{border-color:var(--tin-accent)}.docs-scan-page-active{background:var(--tin-accent-soft);color:var(--tin-count);font-weight:600}.docs-scan-page-arrow:disabled{opacity:.4;cursor:default}.docs-scan-table-wrap{overflow-x:auto;border-top:1px solid var(--tin-wrap-border)}.docs-scan-table{border-collapse:collapse;font-size:13px;table-layout:fixed}.docs-scan-table td,.docs-scan-table th{overflow-wrap:anywhere;word-break:break-word}.docs-scan-table thead th{text-align:left;padding:14px;color:var(--tin-th);font-weight:600;border-bottom:1px solid var(--tin-border);white-space:nowrap}.docs-dwm-table td,.docs-scan-table tbody td{border-bottom:1px solid var(--tin-row-border);vertical-align:top}.docs-scan-table tbody td{padding:14px;color:var(--tin-td)}.docs-scan-site{font-weight:600;color:var(--tin-site)}.docs-scan-status{color:#ef4444;font-weight:600}.docs-scan-na{color:var(--tin-muted)}.docs-scan-more,.docs-scan-newsearch{display:inline-flex;align-items:center;background:0 0;border:0;cursor:pointer;font-size:13px}.docs-scan-more{gap:3px;color:var(--tin-count);padding:0}.docs-scan-newsearch{gap:4px;margin-top:20px;color:var(--tin-muted);transition:color .12s ease}.docs-scan-newsearch:hover{color:var(--tin-accent)}.docs-scan-back-icon{transform:rotate(180deg)}.docs-dwm-risk{display:flex;gap:16px;flex-wrap:wrap;justify-content:center;margin:8px 0 4px}.docs-dwm-tile{flex:1;min-width:200px;display:flex;flex-direction:column;gap:4px;padding:20px;border:1px solid var(--tin-border);border-radius:12px;background:var(--tin-tile-bg)}.docs-dwm-tile-num{font-size:26px;font-weight:800;color:var(--tin-tile-num)}.docs-dwm-tile-label{font-size:13px;color:var(--tin-sub)}.docs-dwm-pager{display:flex;align-items:center;justify-content:center;gap:12px;margin:16px 0}.docs-dwm-pager-label{font-size:13px;color:var(--tin-sub);font-weight:600}.docs-dwm-record{border:1px solid var(--tin-border);border-radius:12px;overflow:hidden;width:100%}.docs-dwm-record-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:var(--tin-accent-soft);border-bottom:1px solid var(--tin-wrap-border)}.docs-dwm-record-title{font-weight:700;color:var(--tin-title);font-size:14px}.docs-dwm-record-head-right{display:flex;align-items:center;gap:10px}.docs-dwm-redacted-badge{font-size:11px;font-weight:600;color:var(--tin-code-text);background:var(--tin-code-bg);padding:2px 10px;border-radius:999px}.docs-dwm-table{table-layout:fixed;border-collapse:collapse;font-size:13px}.docs-dwm-table td{padding:10px 16px}.docs-dwm-table tr:last-child td{border-bottom:none}.docs-dwm-key{color:var(--tin-sub);width:38%}.docs-dwm-val{color:var(--tin-td);width:62%;overflow-wrap:anywhere;word-break:break-word}.docs-dwm-table,.docs-scan-table{display:table!important;margin:0!important;width:100%!important;max-width:100%!important}.docs-dwm-table thead,.docs-scan-table thead{display:table-header-group!important}.docs-dwm-table tbody,.docs-scan-table tbody{display:table-row-group!important}.docs-dwm-table tr,.docs-scan-table tr{display:table-row!important}.docs-dwm-table td,.docs-scan-table td,.docs-scan-table th{display:table-cell!important}.docs-scan-evidence{margin-top:24px;padding-top:20px;border-top:1px solid var(--tin-border)}.docs-scan-evidence-note{font-size:13px;color:var(--tin-sub);margin:0 0 14px;line-height:1.55}.docs-scan-evidence-note code{font-size:12px;color:var(--tin-code-text);background:var(--tin-code-bg);padding:1px 6px;border-radius:5px}.docs-scan-evidence-err{color:#ef4444}.docs-scan-evidence-warn{color:#d97706}.docs-scan-refresh{display:inline-flex;align-items:center;gap:6px;padding:9px 18px;background:0 0;color:var(--tin-count);border:1px solid var(--tin-accent-strong);border-radius:8px;font-size:13px;font-weight:600;cursor:pointer}.docs-scan-refresh:hover{background:var(--tin-accent-soft)}.docs-scan-refresh:disabled{opacity:.6;cursor:default}.docs-ev-loader{display:flex;align-items:center;gap:10px;margin-bottom:18px;padding:10px 14px;border-radius:10px;border:1px solid var(--tin-accent-strong);background:linear-gradient(90deg,rgba(99,91,235,.07),rgba(157,134,255,.16),rgba(99,91,235,.07));background-size:200% 100%;animation:dppShimmer 1.6s ease-in-out infinite}.docs-ev-loader-icon{color:var(--tin-accent);flex:0 0 auto}.docs-ev-loader-text{font-size:13px;font-weight:600;color:var(--tin-count)}.docs-ev-header{margin-bottom:18px}.docs-ev-stats{display:flex;flex-wrap:wrap;gap:12px;margin-top:16px}.docs-ev-stat{flex:1 1 120px;min-width:110px;padding:14px 16px;border:1px solid var(--tin-border);border-radius:12px;background:var(--tin-card-bg);display:flex;flex-direction:column;gap:3px}.docs-ev-stat-num{font-size:24px;font-weight:800;color:var(--tin-title);line-height:1.1}.docs-ev-stat-found{color:var(--tin-accent)}.docs-ev-stat-label{font-size:12px;color:var(--tin-sub)}.docs-ev-cards{display:grid;grid-template-columns:1fr;gap:16px;margin-top:16px}@media (min-width:600px){.docs-ev-cards{grid-template-columns:1fr 1fr}}@media (min-width:920px){.docs-ev-cards{grid-template-columns:1fr 1fr 1fr}}.docs-ev-card{display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid var(--tin-border);border-radius:12px;background:var(--tin-card-bg);transition:border-color .12s ease,box-shadow .12s ease}.docs-ev-card:hover{border-color:var(--tin-page-border);box-shadow:0 2px 10px rgba(17,24,39,.06)}.docs-ev-card-head{display:flex;align-items:center;gap:12px}.docs-ev-logo{flex:0 0 auto;width:40px;height:40px;border-radius:10px;background:var(--tin-logo-bg);color:#9ca3af;font-size:7px;font-weight:600;line-height:1.15;display:flex;align-items:center;justify-content:center;text-align:center;padding:4px;overflow:hidden;word-break:break-all}.docs-ev-card-titles{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}.docs-ev-card-cat,.docs-ev-card-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.docs-ev-card-name{font-size:15px;font-weight:700;color:var(--tin-title);line-height:1.25}.docs-ev-card-cat{font-size:12px;color:var(--tin-sub)}.docs-ev-status{flex:0 0 auto;margin-left:auto;font-size:12px;font-weight:600;white-space:nowrap}.docs-ev-link:hover,.docs-ev-status-progress{color:var(--tin-accent-2)}.docs-ev-status-clear{color:var(--tin-muted)}.docs-ev-status-exposed{color:#dc2626}.docs-ev-card-body{display:flex;flex-direction:column;gap:8px;padding-top:12px;border-top:1px solid var(--tin-row-border)}.docs-ev-data-label{font-size:13px;font-weight:700;color:var(--tin-title)}.docs-ev-chips{display:flex;flex-wrap:wrap;gap:8px}.docs-ev-chip{background:var(--tin-chip-bg);color:var(--tin-chip-text);font-size:12px;padding:5px 10px;border-radius:6px;word-break:break-all}.docs-ev-scanned{font-size:12px;color:var(--tin-muted)}.docs-ev-card-foot{margin-top:auto;display:flex;align-items:center;gap:12px}.docs-ev-link{display:inline-flex;align-items:center;gap:5px;background:0 0;border:0;padding:0;cursor:pointer;color:var(--tin-accent);font-size:13px;font-weight:600;text-decoration:none}.docs-ev-link:disabled{opacity:.5;cursor:default}.docs-ev-more{display:flex;flex-direction:column;align-items:center;gap:12px;margin-top:20px}.docs-ev-empty,.docs-ev-more-btns{display:flex;align-items:center;gap:16px}.docs-ev-empty{gap:12px;padding:18px 16px;border:1px dashed var(--tin-accent-strong);border-radius:12px;background:var(--tin-accent-soft)}.docs-ev-empty .docs-scan-evidence-note{margin:0}.docs-ev-empty-pulse{width:12px;height:12px;border-radius:50%;flex:0 0 auto;background:var(--tin-accent);animation:dppPulse 1.2s ease-in-out infinite}.docs-shot-overlay{position:fixed;inset:0;z-index:120;background:rgba(5,5,10,.72);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:32px 16px}.docs-shot-modal{width:100%;max-width:900px;max-height:88vh;display:flex;flex-direction:column;background:var(--tin-modal-bg);border:1px solid var(--tin-accent-strong);border-radius:14px;overflow:hidden}.docs-shot-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--tin-border)}.docs-shot-title{font-size:14px;font-weight:600;color:var(--tin-title)}.docs-shot-close{background:0 0;border:0;color:var(--tin-muted);cursor:pointer;padding:2px;line-height:0}.docs-shot-close:hover{color:var(--tin-title)}.docs-shot-body{flex:1;min-height:0;overflow:auto;padding:16px;display:flex;align-items:flex-start;justify-content:center;background:var(--tin-modal-body-bg)}.docs-shot-img{display:block;max-width:100%;height:auto;border-radius:6px}.docs-shot-empty,.docs-shot-loading{color:var(--tin-sub);font-size:14px;padding:48px 0}.docs-shot-loading{display:flex;flex-direction:column;align-items:center;gap:10px;font-size:13px;padding:56px 0}.docs-shot-loading .docs-scan-spin{color:var(--tin-count)}@media (max-width:640px){.docs-scan-grid{grid-template-columns:1fr}.docs-scan-card,.docs-scan-results{padding:20px}}html[data-current-path^=\"/demo/\"] #content-container{max-width:none}html[data-current-path^=\"/demo/\"] .docs-try-page{max-width:none;padding-left:0;padding-right:0;padding-top:8px}"}],"page":{"pagePath":"api-reference/authentication","slug":"/api-reference/authentication","pageMetadata":{"title":"API Access Authentication","api":"POST /auth/v2/accessToken","authMethod":"none","description":"Exchange your Secret Key for an Access Token, and refresh it when it expires.","href":"/api-reference/authentication"},"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: \"Exchange your Secret Key for an Access Token, and refresh it when it expires.\"\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":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,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,Expandable,Heading,ParamField,ResponseField,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Get an Access Token by using an authorized Secret Key. The API returns the Access Token along with its expiry and a Refresh Token. To obtain a renewed Access Token after expiry, make the same call with the Refresh Token.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`URL:`}),` `,_jsx(_components.code,{children:`/auth/v2/accessToken`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Full URL:`}),` `,_jsx(_components.code,{children:`\u003cbase_url>/auth/v2/accessToken`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Request Method:`}),` POST`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request Body`}),`\n`,_jsxs(_components.p,{children:[`Send the fields as form data (`,_jsx(_components.code,{children:`application/x-www-form-urlencoded`}),`).`]}),`\n`,_jsx(ParamField,{body:`grantType`,type:`string`,required:true,id:`param-grant-type`,children:_jsxs(_components.p,{children:[`How the Access Token is granted. One of `,_jsx(_components.code,{children:`secret`}),` or `,_jsx(_components.code,{children:`refresh`}),`.`]})}),`\n`,_jsx(ParamField,{body:`secretKey`,type:`string`,id:`param-secret-key`,children:_jsxs(_components.p,{children:[`Secret Key from the Partner Console. Required when `,_jsx(_components.code,{children:`grantType`}),` is `,_jsx(_components.code,{children:`secret`}),`.`]})}),`\n`,_jsx(ParamField,{body:`refreshToken`,type:`string`,id:`param-refresh-token`,children:_jsxs(_components.p,{children:[`Refresh Token returned by a previous call to this endpoint. Required when `,_jsx(_components.code,{children:`grantType`}),` is `,_jsx(_components.code,{children:`refresh`}),`.`]})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Keep your Secret Key server-side. Never use it in client code or commit it to source control.`})}),`\n`,_jsx(Heading,{level:`2`,id:`sample-request`,children:`Sample Request`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Secret Key`,numberOfLines:`4`,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:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\u003cbase_url>/auth/v2/accessToken\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/x-www-form-urlencoded\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Accept: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"grantType=secret\u0026secretKey=YOUR_SECRET_KEY\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Refresh Token`,numberOfLines:`4`,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:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\u003cbase_url>/auth/v2/accessToken\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/x-www-form-urlencoded\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Accept: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"grantType=refresh\u0026refreshToken=YOUR_REFRESH_TOKEN\"`})]}),`\n`]})})})]}),`\n`,`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`header`,type:`object`,id:`param-header`,children:_jsxs(Expandable,{title:`header`,children:[_jsx(ResponseField,{name:`code`,type:`number`,id:`param-code`,children:_jsxs(_components.p,{children:[`Result code. `,_jsx(_components.code,{children:`1`}),` = success.`]})}),_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message`,children:_jsx(_components.p,{children:`Response status message.`})}),_jsx(ResponseField,{name:`response_code`,type:`number`,id:`param-response-code`,children:_jsxs(_components.p,{children:[`Result code. `,_jsx(_components.code,{children:`1`}),` = success.`]})})]})}),`\n`,_jsx(ResponseField,{name:`body`,type:`object`,id:`param-body`,children:_jsxs(Expandable,{title:`body`,children:[_jsx(ResponseField,{name:`accessToken`,type:`string`,id:`param-access-token`,children:_jsxs(_components.p,{children:[`Access Token to send in the `,_jsx(_components.code,{children:`X-AccessToken`}),` header on every authenticated call.`]})}),_jsx(ResponseField,{name:`refreshToken`,type:`string`,id:`param-refresh-token-1`,children:_jsxs(_components.p,{children:[`Refresh Token for the next call to this endpoint with `,_jsx(_components.code,{children:`grantType`}),` set to `,_jsx(_components.code,{children:`refresh`}),`.`]})}),_jsx(ResponseField,{name:`expiry`,type:`number`,id:`param-expiry`,children:_jsx(_components.p,{children:`Number of seconds the Access Token is valid for.`})}),_jsx(ResponseField,{name:`resellerId`,type:`string`,id:`param-reseller-id`,children:_jsx(_components.p,{children:`Identifier of your reseller account.`})}),_jsx(ResponseField,{name:`resellerUid`,type:`string`,id:`param-reseller-uid`,children:_jsx(_components.p,{children:`Unique identifier of your reseller account.`})})]})}),`\n`,_jsx(Heading,{level:`2`,id:`sample-response`,children:`Sample Response`}),`\n`,_jsx(CodeBlock,{filename:`Success`,numberOfLines:`14`,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:`14`,children:[_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"header\"`}),_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:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Access token created successfully!\"`}),_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:` \"response_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"body\"`}),_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:` \"accessToken\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_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:` \"refreshToken\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_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:` \"expiry\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3600`}),_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:` \"resellerId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_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:` \"resellerUid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`})]}),`\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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,`\n`,_jsx(Heading,{level:`2`,id:`status-codes`,children:`Status Codes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`200`})}),_jsx(_components.td,{children:`Successful response.`})]})})]}),`\n`,_jsx(Heading,{level:`3`,id:`error-codes`,children:`Error codes`}),`\n`,_jsxs(_components.p,{children:[`Returned in `,_jsx(_components.code,{children:`header.response_code`}),` when the request fails.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Message`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`998`})}),_jsx(_components.td,{children:`Internal server error`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1001`})}),_jsx(_components.td,{children:`Validation error`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1002`})}),_jsx(_components.td,{children:`You are not permitted to the resource!`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/api-reference/errors`,children:`Errors`}),` for the response envelope and the full list of codes.`]}),`\n`,_jsx(Heading,{level:`2`,id:`using-the-token`,children:`Using the token`}),`\n`,_jsxs(_components.p,{children:[`Send the Access Token in the `,_jsx(_components.code,{children:`X-AccessToken`}),` header on every other call:`]}),`\n`,_jsxs(_components.p,{children:[`Send the Access Token in the `,_jsx(_components.code,{children:`X-AccessToken`}),` request header on every authenticated call:`]}),`\n`,_jsx(CodeBlock,{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:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`X-AccessToken:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_ACCESS_TOKEN`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`When the token expires, request a new one with `,_jsx(_components.code,{children:`grantType=refresh`}),` instead of sending your Secret Key again.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{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.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"API Access Authentication","api":"POST /auth/v2/accessToken","authMethod":"none","description":"Exchange your Secret Key for an Access Token, and refresh it when it expires.","href":"/api-reference/authentication"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,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,Expandable,Heading,ParamField,RequestExample,ResponseExample,ResponseField,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Get an Access Token by using an authorized Secret Key. The API returns the Access Token along with its expiry and a Refresh Token. To obtain a renewed Access Token after expiry, make the same call with the Refresh Token.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`URL:`}),` `,_jsx(_components.code,{children:`/auth/v2/accessToken`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Full URL:`}),` `,_jsx(_components.code,{children:`\u003cbase_url>/auth/v2/accessToken`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Request Method:`}),` POST`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request Body`}),`\n`,_jsxs(_components.p,{children:[`Send the fields as form data (`,_jsx(_components.code,{children:`application/x-www-form-urlencoded`}),`).`]}),`\n`,_jsx(ParamField,{body:`grantType`,type:`string`,required:true,id:`param-grant-type`,children:_jsxs(_components.p,{children:[`How the Access Token is granted. One of `,_jsx(_components.code,{children:`secret`}),` or `,_jsx(_components.code,{children:`refresh`}),`.`]})}),`\n`,_jsx(ParamField,{body:`secretKey`,type:`string`,id:`param-secret-key`,children:_jsxs(_components.p,{children:[`Secret Key from the Partner Console. Required when `,_jsx(_components.code,{children:`grantType`}),` is `,_jsx(_components.code,{children:`secret`}),`.`]})}),`\n`,_jsx(ParamField,{body:`refreshToken`,type:`string`,id:`param-refresh-token`,children:_jsxs(_components.p,{children:[`Refresh Token returned by a previous call to this endpoint. Required when `,_jsx(_components.code,{children:`grantType`}),` is `,_jsx(_components.code,{children:`refresh`}),`.`]})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Keep your Secret Key server-side. Never use it in client code or commit it to source control.`})}),`\n`,_jsx(Heading,{level:`2`,id:`sample-request`,children:`Sample Request`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Secret Key`,numberOfLines:`4`,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:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\u003cbase_url>/auth/v2/accessToken\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/x-www-form-urlencoded\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Accept: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"grantType=secret\u0026secretKey=YOUR_SECRET_KEY\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Refresh Token`,numberOfLines:`4`,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:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\u003cbase_url>/auth/v2/accessToken\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/x-www-form-urlencoded\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Accept: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"grantType=refresh\u0026refreshToken=YOUR_REFRESH_TOKEN\"`})]}),`\n`]})})})]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`Secret Key`,numberOfLines:`4`,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:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\u003cbase_url>/auth/v2/accessToken\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/x-www-form-urlencoded\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Accept: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"grantType=secret\u0026secretKey=YOUR_SECRET_KEY\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Refresh Token`,numberOfLines:`4`,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:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\u003cbase_url>/auth/v2/accessToken\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/x-www-form-urlencoded\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Accept: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"grantType=refresh\u0026refreshToken=YOUR_REFRESH_TOKEN\"`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`header`,type:`object`,id:`param-header`,children:_jsxs(Expandable,{title:`header`,children:[_jsx(ResponseField,{name:`code`,type:`number`,id:`param-code`,children:_jsxs(_components.p,{children:[`Result code. `,_jsx(_components.code,{children:`1`}),` = success.`]})}),_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message`,children:_jsx(_components.p,{children:`Response status message.`})}),_jsx(ResponseField,{name:`response_code`,type:`number`,id:`param-response-code`,children:_jsxs(_components.p,{children:[`Result code. `,_jsx(_components.code,{children:`1`}),` = success.`]})})]})}),`\n`,_jsx(ResponseField,{name:`body`,type:`object`,id:`param-body`,children:_jsxs(Expandable,{title:`body`,children:[_jsx(ResponseField,{name:`accessToken`,type:`string`,id:`param-access-token`,children:_jsxs(_components.p,{children:[`Access Token to send in the `,_jsx(_components.code,{children:`X-AccessToken`}),` header on every authenticated call.`]})}),_jsx(ResponseField,{name:`refreshToken`,type:`string`,id:`param-refresh-token-1`,children:_jsxs(_components.p,{children:[`Refresh Token for the next call to this endpoint with `,_jsx(_components.code,{children:`grantType`}),` set to `,_jsx(_components.code,{children:`refresh`}),`.`]})}),_jsx(ResponseField,{name:`expiry`,type:`number`,id:`param-expiry`,children:_jsx(_components.p,{children:`Number of seconds the Access Token is valid for.`})}),_jsx(ResponseField,{name:`resellerId`,type:`string`,id:`param-reseller-id`,children:_jsx(_components.p,{children:`Identifier of your reseller account.`})}),_jsx(ResponseField,{name:`resellerUid`,type:`string`,id:`param-reseller-uid`,children:_jsx(_components.p,{children:`Unique identifier of your reseller account.`})})]})}),`\n`,_jsx(Heading,{level:`2`,id:`sample-response`,children:`Sample Response`}),`\n`,_jsx(CodeBlock,{filename:`Success`,numberOfLines:`14`,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:`14`,children:[_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"header\"`}),_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:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Access token created successfully!\"`}),_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:` \"response_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"body\"`}),_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:` \"accessToken\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_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:` \"refreshToken\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_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:` \"expiry\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3600`}),_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:` \"resellerId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_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:` \"resellerUid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`})]}),`\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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`Success`,numberOfLines:`14`,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:`14`,children:[_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"header\"`}),_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:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Access token created successfully!\"`}),_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:` \"response_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"body\"`}),_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:` \"accessToken\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_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:` \"refreshToken\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_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:` \"expiry\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3600`}),_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:` \"resellerId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_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:` \"resellerUid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`})]}),`\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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`status-codes`,children:`Status Codes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`200`})}),_jsx(_components.td,{children:`Successful response.`})]})})]}),`\n`,_jsx(Heading,{level:`3`,id:`error-codes`,children:`Error codes`}),`\n`,_jsxs(_components.p,{children:[`Returned in `,_jsx(_components.code,{children:`header.response_code`}),` when the request fails.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Message`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`998`})}),_jsx(_components.td,{children:`Internal server error`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1001`})}),_jsx(_components.td,{children:`Validation error`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1002`})}),_jsx(_components.td,{children:`You are not permitted to the resource!`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/api-reference/errors`,children:`Errors`}),` for the response envelope and the full list of codes.`]}),`\n`,_jsx(Heading,{level:`2`,id:`using-the-token`,children:`Using the token`}),`\n`,_jsxs(_components.p,{children:[`Send the Access Token in the `,_jsx(_components.code,{children:`X-AccessToken`}),` header on every other call:`]}),`\n`,_jsxs(_components.p,{children:[`Send the Access Token in the `,_jsx(_components.code,{children:`X-AccessToken`}),` request header on every authenticated call:`]}),`\n`,_jsx(CodeBlock,{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:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`X-AccessToken:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_ACCESS_TOKEN`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`When the token expires, request a new one with `,_jsx(_components.code,{children:`grantType=refresh`}),` instead of sending your Secret Key again.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{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.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"API Access Authentication","api":"POST /auth/v2/accessToken","authMethod":"none","description":"Exchange your Secret Key for an Access Token, and refresh it when it expires.","href":"/api-reference/authentication"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Request Body","slug":"request-body","depth":2,"children":[]},{"title":"Sample Request","slug":"sample-request","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Sample Response","slug":"sample-response","depth":2,"children":[]},{"title":"Status Codes","slug":"status-codes","depth":2,"children":[{"title":"Error codes","slug":"error-codes","depth":3,"children":[]}]},{"title":"Using the token","slug":"using-the-token","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"Secret Key","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"\u0026#x3C;base_url>/auth/v2/accessToken\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/x-www-form-urlencoded\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Accept: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"grantType=secret\u0026#x26;secretKey=YOUR_SECRET_KEY\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Refresh Token","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"\u0026#x3C;base_url>/auth/v2/accessToken\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/x-www-form-urlencoded\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Accept: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"grantType=refresh\u0026#x26;refreshToken=YOUR_REFRESH_TOKEN\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"Success","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"14\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"header\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Access token created successfully!\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"response_code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"body\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"accessToken\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"string\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"refreshToken\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"string\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"expiry\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">3600\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"resellerId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"string\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"resellerUid\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"string\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"API Access Authentication","path":"/auth/v2/accessToken","servers":[{"url":"https://atomapi.com"}],"method":"post","request":{"security":[],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"grantType":[{"type":"string","description":"How the Access Token is granted. One of `secret` or `refresh` .","required":true}],"secretKey":[{"type":"string","description":"Secret Key from the Partner Console. Required when `grantType` is `secret` ."}],"refreshToken":[{"type":"string","description":"Refresh Token returned by a previous call to this endpoint. Required when `grantType` is `refresh` ."}]}}],"examples":{"example":{"value":{"grantType":"\u003cstring>","secretKey":"\u003cstring>","refreshToken":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"header":[{"type":"object","properties":{"code":[{"type":"number","description":"Result code. `1` = success."}],"message":[{"type":"string","description":"Response status message."}],"response_code":[{"type":"number","description":"Result code. `1` = success."}]}}],"body":[{"type":"object","properties":{"accessToken":[{"type":"string","description":"Access Token to send in the `X-AccessToken` header on every authenticated call."}],"refreshToken":[{"type":"string","description":"Refresh Token for the next call to this endpoint with `grantType` set to `refresh` ."}],"expiry":[{"type":"number","description":"Number of seconds the Access Token is valid for."}],"resellerId":[{"type":"string","description":"Identifier of your reseller account."}],"resellerUid":[{"type":"string","description":"Unique identifier of your reseller account."}]}}]}}],"examples":{"example":{"value":{"header":{"code":123,"message":"\u003cstring>","response_code":123},"body":{"accessToken":"\u003cstring>","refreshToken":"\u003cstring>","expiry":123,"resellerId":"\u003cstring>","resellerUid":"\u003cstring>"}}}}}}},"deprecated":false}},"jsLinks":["/_mintlify/custom/localhost/46c2209c09fd946c/demo-visibility.js","/_mintlify/custom/localhost/95b965142400cc28/local-preview.js","/_mintlify/custom/localhost/1fcada6330c99c21/page-gate.js","/_mintlify/custom/localhost/70cb21bc7ac95190/search.js","/_mintlify/custom/localhost/de13c2bac67d03ad/sidebar-scroll.js","/_mintlify/custom/localhost/9d66acae6cd06b9c/try-it-now-config.js"],"subdomain":"localhost","siteName":"PureWL DPP","title":"API Access Authentication - PureWL DPP","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"originalFileLocation":"api-reference/authentication.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Exchange your Secret Key for an Access Token, and refresh it when it expires.\">\u003cmeta data-mint-head name=\"application-name\" content=\"PureWL DPP\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/favicons/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicons/favicon-32x32.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicons/favicon-16x16.png\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicons/favicon.ico\">\u003cmeta data-mint-head property=\"og:title\" content=\"API Access Authentication - PureWL DPP\">\u003cmeta data-mint-head property=\"og:description\" content=\"Exchange your Secret Key for an Access Token, and refresh it when it expires.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"PureWL DPP\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://local./api-reference/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"API Access Authentication - PureWL DPP\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Exchange your Secret Key for an Access Token, and refresh it when it expires.\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/favicons/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"PureWL DPP\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#635BEB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://local./api-reference/authentication\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"PureWL DPP\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"PureWL DPP","nav":{"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/introduction-to-apis"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Reference","description":"A complete reference for the PureWL API, organized into authentication, user management, dark web monitoring, and data broker opt-out endpoint groups.","href":"/api-reference/overview"},{"title":"API Access Authentication","api":"POST /auth/v2/accessToken","href":"/api-reference/authentication"},{"title":"Errors","description":"How PureWL DPP API responses report success and failure: the response envelope, HTTP status codes, and retry guidance.","href":"/api-reference/errors"},{"title":"Rate Limits","href":"/api-reference/rate-limits"}]},{"group":"User Management","pages":[{"title":"User Management","sidebarTitle":"Overview","href":"/api-reference/user-management/overview"},{"title":"Create a User","api":"POST /usermanagement/v1/users","href":"/api-reference/user-management/create-user"},{"title":"List Users","api":"GET /usermanagement/v1/users","href":"/api-reference/user-management/list-users"},{"title":"Get User","api":"GET /usermanagement/v1/user","href":"/api-reference/user-management/get-user"},{"title":"Update a User","api":"PATCH /usermanagement/v1/users","href":"/api-reference/user-management/update-user"},{"title":"Enable a User","api":"POST /usermanagement/v1/users/enable","href":"/api-reference/user-management/enable-user"},{"title":"Disable a User","api":"POST /usermanagement/v1/users/disable","href":"/api-reference/user-management/disable-user"},{"title":"Extend User Expiry","api":"POST /usermanagement/v1/users/extendExpiry","sidebarTitle":"Extend Expiry","href":"/api-reference/user-management/extend-expiry"},{"title":"Renew a User","api":"POST /usermanagement/v1/users/renew","href":"/api-reference/user-management/renew-user"},{"title":"Delete a User","api":"DELETE /usermanagement/v1/users","href":"/api-reference/user-management/delete-user"}]},{"group":"Dark Web Monitoring","pages":[{"group":"Quick Scan","pages":[{"title":"Stats by Email","api":"GET /dpp/dwm/v2/stats/emails/{email}","href":"/api-reference/dark-web-monitoring/quick-scan/stats-email"},{"title":"Stats by Domain","api":"GET /dpp/dwm/v2/stats/domains/{domain}","href":"/api-reference/dark-web-monitoring/quick-scan/stats-domain"}]},{"group":"Dark Web Scan","pages":[{"title":"Get Records by Email","api":"GET /dpp/dwm/v2/breach/data/emails/{email}","sidebarTitle":"Email","href":"/api-reference/dark-web-monitoring/dark-web-scan/email"},{"title":"Get Records by Domain","api":"GET /dpp/dwm/v2/breach/data/domains/{domain}","sidebarTitle":"Domain","href":"/api-reference/dark-web-monitoring/dark-web-scan/domain"},{"title":"Get Records by Phone Number","api":"GET /dpp/dwm/v2/breach/data/phone-numbers/{phone}","sidebarTitle":"Phone Number","href":"/api-reference/dark-web-monitoring/dark-web-scan/phone-number"},{"title":"Get Records by Username","api":"GET /dpp/dwm/v2/breach/data/usernames/{username}","sidebarTitle":"Username","href":"/api-reference/dark-web-monitoring/dark-web-scan/username"},{"title":"Get Records by Password","sidebarTitle":"Password","href":"/api-reference/dark-web-monitoring/dark-web-scan/password"},{"title":"Get Records by IP Address","api":"GET /dpp/dwm/v2/breach/data/ips/{ip}","sidebarTitle":"IP Address","href":"/api-reference/dark-web-monitoring/dark-web-scan/ip-address"},{"title":"Get Records by Bank Number","api":"GET /dpp/dwm/v2/breach/data/bank-numbers/{bankNumber}","sidebarTitle":"Bank Number","href":"/api-reference/dark-web-monitoring/dark-web-scan/bank-number"},{"title":"Get Records by Credit Card Number","api":"GET /dpp/dwm/v2/breach/data/cc-numbers/{ccSha1}","sidebarTitle":"Credit Card Number","href":"/api-reference/dark-web-monitoring/dark-web-scan/credit-card-number"},{"title":"Get Records by National ID","api":"GET /dpp/dwm/v2/breach/data/national-ids/{nationalId}","sidebarTitle":"National ID","href":"/api-reference/dark-web-monitoring/dark-web-scan/national-id"},{"title":"Get Records by Social Security Number","api":"GET /dpp/dwm/v2/breach/data/social-security-numbers/{ssnSha1}","sidebarTitle":"Social Security Number","href":"/api-reference/dark-web-monitoring/dark-web-scan/ssn"},{"title":"Get Records by Passport Number","api":"GET /dpp/dwm/v2/breach/data/passport-numbers/{passport}","sidebarTitle":"Passport Number","href":"/api-reference/dark-web-monitoring/dark-web-scan/passport-number"},{"title":"Get Records by Health Insurance ID","sidebarTitle":"Health Insurance ID","href":"/api-reference/dark-web-monitoring/dark-web-scan/health-insurance-id"},{"title":"Get Records by Driver's License","api":"GET /dpp/dwm/v2/breach/data/drivers-licenses/{license}","sidebarTitle":"Driver's License","href":"/api-reference/dark-web-monitoring/dark-web-scan/drivers-license"}]},{"group":"Breach Catalog","pages":[{"title":"List All Breach Metadata","api":"GET /dpp/dwm/v2/breach/catalog","href":"/api-reference/dark-web-monitoring/breach-catalog/list-breaches"},{"title":"Get Metadata for a Breach","api":"GET /dpp/dwm/v2/breach/catalog-detail/{breachId}","href":"/api-reference/dark-web-monitoring/breach-catalog/get-breach"}]},{"group":"ID Enrichment","pages":[{"title":"Get User Exposure by Phone Number","api":"GET /dpp/dwm/v2/user-exposure/phone/{phone}","sidebarTitle":"By Phone Number","href":"/api-reference/dark-web-monitoring/id-enrichment/phone"},{"title":"Get User Exposure by Email","api":"GET /dpp/dwm/v2/user-exposure/email/{email}","sidebarTitle":"By Email","href":"/api-reference/dark-web-monitoring/id-enrichment/email"}]},{"group":"Real-Time Dark Web Monitoring","pages":[{"title":"User \u0026 Asset Management","href":"/api-reference/dark-web-monitoring/real-time/user-asset-management"},{"title":"Dark Web Monitoring Webhooks","sidebarTitle":"Webhooks for DWM","href":"/api-reference/dark-web-monitoring/real-time/webhooks"}]}]},{"group":"Data Broker Opt-Out Service","pages":[{"group":"Broker Scan","pages":[{"title":"Instant People Search","api":"POST /dpp/dbos/v2/scan","href":"/api-reference/data-broker-opt-out/broker-scan/instant-people-search"},{"group":"Evidence Based Scan","root":{"title":"Evidence Based Scan","api":"GET /dpp/dbos/v2/users/{profileId}/status","href":"/api-reference/data-broker-opt-out/broker-scan/evidence-based-scan"},"pages":[{"title":"Retrieve Screenshots","api":"GET /dpp/dbos/v2/users/{profileId}/screenshot","href":"/api-reference/data-broker-opt-out/broker-scan/retrieve-screenshots"}]}]},{"group":"Broker Catalog","pages":[{"title":"List Brokers","api":"GET /dpp/dbos/v2/brokers","href":"/api-reference/data-broker-opt-out/broker-catalog/list-brokers"},{"title":"Get Broker by ID","api":"GET /dpp/dbos/v2/brokers/{brokerId}","href":"/api-reference/data-broker-opt-out/broker-catalog/get-broker"}]},{"group":"Automate Opt-Out","pages":[{"title":"Initiate Profile Request (POA Sign)","api":"POST /dpp/dbos/v2/users/{profileId}/sign","sidebarTitle":"Initiate Profile Request","href":"/api-reference/data-broker-opt-out/automate-opt-out/initiate-profile-request"},{"title":"Get Profile Status","api":"GET /dpp/dbos/v2/users/{profileId}/status","href":"/api-reference/data-broker-opt-out/automate-opt-out/get-profile-status"},{"title":"Data Broker Opt-Out Webhooks","sidebarTitle":"Webhooks for DBOS","href":"/api-reference/data-broker-opt-out/automate-opt-out/webhooks"}]},{"group":"ID Enrichment","pages":[{"title":"Person Lookup","api":"POST /dpp/dbos/v2/id-enrichment-by-name-location","href":"/api-reference/data-broker-opt-out/id-enrichment/person-lookup"},{"title":"Reverse Phone Lookup","api":"POST /dpp/dbos/v2/id-enrichment-by-phone","href":"/api-reference/data-broker-opt-out/id-enrichment/reverse-phone-lookup"}]}]}]},{"tab":"Playground","pages":[{"title":"Playground","href":"/playground/overview"}]},{"tab":"Demo","pages":[{"title":"Demo","href":"/demo/overview"}]}]},"basePath":"","title":"API Access Authentication - PureWL DPP","buildId":"3f1550519de8","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-BuRJC8NC.js","utils-B5P7g7ti.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-Bx6RRJFd.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DNxaJQSS.js","snippetPresets-DKw8XQMT.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-DtW0uCX0.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CtCQoGu9.js","shallow-Dq5-SwG1.js","getApiPlaygroundDisplay-Dh89d8lJ.js","CodeSnippet-CRarNBwP.js","CodeSnippets-DFaAIRtQ.js","Page-CzLC80Mh.js","getPastedJson-BrCkwHBd.js","icon-HMNWawTa.js","MethodPill-BG5ozJ-h.js","DuplicateIcon-DK5o2DOi.js","createIcon-BhUMOhLi.js","DynamicMarkdown-D7ZrIdcP.js","SectionHeading-BDdndsFH.js","axios-vUo_bRtp.js"]}