Select Create key, give it a label, and copy the key.
The full key is shown once. The key list shows only a display hint and its identifier. If you lose it, create a replacement and revoke the old key.
What a key can access
A key acts as your account. It can manage your sessions and API keys, inspect your account and history, and operate your phones. Keys are not scoped to individual phones and do not have separate read-only permissions.Another account’s session is treated as missing. The API returns 404 rather than exposing who owns it.
An API key is a secret. Do not put it in a share URL, a public repository, frontend code, or a screenshot. Use environment variables or your deployment’s secret store.
Rotate and revoke keys
Use GET /me/keys to find a key’s key_hash, then send that identifier to POST /me/keys/revoke:
For rotation, create and test the replacement first. Revoking a key prevents subsequent authentication with that key; it does not end existing phone sessions. End sessions separately when needed.
Browser sign-in
The Phone Harness dashboard uses a Clerk session token with the same bearer header. For server integrations, use a Phone Harness API key instead of copying a short-lived browser token. Authentication does not bypass invite-only account access.
Read-only watch links
A session’s watch_url contains a limited view grant. It can expose that session’s metadata, snapshots and live video (view only) while the grant and session remain valid. It cannot install apps, send operations, or obtain the interactive owner viewer.Treat watch links as private capabilities: anyone holding a valid link can use its granted view access. Never replace its token with your API key.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"phone-harness","description":"Start a temporary Android phone, install your app, and automate it through the Phone Harness API.","colors":{"primary":"#20231E","light":"#E5E9DF","dark":"#20231E"},"logo":{"light":"https://mintcdn.com/phone-harness/k6Ti82e3lkhdZ8Co/images/wordmark-light.svg?fit=max\u0026auto=format\u0026n=k6Ti82e3lkhdZ8Co\u0026q=85\u0026s=f1a15d5a898e668d2c240f632b5842a5","dark":"https://mintcdn.com/phone-harness/k6Ti82e3lkhdZ8Co/images/wordmark-dark.svg?fit=max\u0026auto=format\u0026n=k6Ti82e3lkhdZ8Co\u0026q=85\u0026s=0cf12755a0e27be7f6002c73ec09db89","href":"https://phone-harness.com/docs"},"favicon":"https://mintcdn.com/phone-harness/k6Ti82e3lkhdZ8Co/images/favicon.svg?fit=max\u0026auto=format\u0026n=k6Ti82e3lkhdZ8Co\u0026q=85\u0026s=bde1fb20f9d05f502adc0283f6b5fb87","api":{"playground":{"display":"interactive","proxy":false},"examples":{"defaults":"required","languages":["bash","python","javascript"],"prefill":false},"url":"full"},"appearance":{"default":"light"},"background":{"color":{"light":"#F6F7F1","dark":"#191C19"}},"navbar":{"links":[{"href":"mailto:support@phone-harness.com","label":"Support"}],"primary":{"type":"button","label":"Open dashboard","href":"https://phone-harness.com/dashboard"}},"footer":{"socials":{"github":"https://github.com/phone-harness"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"phone-harness","hasAudioNarration":false,"actualSubdomain":"phone-harness","customDomains":["phone-harness.com"],"gitSource":{"type":"github","owner":"phone-harness","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af5138079d19ec0020fd786","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"default","tag":"Endpoints","count":20},{"language":"default","tag":"Guides","count":9},{"language":"default","tag":"Account","count":5},{"language":"default","tag":"Sessions","count":5},{"language":"default","tag":"ADB","count":4},{"language":"default","tag":"Viewer","count":3},{"language":"default","tag":"Get started","count":2},{"language":"default","tag":"History","count":2},{"language":"default","tag":"Use cases","count":1},{"language":"default","tag":"Service","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--ph-bg: #f6f7f1;--ph-fg: #20231e;--ph-muted: #72766d;--ph-line: #c7cbc0;--ph-soft: #eceee6;--ph-sans: Arial, Helvetica, sans-serif;--ph-mono: \"SFMono-Regular\", Consolas, \"Liberation Mono\", monospace;--font-inter: var(--ph-sans) !important;--font-jetbrains-mono: var(--ph-mono) !important;--gray-50: 246 247 241;--gray-100: 236 238 230;--gray-200: 229 233 223;--gray-300: 199 203 192;--gray-400: 157 165 152;--gray-500: 114 118 109;--gray-600: 94 100 88;--gray-700: 66 72 62;--gray-800: 37 42 36;--gray-900: 32 35 30;--gray-950: 25 28 25}:root.dark{--ph-bg: #191c19;--ph-fg: #e5e9df;--ph-muted: #9da598;--ph-line: #42483e;--ph-soft: #252a24}html,body{background:var(--ph-bg);color:var(--ph-fg);font-family:var(--ph-sans)!important}h1,h2,h3,h4,h5,h6,button,input,select,textarea{font-family:var(--ph-sans)!important}pre,code,kbd,.font-mono,[data-component-part=\"field-name\"],[data-component-part=\"code-group-tab-content\"]{font-family:var(--ph-mono)!important}#navbar-transition{background:var(--ph-bg)!important;border-bottom:1px solid var(--ph-line);backdrop-filter:none}#navbar .nav-logo{width:224px;height:32px;max-width:100%}#page-title{font-size:26px;font-weight:500;line-height:1.25;letter-spacing:-0.7px;color:var(--ph-fg)}#content-area h2{font-size:20px;font-weight:500;letter-spacing:-0.25px;color:var(--ph-fg)}#content-area h3{font-size:17px;font-weight:500;color:var(--ph-fg)}.prose{--tw-prose-body: var(--ph-fg) !important;--tw-prose-headings: var(--ph-fg) !important;--tw-prose-links: var(--ph-fg) !important;--tw-prose-bold: var(--ph-fg) !important;--tw-prose-code: var(--ph-fg) !important;--tw-prose-counters: var(--ph-muted);--tw-prose-bullets: var(--ph-muted);--tw-prose-hr: var(--ph-line);--tw-prose-th-borders: var(--ph-line);--tw-prose-td-borders: var(--ph-line);font-size:15px;line-height:1.7}#header>.prose{color:var(--ph-muted);font-size:15px}#sidebar-content{font-size:13px}#sidebar-title,#sidebar-content h5{font-family:var(--ph-mono)!important;font-size:10px;font-weight:400;letter-spacing:0.9px;text-transform:uppercase;color:var(--ph-muted)}#sidebar-content a,#sidebar-content button{border-radius:0}#sidebar-content a[aria-current=\"page\"]{background:var(--ph-soft);color:var(--ph-fg);box-shadow:inset 2px 0 var(--ph-fg)}#search-bar-entry{border:1px solid var(--ph-line);border-radius:0;background:transparent;color:var(--ph-muted);box-shadow:none;filter:none;font-size:13px}#search-bar-entry:hover{border-color:var(--ph-fg);background:var(--ph-soft);filter:none}#mobile-nav-content,[id^=\"headlessui-dialog-panel\"]{background:var(--ph-bg)!important;border:1px solid var(--ph-line);border-radius:0}#topbar-cta-button a{min-height:32px;border:1px solid var(--ph-fg);border-radius:0;background:var(--ph-fg);color:var(--ph-bg);font-size:12px}#topbar-cta-button a>span{display:none}#topbar-cta-button a :is(span,svg){color:var(--ph-bg)}#topbar-cta-button a:hover{background:var(--ph-soft)}#topbar-cta-button a:hover :is(span,svg){color:var(--ph-fg)}.code-group,.code-block,.callout,.card,#page-context-menu,#page-context-menu-button,#page-context-menu button,#request-example,#response-example,[data-component-part=\"code-block-root\"],[data-component-part=\"code-group-tab-bar\"],#api-playground-input input,#api-playground-input select,#api-playground-input textarea{border-radius:0!important}.code-group,.code-block,.card,[data-component-part=\"code-group-tab-bar\"]{border-color:var(--ph-line)!important}.code-block-background,[data-component-part=\"code-block-root\"],[data-component-part=\"code-group-tab-bar\"]{--shiki-dark-bg: var(--ph-soft) !important;background-color:var(--ph-soft)!important}:root .code-group [data-component-part=\"code-block-root\"],:root .code-block [data-component-part=\"code-block-root\"]{border-radius:0!important;background-color:var(--ph-soft)!important}.code-group,#page-context-menu button{border-color:var(--ph-line)!important}.code-group{background:var(--ph-soft)!important}.code-block [data-floating-buttons]{background:var(--ph-soft)}.code-block [data-floating-buttons]::before,.code-block [data-floating-buttons]::after{background:none}.code-block [style*=\"--fade-color-light\"]{--fade-color-light: var(--ph-soft) !important;--fade-color-dark: var(--ph-soft) !important}.code-block button,.code-group button{border-radius:0!important;backdrop-filter:none}[id^=\"api-playground-\"] :is(.border-standard,.tryit-button),[id^=\"api-playground-\"]>div{border-radius:0!important}.tryit-button{background:var(--ph-fg)!important;color:var(--ph-bg)!important}.tryit-button svg{background-color:var(--ph-bg)!important}:focus-visible{outline:2px solid var(--ph-fg);outline-offset:3px}:root .code-block-background:focus-visible{outline:2px solid var(--ph-fg)!important;outline-offset:-2px}@media (max-width: 640px){#navbar .nav-logo{width:210px;height:30px}#page-title{font-size:23px}}"}],"page":{"pagePath":"authentication","slug":"/authentication","pageMetadata":{"title":"Authentication","description":"Use an account API key for scripts, agents, and backend integrations.","href":"/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: \"Use an account API key for scripts, agents, and backend integrations.\"\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`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Send your API key in the `,_jsx(_components.code,{children:`Authorization`}),` header on every authenticated request:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,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:`2`,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:` --fail-with-body`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -sS`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.phone-harness.com/me`}),_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:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$PHONE_HARNESS_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`get-your-first-key`,children:`Get your first key`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Accept your Phone Harness invitation and complete account creation.`}),`\n`,_jsx(_components.li,{children:`Sign in with an available GitHub or email method.`}),`\n`,_jsxs(_components.li,{children:[`Open `,_jsx(_components.a,{href:`https://phone-harness.com/dashboard/api-keys`,children:`API keys`}),` in the dashboard.`]}),`\n`,_jsxs(_components.li,{children:[`Select `,_jsx(_components.strong,{children:`Create key`}),`, give it a label, and copy the key.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`The full key is shown once. The key list shows only a display hint and its identifier. If you lose it, create a replacement and revoke the old key.`}),`\n`,_jsx(Heading,{level:`2`,id:`what-a-key-can-access`,children:`What a key can access`}),`\n`,_jsx(_components.p,{children:`A key acts as your account. It can manage your sessions and API keys, inspect your account and history, and operate your phones. Keys are not scoped to individual phones and do not have separate read-only permissions.`}),`\n`,_jsxs(_components.p,{children:[`Another account’s session is treated as missing. The API returns `,_jsx(_components.code,{children:`404`}),` rather than exposing who owns it.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`An API key is a secret. Do not put it in a share URL, a public repository, frontend code, or a screenshot. Use environment variables or your deployment’s secret store.`})}),`\n`,_jsx(Heading,{level:`2`,id:`rotate-and-revoke-keys`,children:`Rotate and revoke keys`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`GET /me/keys`}),` to find a key’s `,_jsx(_components.code,{children:`key_hash`}),`, then send that identifier to `,_jsx(_components.code,{children:`POST /me/keys/revoke`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,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:` --fail-with-body`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -sS`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.phone-harness.com/me/keys/revoke`}),_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:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$PHONE_HARNESS_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_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/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:` '{\"key_hash\":\"REPLACE_WITH_KEY_HASH_FROM_KEY_LIST\"}'`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`For rotation, create and test the replacement first. Revoking a key prevents subsequent authentication with that key; it does not end existing phone sessions. End sessions separately when needed.`}),`\n`,_jsx(Heading,{level:`2`,id:`browser-sign-in`,children:`Browser sign-in`}),`\n`,_jsx(_components.p,{children:`The Phone Harness dashboard uses a Clerk session token with the same bearer header. For server integrations, use a Phone Harness API key instead of copying a short-lived browser token. Authentication does not bypass invite-only account access.`}),`\n`,_jsx(Heading,{level:`2`,id:`read-only-watch-links`,children:`Read-only watch links`}),`\n`,_jsxs(_components.p,{children:[`A session’s `,_jsx(_components.code,{children:`watch_url`}),` contains a limited view grant. It can expose that session’s metadata, snapshots and live video (view only) while the grant and session remain valid. It cannot install apps, send operations, or obtain the interactive owner viewer.`]}),`\n`,_jsx(_components.p,{children:`Treat watch links as private capabilities: anyone holding a valid link can use its granted view access. Never replace its token with your API key.`})]})}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":"Authentication","description":"Use an account API key for scripts, agents, and backend integrations.","href":"/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Get your first key","slug":"get-your-first-key","depth":2,"children":[]},{"title":"What a key can access","slug":"what-a-key-can-access","depth":2,"children":[]},{"title":"Rotate and revoke keys","slug":"rotate-and-revoke-keys","depth":2,"children":[]},{"title":"Browser sign-in","slug":"browser-sign-in","depth":2,"children":[]},{"title":"Read-only watch links","slug":"read-only-watch-links","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"phone-harness","siteName":"phone-harness","title":"Authentication - phone-harness","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-19T03:06:35.923Z","originalFileLocation":"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=\"light\"}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=\"Use an account API key for scripts, agents, and backend integrations.\">\u003cmeta data-mint-head name=\"application-name\" content=\"phone-harness\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/phone-harness/858nNT0arFLNybM8/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/phone-harness/858nNT0arFLNybM8/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/phone-harness/858nNT0arFLNybM8/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/phone-harness/858nNT0arFLNybM8/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/phone-harness/858nNT0arFLNybM8/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/phone-harness/858nNT0arFLNybM8/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/phone-harness/858nNT0arFLNybM8/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/phone-harness/858nNT0arFLNybM8/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/phone-harness/858nNT0arFLNybM8/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - phone-harness\">\u003cmeta data-mint-head property=\"og:description\" content=\"Use an account API key for scripts, agents, and backend integrations.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"phone-harness\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://phone-harness.com/docs/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://phone-harness.mintlify.site/docs/_mintlify/api/og/v2?division=Documentation\u0026amp;title=Authentication\u0026amp;description=Use+an+account+API+key+for+scripts%2C+agents%2C+and+backend+integrations.\u0026amp;theme=99e40ed112e4a20a986a94b3\u0026amp;signature=d91d13ad40b13a10251c5941af516e0ee36e54f90f56db31b53b6f8be9b5e91c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Authentication - phone-harness\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Use an account API key for scripts, agents, and backend integrations.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://phone-harness.mintlify.site/docs/_mintlify/api/og/v2?division=Documentation\u0026amp;title=Authentication\u0026amp;description=Use+an+account+API+key+for+scripts%2C+agents%2C+and+backend+integrations.\u0026amp;theme=99e40ed112e4a20a986a94b3\u0026amp;signature=d91d13ad40b13a10251c5941af516e0ee36e54f90f56db31b53b6f8be9b5e91c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/phone-harness/858nNT0arFLNybM8/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"phone-harness\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#20231E\">\u003clink data-mint-head rel=\"canonical\" href=\"https://phone-harness.com/docs/authentication\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"phone-harness\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"phone-harness\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/authentication.md","siteName":"phone-harness","nav":{"global":null,"groups":[{"group":"Get started","pages":[{"title":"Overview","href":"/introduction"},{"title":"Start your first phone","href":"/quickstart"}]},{"group":"Guides","pages":[{"title":"Limits and credits","href":"/guides/limits-and-credits"},{"title":"Android","href":"/guides/android"},{"title":"iPhone","href":"/guides/iphone"},{"title":"Session lifecycle","href":"/guides/session-lifecycle"},{"title":"Connect with ADB","href":"/guides/connect-adb"},{"title":"Viewer and screenshots","href":"/guides/viewer-and-screenshots"},{"title":"Errors","href":"/guides/errors"},{"title":"MCP server","href":"/guides/mcp-server"},{"title":"OpenClaw","href":"/guides/openclaw"}]},{"group":"Endpoints","pages":[{"group":"Sessions","pages":[{"title":"Create a session","deprecated":null,"version":null,"sidebarTitle":"Create session","openapi":"/openapi.json post /sessions","href":"/api-reference/sessions/create-session"},{"title":"List active sessions","deprecated":null,"version":null,"sidebarTitle":"List sessions","openapi":"/openapi.json get /sessions","href":"/api-reference/sessions/list-sessions"},{"title":"Get a session","deprecated":null,"version":null,"sidebarTitle":"Get session","openapi":"/openapi.json get /sessions/{sid}","href":"/api-reference/sessions/get-session"},{"title":"Recover a create request","deprecated":null,"version":null,"sidebarTitle":"Recover create request","openapi":"/openapi.json get /sessions/requests/{request_key}","href":"/api-reference/sessions/recover-create-request"},{"title":"End a session","deprecated":null,"version":null,"sidebarTitle":"End session","openapi":"/openapi.json delete /sessions/{sid}","href":"/api-reference/sessions/end-session"}]},{"group":"ADB","pages":[{"title":"Enable ADB","deprecated":null,"version":null,"sidebarTitle":"Enable adb","openapi":"/openapi.json post /sessions/{sid}/adb","href":"/api-reference/adb/enable-adb"},{"title":"Get ADB access","deprecated":null,"version":null,"sidebarTitle":"Get adb","openapi":"/openapi.json get /sessions/{sid}/adb","href":"/api-reference/adb/get-adb"},{"title":"Reset the unlock code","deprecated":null,"version":null,"sidebarTitle":"Reset adb","openapi":"/openapi.json post /sessions/{sid}/adb/reset","href":"/api-reference/adb/reset-adb"},{"title":"Revoke ADB access","deprecated":null,"version":null,"sidebarTitle":"Revoke adb","openapi":"/openapi.json delete /sessions/{sid}/adb","href":"/api-reference/adb/revoke-adb"}]},{"group":"Viewer","pages":[{"title":"Get a snapshot","deprecated":null,"version":null,"sidebarTitle":"Get snapshot","openapi":"/openapi.json get /sessions/{sid}/frame.png","href":"/api-reference/phone/get-snapshot"},{"title":"Get the owner viewer","deprecated":null,"version":null,"sidebarTitle":"Get owner viewer","openapi":"/openapi.json get /sessions/{sid}/owner-viewer","href":"/api-reference/phone/get-owner-viewer"},{"title":"Get the live view","deprecated":null,"version":null,"sidebarTitle":"Get viewer","openapi":"/openapi.json get /sessions/{sid}/viewer","href":"/api-reference/phone/get-viewer"}]},{"group":"Account","pages":[{"title":"Get your account","deprecated":null,"version":null,"sidebarTitle":"Get account","openapi":"/openapi.json get /me","href":"/api-reference/account/get-account"},{"title":"Reset your phone","deprecated":null,"version":null,"sidebarTitle":"Reset profile","openapi":"/openapi.json post /me/profile/reset","href":"/api-reference/account/reset-profile"},{"title":"List API keys","deprecated":null,"version":null,"sidebarTitle":"List api keys","openapi":"/openapi.json get /me/keys","href":"/api-reference/account/list-api-keys"},{"title":"Create an API key","deprecated":null,"version":null,"sidebarTitle":"Create api key","openapi":"/openapi.json post /me/keys","href":"/api-reference/account/create-api-key"},{"title":"Revoke an API key","deprecated":null,"version":null,"sidebarTitle":"Revoke api key","openapi":"/openapi.json post /me/keys/revoke","href":"/api-reference/account/revoke-api-key"}]},{"group":"History","pages":[{"title":"List session history","deprecated":null,"version":null,"sidebarTitle":"List history page","openapi":"/openapi.json get /history/page","href":"/api-reference/history/list-history-page"},{"title":"Get recent history","deprecated":null,"version":null,"sidebarTitle":"Get recent history","openapi":"/openapi.json get /history","href":"/api-reference/history/get-recent-history"}]},{"group":"Service","pages":[{"title":"Check API liveness","deprecated":null,"version":null,"sidebarTitle":"Get health","openapi":"/openapi.json get /health","href":"/api-reference/service/get-health"}]}]},{"group":"Use cases","pages":[{"title":"Connect a coding agent","href":"/use-cases/connect-coding-agent"}]}]},"basePath":"","title":"Authentication - phone-harness","deploymentId":"dpl_81ettUQ5G7NASN425B6JKU3FX1Rg","buildId":"dpl_81ettUQ5G7NASN425B6JKU3FX1Rg","dynamics":[],"chunks":[]}