Returns an identity token for one user. Your app sends it with that user’s events in the x-tranthor-identity-token header, or in the identityTokens array of a /batch request. Tranthor checks it the same way as a token you sign yourself with your identity secret.The token is signed with your workspace’s newest active identity secret. Create a secret under Settings > Authentication. Without an active secret, this endpoint answers 409 with code: "no_identity_secret".Authenticate with an Admin API key. A write key or a dashboard session is refused with 401.
ttlSeconds is 60 to 604800 (7 days). The default is 86400 (24 hours).
A userId or audience that would make the token longer than 2048 bytes is refused with 400: longer tokens are not accepted by Tranthor.
audience limits the token to one app ID or origin. It is accepted only from requests that send that x-tranthor-app-id header or Origin.
Call this endpoint from your backend. An Admin API key can change your whole workspace, so never put it in a browser or mobile app. A login service that only needs to vouch for users can sign tokens itself with the identity secret instead.
Authorizations
Authorization
string
header
required
An Admin API key, sent as Authorization: Bearer <key>. Create one in Settings.
Body
application/json
workspaceId
string<uuid>
required
userId
string
required
The user the token vouches for. It becomes the sub claim.
Required string length: 1 - 512
ttlSeconds
integer
default:86400
How long the token is valid, in seconds. Default 24 hours.
Required range: 60 <= x <= 604800
audience
string
Binds the token to one app ID or origin. Public ingestion accepts it only from a request that sends that x-tranthor-app-id or Origin.
Required string length: 1 - 256
Response
Default Response
token
string
required
expiresAt
string<date-time>
required
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Tranthor","colors":{"primary":"#171717","light":"#fafafa","dark":"#fafafa"},"favicon":"https://mintcdn.com/tranthor/-Yh5uWI-NytiSh8c/favicon_1.png?fit=max\u0026auto=format\u0026n=-Yh5uWI-NytiSh8c\u0026q=85\u0026s=8806f36d41ac91210b041fe4920aba33","logo":{"light":"https://mintcdn.com/tranthor/a1TEbaHhGDlIZsN3/logo/logo-black.png?fit=max\u0026auto=format\u0026n=a1TEbaHhGDlIZsN3\u0026q=85\u0026s=0dc8a7d113ea815cf18ebf6de4b7d383","dark":"https://mintlify.s3.us-west-1.amazonaws.com/tranthor/logo/dark.png","href":"https://tranthor.com"},"api":{"playground":{"display":"none"},"mdx":{"server":"https://api.tranthor.com","auth":{"method":"bearer","name":null}}},"navbar":{"links":[{"label":"Community","href":"https://discord.gg/KBveDuFHwk"}],"primary":null},"footer":{"socials":{"twitter":"https://twitter.com/tranthor_com","linkedin":"https://www.linkedin.com/company/tranthor"}},"integrations":{"posthog":{"apiKey":"phc_sFcAYwCG8tzPSecKhv0sTVgmxvSYBRwSdFty0en14I5"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Get Help","href":"https://discord.gg/KBveDuFHwk","icon":"discord"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"tranthor","hasAudioNarration":false,"actualSubdomain":"tranthor","customDomains":["docs.tranthor.com"],"gitSource":{"type":"github","owner":"tranthor-main","repo":"tranthor-main","deployBranch":"main","contentDirectory":"packages/docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b086b3c15c0c13290facb13","clientVersion":"0.0.4336","searchFilterCounts":[{"language":"default","tag":"API Reference","count":62},{"language":"default","tag":"Documentation","count":43},{"language":"default","tag":"Integrations","count":20},{"language":"default","tag":"Journeys","count":13},{"language":"default","tag":"User Guides","count":12},{"language":"default","tag":"Segments","count":11},{"language":"default","tag":"Send events","count":8},{"language":"default","tag":"Resources","count":8},{"language":"default","tag":"Templates","count":6},{"language":"default","tag":"Users","count":5}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"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":"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":"site-roles","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":"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":"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":"turbopuffer-dual-write","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":"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}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/endpoints/sdk-identity/mint-token","slug":"/api-reference/endpoints/sdk-identity/mint-token","pageMetadata":{"title":"Mint an identity token","description":"Get a signed identity token for a user without writing signing code.","openapi":"post /api/admin/sdk-identity/tokens","href":"/api-reference/endpoints/sdk-identity/mint-token"},"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: \"Get a signed identity token for a user without writing signing code.\"\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`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Returns an identity token for one user. Your app sends it with that user’s events in the `,_jsx(_components.code,{children:`x-tranthor-identity-token`}),` header, or in the `,_jsx(_components.code,{children:`identityTokens`}),` array of a `,_jsx(_components.code,{children:`/batch`}),` request. Tranthor checks it the same way as a token you sign yourself with your identity secret.`]}),`\n`,_jsxs(_components.p,{children:[`The token is signed with your workspace’s newest active identity secret. Create a secret under `,_jsx(_components.strong,{children:`Settings > Authentication`}),`. Without an active secret, this endpoint answers `,_jsx(_components.code,{children:`409`}),` with `,_jsx(_components.code,{children:`code: \"no_identity_secret\"`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Authenticate with an `,_jsx(_components.a,{href:`/guide/accessing-admin-api`,children:`Admin API key`}),`. A write key or a dashboard session is refused with `,_jsx(_components.code,{children:`401`}),`.`]}),`\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:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.tranthor.com/api/admin/sdk-identity/tokens\"`}),_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 \u003cADMIN_API_KEY>\"`}),_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:` '{ \"workspaceId\": \"\u003cWORKSPACE_ID>\", \"userId\": \"cus_123\", \"ttlSeconds\": 3600 }'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:`example response`,numberOfLines:`4`,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:`4`,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:` \"token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003csigned identity token>\"`}),_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:` \"expiresAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-11-26T11:00:00.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ttlSeconds`}),` is 60 to 604800 (7 days). The default is 86400 (24 hours).`]}),`\n`,_jsxs(_components.li,{children:[`A `,_jsx(_components.code,{children:`userId`}),` or `,_jsx(_components.code,{children:`audience`}),` that would make the token longer than 2048 bytes is refused with `,_jsx(_components.code,{children:`400`}),`: longer tokens are not accepted by Tranthor.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`audience`}),` limits the token to one app ID or origin. It is accepted only from requests that send that `,_jsx(_components.code,{children:`x-tranthor-app-id`}),` header or `,_jsx(_components.code,{children:`Origin`}),`.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Call this endpoint from your backend. An Admin API key can change your whole workspace, so never put it in a browser or mobile app. A login service that only needs to vouch for users can sign tokens itself with the identity secret instead.`})})]})}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":"Mint an identity token","description":"Get a signed identity token for a user without writing signing code.","openapi":"post /api/admin/sdk-identity/tokens","href":"/api-reference/endpoints/sdk-identity/mint-token"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["SDK identity"],"description":"Get a signed identity token for a user without writing signing code.","requestBody":"1eddd468-035a-4343-877a-14cf8d8e6cfa","security":["75ac67e8-73e6-4df9-a58e-c0b8527fdea7"],"responses":{"200":"d7df2c80-afec-4efd-826b-3d286e0b2dbe","400":"86630f54-b266-4c36-9c4a-df3f37fd38bb","409":"3466a7b8-fec8-4e7e-8305-f94d0d0dadb1"},"method":"post","type":"path","servers":[],"path":"/api/admin/sdk-identity/tokens","baseUrlOptions":["https://api.tranthor.com"],"title":"","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"format":"uuid","type":"string","isRequired":true,"uniqueKey":"workspaceId","typeLabel":"string\u003cuuid>"},"userId":{"minLength":1,"maxLength":512,"description":"The user the token vouches for. It becomes the `sub` claim.","type":"string","isRequired":true,"uniqueKey":"userId","typeLabel":"string"},"ttlSeconds":{"minimum":60,"maximum":604800,"default":86400,"description":"How long the token is valid, in seconds. Default 24 hours.","type":"integer","uniqueKey":"ttlSeconds","typeLabel":"integer"},"audience":{"minLength":1,"maxLength":256,"description":"Binds the token to one app ID or origin. Public ingestion accepts it only from a request that sends that `x-tranthor-app-id` or `Origin`.","type":"string","uniqueKey":"audience","typeLabel":"string"}},"required":["workspaceId","userId"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"workspaceId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","userId":"\u003cstring>","ttlSeconds":86400,"audience":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"d7df2c80-afec-4efd-826b-3d286e0b2dbe":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","isRequired":true,"uniqueKey":"token","typeLabel":"string"},"expiresAt":{"format":"date-time","type":"string","isRequired":true,"uniqueKey":"expiresAt","typeLabel":"string\u003cdate-time>"}},"required":["token","expiresAt"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"token":"\u003cstring>","expiresAt":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"86630f54-b266-4c36-9c4a-df3f37fd38bb":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["message"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"3466a7b8-fec8-4e7e-8305-f94d0d0dadb1":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"code":{"type":"string","enum":["no_identity_secret"],"isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"}},"required":["message","code"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","code":"no_identity_secret"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"75ac67e8-73e6-4df9-a58e-c0b8527fdea7":{"adminApiKey":{"type":"http","scheme":"bearer","description":"An Admin API key, sent as `Authorization: Bearer \u003ckey>`. Create one in Settings.","scopes":[],"schemeName":"adminApiKey"}}},"servers":{},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"An Admin API key, sent as `Authorization: Bearer \u003ckey>`. Create one in Settings.","scopes":[],"schemeName":"adminApiKey"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"An Admin API key, sent as `Authorization: Bearer \u003ckey>`. Create one in Settings.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"adminApiKey","name":"Authorization"}],"title":"adminApiKey"}]},"originalFileLocation":"open-api.json"},"subdomain":"tranthor","siteName":"Tranthor","title":"Mint an identity token - Tranthor","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-26T17:24:23.317Z","originalFileLocation":"api-reference/endpoints/sdk-identity/mint-token.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=\"Get a signed identity token for a user without writing signing code.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Tranthor\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/tranthor/b5bqXbSdsbQFbVHH/_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=\"/mintlify-assets/_mintlify/favicons/tranthor/b5bqXbSdsbQFbVHH/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/tranthor/b5bqXbSdsbQFbVHH/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/tranthor/b5bqXbSdsbQFbVHH/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/tranthor/b5bqXbSdsbQFbVHH/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/tranthor/b5bqXbSdsbQFbVHH/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/tranthor/b5bqXbSdsbQFbVHH/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/tranthor/b5bqXbSdsbQFbVHH/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/tranthor/b5bqXbSdsbQFbVHH/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Mint an identity token - Tranthor\">\u003cmeta data-mint-head property=\"og:description\" content=\"Get a signed identity token for a user without writing signing code.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Tranthor\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.tranthor.com/api-reference/endpoints/sdk-identity/mint-token\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://tranthor.mintlify.site/_mintlify/api/og/v2?division=SDK+identity\u0026amp;title=Mint+an+identity+token\u0026amp;description=Get+a+signed+identity+token+for+a+user+without+writing+signing+code.\u0026amp;theme=b4b510a26a14ef54d4467ab6\u0026amp;signature=f231375837981667cd4988d2ca7feeb3a29bce458f095b2e05455f8318716c3f\">\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=\"Mint an identity token - Tranthor\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Get a signed identity token for a user without writing signing code.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://tranthor.mintlify.site/_mintlify/api/og/v2?division=SDK+identity\u0026amp;title=Mint+an+identity+token\u0026amp;description=Get+a+signed+identity+token+for+a+user+without+writing+signing+code.\u0026amp;theme=b4b510a26a14ef54d4467ab6\u0026amp;signature=f231375837981667cd4988d2ca7feeb3a29bce458f095b2e05455f8318716c3f\">\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=\"/mintlify-assets/_mintlify/favicons/tranthor/b5bqXbSdsbQFbVHH/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Tranthor\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#171717\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.tranthor.com/api-reference/endpoints/sdk-identity/mint-token\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoints/sdk-identity/mint-token.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.tranthor.com/#organization\",\"name\":\"Tranthor\",\"url\":\"https://docs.tranthor.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/tranthor/a1TEbaHhGDlIZsN3/logo/logo-black.png?fit=max\u0026auto=format\u0026n=a1TEbaHhGDlIZsN3\u0026q=85\u0026s=0dc8a7d113ea815cf18ebf6de4b7d383\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.tranthor.com#website\",\"name\":\"Tranthor\",\"url\":\"https://docs.tranthor.com\",\"publisher\":{\"@id\":\"https://docs.tranthor.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.tranthor.com/api-reference/endpoints/sdk-identity/mint-token#webpage\",\"url\":\"https://docs.tranthor.com/api-reference/endpoints/sdk-identity/mint-token\",\"name\":\"Mint an identity token\",\"description\":\"Get a signed identity token for a user without writing signing code.\",\"dateModified\":\"2026-11-26T17:24:23.317Z\",\"isPartOf\":{\"@id\":\"https://docs.tranthor.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.tranthor.com/api-reference/endpoints/sdk-identity/mint-token#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.tranthor.com/api-reference/endpoints/sdk-identity/mint-token#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tranthor\",\"item\":\"https://docs.tranthor.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mint an identity token\",\"item\":\"https://docs.tranthor.com/api-reference/endpoints/sdk-identity/mint-token\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.tranthor.com/api-reference/endpoints/sdk-identity/mint-token#apireference\",\"headline\":\"Mint an identity token\",\"name\":\"Mint an identity token\",\"description\":\"Get a signed identity token for a user without writing signing code.\",\"url\":\"https://docs.tranthor.com/api-reference/endpoints/sdk-identity/mint-token\",\"mainEntityOfPage\":{\"@id\":\"https://docs.tranthor.com/api-reference/endpoints/sdk-identity/mint-token#webpage\"},\"dateModified\":\"2026-11-26T17:24:23.317Z\",\"publisher\":{\"@id\":\"https://docs.tranthor.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.tranthor.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Tranthor\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Tranthor\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/endpoints/sdk-identity/mint-token.md","siteName":"Tranthor","nav":{"global":{"anchors":[{"anchor":"Get Help","href":"https://discord.gg/KBveDuFHwk","icon":"discord"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API overview","href":"/api-reference/introduction"}]},{"group":"Send events","pages":[{"title":"Identify","openapi":"POST /api/public/apps/identify","href":"/api-reference/endpoints/apps/identify"},{"title":"Track","openapi":"POST /api/public/apps/track","href":"/api-reference/endpoints/apps/track"},{"title":"Page","openapi":"POST /api/public/apps/page","href":"/api-reference/endpoints/apps/page"},{"title":"Screen","openapi":"POST /api/public/apps/screen","href":"/api-reference/endpoints/apps/screen"},{"title":"Batch","openapi":"POST /api/public/apps/batch","href":"/api-reference/endpoints/apps/batch"},{"title":"Group","openapi":"post /api/public/apps/group","href":"/api-reference/auto/public-apps/post-apipublicappsgroup"},{"title":"Alias","openapi":"post /api/public/apps/alias","href":"/api-reference/auto/public-apps/post-apipublicappsalias"},{"title":"Segment webhook","openapi":"POST /api/public/webhooks/segment","href":"/api-reference/endpoints/webhooks/segment"}]},{"group":"Templates","pages":[{"title":"List message templates","openapi":"get /api/admin/content/templates","href":"/api-reference/auto/content/get-apiadmincontenttemplates"},{"title":"Create or update a message template","openapi":"put /api/admin/content/templates","href":"/api-reference/auto/content/put-apiadmincontenttemplates"},{"title":"Delete a message template","openapi":"delete /api/admin/content/templates","href":"/api-reference/auto/content/delete-apiadmincontenttemplates"},{"title":"Duplicate a message template","openapi":"post /api/admin/content/templates/duplicate","href":"/api-reference/auto/content/post-apiadmincontenttemplatesduplicate"},{"title":"Render a message template","openapi":"post /api/admin/content/templates/render","href":"/api-reference/auto/content/post-apiadmincontenttemplatesrender"},{"title":"Send a test message","openapi":"post /api/admin/content/templates/test","href":"/api-reference/auto/content/post-apiadmincontenttemplatestest"}]},{"group":"Segments","pages":[{"title":"List segments","openapi":"get /api/admin/segments/","href":"/api-reference/auto/segments/get-apiadminsegments"},{"title":"Get a segment","openapi":"get /api/admin/segments/{segmentId}","href":"/api-reference/auto/segments/get-apiadminsegmentssegmentid"},{"title":"Create or update a segment","openapi":"put /api/admin/segments/","href":"/api-reference/auto/segments/put-apiadminsegments"},{"title":"Delete a segment","openapi":"delete /api/admin/segments/","href":"/api-reference/auto/segments/delete-apiadminsegments"},{"title":"Preview a segment definition","openapi":"post /api/admin/segments/preview","href":"/api-reference/auto/segments/post-apiadminsegmentspreview"},{"title":"List values of an attribute","openapi":"get /api/admin/segments/trait-values","href":"/api-reference/auto/segments/get-apiadminsegmentstrait-values"},{"title":"Get a segment's user count","openapi":"get /api/admin/segments/{segmentId}/user-count","href":"/api-reference/auto/segments/get-apiadminsegmentssegmentiduser-count"},{"title":"Get an immediate user count","openapi":"post /api/admin/segments/{segmentId}/user-count/preview","href":"/api-reference/auto/segments/post-apiadminsegmentssegmentiduser-countpreview"},{"title":"Get targeted and reachable counts","openapi":"get /api/admin/segments/{segmentId}/audience-summary","href":"/api-reference/auto/segments/get-apiadminsegmentssegmentidaudience-summary"},{"title":"Upload a CSV to a manual segment","openapi":"post /api/admin/segments/upload-csv","href":"/api-reference/auto/segments/post-apiadminsegmentsupload-csv"},{"title":"Download segment assignments","openapi":"get /api/admin/segments/download","href":"/api-reference/auto/segments/get-apiadminsegmentsdownload"}]},{"group":"Journeys","pages":[{"title":"List journeys","openapi":"get /api/admin/journeys/","href":"/api-reference/auto/journeys/get-apiadminjourneys"},{"title":"Create or update a journey","openapi":"put /api/admin/journeys/","href":"/api-reference/auto/journeys/put-apiadminjourneys"},{"title":"Delete a journey","openapi":"delete /api/admin/journeys/","href":"/api-reference/auto/journeys/delete-apiadminjourneys"},{"title":"Get a journey's version history","openapi":"get /api/admin/journeys/versions","href":"/api-reference/auto/journeys/get-apiadminjourneysversions"},{"title":"Get journey stats","openapi":"get /api/admin/journeys/stats","href":"/api-reference/auto/journeys/get-apiadminjourneysstats"},{"title":"Get message performance","openapi":"get /api/admin/journeys/message-performance","href":"/api-reference/auto/journeys/get-apiadminjourneysmessage-performance"},{"title":"Get message step stats","openapi":"get /api/admin/journeys/message-stats","href":"/api-reference/auto/journeys/get-apiadminjourneysmessage-stats"},{"title":"Get entry metrics","openapi":"get /api/admin/journeys/entry-metrics","href":"/api-reference/auto/journeys/get-apiadminjourneysentry-metrics"},{"title":"Get experiment stats","openapi":"get /api/admin/journeys/experiment-stats","href":"/api-reference/auto/journeys/get-apiadminjourneysexperiment-stats"},{"title":"Get conversion settings","openapi":"get /api/admin/journeys/conversion-config","href":"/api-reference/auto/journeys/get-apiadminjourneysconversion-config"},{"title":"Set conversion settings","openapi":"put /api/admin/journeys/conversion-config","href":"/api-reference/auto/journeys/put-apiadminjourneysconversion-config"},{"title":"Get conversion and revenue stats","openapi":"get /api/admin/journeys/conversion-stats","href":"/api-reference/auto/journeys/get-apiadminjourneysconversion-stats"},{"title":"Get holdout lift","openapi":"get /api/admin/journeys/conversion-lift","href":"/api-reference/auto/journeys/get-apiadminjourneysconversion-lift"}]},{"group":"Broadcasts","pages":[{"title":"Create and send a broadcast","openapi":"post /api/admin/broadcasts/execute","href":"/api-reference/auto/broadcasts/post-apiadminbroadcastsexecute"}]},{"group":"Users","pages":[{"title":"List users","openapi":"post /api/admin/users/","href":"/api-reference/auto/users/post-apiadminusers"},{"title":"Get a user's profile","openapi":"post /api/admin/users/profile","href":"/api-reference/auto/users/post-apiadminusersprofile"},{"title":"Get a user's subscriptions","openapi":"get /api/admin/users/subscriptions","href":"/api-reference/auto/users/get-apiadminuserssubscriptions"},{"title":"Add or remove a user in a manual segment","openapi":"post /api/admin/users/manual-segment","href":"/api-reference/auto/users/post-apiadminusersmanual-segment"},{"title":"Delete users","openapi":"delete /api/admin/users/","href":"/api-reference/auto/users/delete-apiadminusers"}]},{"group":"User properties","pages":[{"title":"List user properties","openapi":"get /api/admin/user-properties/","href":"/api-reference/auto/user-properties/get-apiadminuser-properties"},{"title":"Create or update a user property","openapi":"put /api/admin/user-properties/","href":"/api-reference/auto/user-properties/put-apiadminuser-properties"},{"title":"Delete a user property","openapi":"delete /api/admin/user-properties/","href":"/api-reference/auto/user-properties/delete-apiadminuser-properties"}]},{"group":"Subscription groups","pages":[{"title":"Create or update a subscription group","openapi":"put /api/admin/subscription-groups/","href":"/api-reference/auto/subscription-groups/put-apiadminsubscription-groups"},{"title":"Delete a subscription group","openapi":"delete /api/admin/subscription-groups/","href":"/api-reference/auto/subscription-groups/delete-apiadminsubscription-groups"},{"title":"Upload a CSV of subscriptions","openapi":"post /api/admin/subscription-groups/upload-csv","href":"/api-reference/auto/subscription-groups/post-apiadminsubscription-groupsupload-csv"},{"title":"Update a user's subscriptions","openapi":"PUT /api/public/subscription-management/user-subscriptions","href":"/api-reference/endpoints/subscription-management/user-subscriptions"}]},{"group":"Events and deliveries","pages":[{"title":"List events","openapi":"get /api/admin/events/","href":"/api-reference/auto/events/get-apiadminevents"},{"title":"List event properties","openapi":"get /api/admin/events/properties","href":"/api-reference/auto/events/get-apiadmineventsproperties"},{"title":"List identify traits","openapi":"get /api/admin/events/traits","href":"/api-reference/auto/events/get-apiadmineventstraits"},{"title":"Search deliveries","openapi":"get /api/admin/deliveries/","href":"/api-reference/auto/deliveries/get-apiadmindeliveries"}]},{"group":"Analytics","pages":[{"title":"List analytics dictionary entries","openapi":"get /api/admin/analytics/dictionary","href":"/api-reference/auto/analytics/get-apiadminanalyticsdictionary"},{"title":"Create or update a dictionary entry","openapi":"post /api/admin/analytics/dictionary","href":"/api-reference/auto/analytics/post-apiadminanalyticsdictionary"},{"title":"Deprecate a dictionary entry","openapi":"post /api/admin/analytics/dictionary/deprecate","href":"/api-reference/auto/analytics/post-apiadminanalyticsdictionarydeprecate"}]},{"group":"Settings","pages":[{"title":"Get default conversion settings","openapi":"get /api/admin/settings/conversion-config","href":"/api-reference/auto/settings/get-apiadminsettingsconversion-config"},{"title":"Set default conversion settings","openapi":"put /api/admin/settings/conversion-config","description":"Set or clear the workspace default conversion config. Pass config=null to clear.","href":"/api-reference/auto/settings/put-apiadminsettingsconversion-config"}]},{"group":"SDK identity","pages":[{"title":"Mint an identity token","openapi":"post /api/admin/sdk-identity/tokens","href":"/api-reference/endpoints/sdk-identity/mint-token"}]}]}]},"basePath":"","title":"Mint an identity token - Tranthor","deploymentId":"dpl_9bQLTw9nc2h9csDGYcKwWenPcQWn","buildId":"dpl_9bQLTw9nc2h9csDGYcKwWenPcQWn","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-D4yvBxwa.js","snippetPresets-CkhhQaIQ.js","utils-XnMGX2lF.js","style-to-object-BY3JEAdk.js","utils-CRXL1dwr.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-DvwRKZnA.js","conditional-requirements-CFM0id0Q.js","cloneDeep-DYtgUc7n.js","_Uint8Array-D8z7zjjJ.js","isObject-FP1Yky1u.js","ApiExamples-RYQSJVS4.js","usePlaygroundInputsStore-k_R_BTDL.js","shallow-BwVhzryZ.js","isEqual-Cx5TQjMc.js","CodeSnippets-BDe2dS5N.js","CodeSnippet-C1QlaNYl.js","use-playground-group-access-DyQ_1IIe.js","Page-DQd9HN9r.js","api-description-markdown-BpDftTKT.js","DynamicMarkdown-CZT_WAnN.js","SectionHeading-K1iuDm9j.js","MethodPill-Dx3JIwHJ.js","getPastedJson-buPTdYs_.js","Check2Icon-DmMrzBYX.js","axios-CsQoIw0U.js","Markdown-erv2ryQz.js","AssistantPageLink-DJ01X1Sn.js","dist-D9mz3EIS.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}