Exchange a valid Grantex grant token for a stored upstream service credential.
Endpoint
POST /v1/vault/credentials/exchange
Authentication
Requires a Grantex grant token (not an API key) in the Authorization header. This is a public endpoint — no developer API key is needed.The grant token must also carry the explicit, exactly-matched exchange scope for the requested service:
vault:<service>:exchange (for example vault:github:exchange)
Rollout note (2026-09-13, security sweep). Releasing the raw upstream token is strictly more powerful than a <service>:read grant, so exchange no longer accepts wildcard or read-style scopes (*, <service>:*, <service>:read, <service>:credentials:read, vault:<service>:*, vault:<service>:read, vault:credentials:exchange). Grants issued with only those scopes will receive 403 FORBIDDEN from this endpoint after the rollout; re-issue them with vault:<service>:exchange. In addition, key-bound grant tokens (those carrying cnf.jkt) must now be presented with a DPoP proof (Authorization: DPoP <grant_token> plus a DPoP header whose htu is this endpoint and whose ath hashes the token); a bare Bearer presentation of a key-bound token is rejected with 401.
Request Headers
Header
Value
Authorization
Bearer <grant_token>
Content-Type
application/json
Request Body
Field
Type
Required
Description
service
string
Yes
The service whose credential to retrieve (e.g. "github", "slack")
delivery
string
No
token (the default) returns the credential. reference returns a short-lived credential reference instead; the relying party that holds the developer API key (for example @grantex/gateway with credentialReference: on) redeems it with Resolve Reference and injects the credential upstream, so the agent never holds the secret. Needs VAULT_CREDENTIAL_REFERENCES_ENABLED=true on the auth service; otherwise refused with 400 CREDENTIAL_REFERENCE_DISABLED
No accessToken is returned. The reference is bound to the grant that obtained it,
expires after VAULT_CREDENTIAL_REFERENCE_TTL_SECONDS (300 by default), never later than the
grant token that obtained it, and is refused once the grant is revoked, stopped or expired. The agent presents it to the gateway as the
Grantex-Credential-Ref request header.
Response Fields
Field
Type
Description
accessToken
string
The decrypted upstream access token
service
string
Service identifier
credentialType
string
Credential type (e.g. "oauth2")
tokenExpiresAt
string | null
ISO-8601 token expiry, or null
metadata
object
Arbitrary metadata stored with the credential
This endpoint returns the raw access token. The grant token’s sub (principal), dev (developer), and scp (scopes) claims are enforced before decrypting a credential. Keep grant scopes and expiry narrow.
Rate Limits
This endpoint is limited to 20 requests per minute per grant token.
Error Responses
Status
Code
Description
400
BAD_REQUEST
Missing service field, or delivery is neither token nor reference
400
CREDENTIAL_REFERENCE_DISABLED
delivery: "reference" requested but references are not enabled on this auth service
401
UNAUTHORIZED
Missing, invalid, or expired grant token
403
FORBIDDEN
Grant token does not include a service-matching credential scope
404
NOT_FOUND
No credential found for this principal and service
How It Works
The agent presents its Grantex grant token.
The server verifies the JWT signature and extracts the sub (principal ID), dev (developer ID), and scp (scopes) claims.
The requested service must match one of the token credential scopes listed above.
The server looks up the vault credential matching (developerId, principalId, service).
If found, the encrypted access token is decrypted and returned.
This allows agents to access upstream services without ever seeing the raw credentials at configuration time — credentials are stored once by the developer and retrieved at runtime by authorized agents.
SDK Examples
import Grantex from '@grantex/sdk';const grantex = new Grantex({ apiKey: 'gx_...' });// The agent calls this with its grant tokenconst cred = await grantex.vault.exchange({ grantToken: 'eyJhbGciOiJSUzI1NiIs...', service: 'github',});console.log(cred.accessToken); // "ghp_xxxxxxxxxxxx"
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Grantex","description":"Documentation and API reference for Grantex AI agent authorization, delegated OAuth grants, agent identity, scoped permissions, MCP authorization, verification, and audit. Grantex is owned by Orchestrum Technologies LLP; inventor and owner: Sanjeev Kumar.","colors":{"primary":"#3fb950","light":"#58a6ff","dark":"#2ea043"},"logo":{"light":"https://mintcdn.com/grantex/fh2nVWzV0WTpAhmk/logo/light.svg?fit=max\u0026auto=format\u0026n=fh2nVWzV0WTpAhmk\u0026q=85\u0026s=45b5032cb19c05941960c4bb4239c8cd","dark":"https://mintcdn.com/grantex/fh2nVWzV0WTpAhmk/logo/dark.svg?fit=max\u0026auto=format\u0026n=fh2nVWzV0WTpAhmk\u0026q=85\u0026s=4f8e48fcb123c40e9a32121a5b6e542a"},"favicon":"https://mintcdn.com/grantex/fjShexQIs6R8ZYjW/favicon.svg?fit=max\u0026auto=format\u0026n=fjShexQIs6R8ZYjW\u0026q=85\u0026s=7d1fea44a19ae98fb8b6d9c6732dd38a","navbar":{"links":[{"href":"https://github.com/mishrasanjeev/grantex","type":"github"}]},"search":{"prompt":"Search Grantex docs..."},"seo":{"metatags":{"robots":"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1","og:site_name":"Grantex Documentation","twitter:card":"summary_large_image","twitter:site":"@grantex_dev"},"indexing":"navigable"},"metadata":{"timestamp":true},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"grantex","hasAudioNarration":false,"actualSubdomain":"grantex","customDomains":["docs.grantex.dev"],"gitSource":{"type":"github","owner":"mishrasanjeev","repo":"grantex","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6af16dff2a14eef4e6fd4024","clientVersion":"0.0.4205","searchFilterCounts":[{"language":"default","tag":"API Reference","count":155},{"language":"default","tag":"Documentation","count":141},{"language":"default","tag":"Resources","count":60},{"language":"default","tag":"Guides","count":41},{"language":"default","tag":"Integrations","count":31},{"language":"default","tag":"Python SDK","count":27},{"language":"default","tag":"TypeScript SDK","count":27},{"language":"default","tag":"Go SDK","count":26},{"language":"default","tag":"Blog","count":25},{"language":"default","tag":"Posts","count":25}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"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":"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":[],"page":{"pagePath":"api-reference/vault/exchange","slug":"/api-reference/vault/exchange","pageMetadata":{"title":"Exchange Grant Token for Service Credential","sidebarTitle":"Exchange Credential","description":"Exchange a valid Grantex grant token for a stored upstream service credential.","href":"/api-reference/vault/exchange"},"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 a valid Grantex grant token for a stored upstream service credential.\"\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`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`endpoint`,children:`Endpoint`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST /v1/vault/credentials/exchange`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsxs(_components.p,{children:[`Requires a `,_jsx(_components.strong,{children:`Grantex grant token`}),` (not an API key) in the `,_jsx(_components.code,{children:`Authorization`}),` header. This is a public endpoint — no developer API key is needed.`]}),`\n`,_jsx(_components.p,{children:`The grant token must also carry the explicit, exactly-matched exchange scope for the requested service:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`vault:\u003cservice>:exchange`}),` (for example `,_jsx(_components.code,{children:`vault:github:exchange`}),`)`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Rollout note (2026-09-13, security sweep).`}),` Releasing the raw upstream token is strictly more powerful than a `,_jsx(_components.code,{children:`\u003cservice>:read`}),` grant, so exchange no longer accepts wildcard or read-style scopes (`,_jsx(_components.code,{children:`*`}),`, `,_jsx(_components.code,{children:`\u003cservice>:*`}),`, `,_jsx(_components.code,{children:`\u003cservice>:read`}),`, `,_jsx(_components.code,{children:`\u003cservice>:credentials:read`}),`, `,_jsx(_components.code,{children:`vault:\u003cservice>:*`}),`, `,_jsx(_components.code,{children:`vault:\u003cservice>:read`}),`, `,_jsx(_components.code,{children:`vault:credentials:exchange`}),`). Grants issued with only those scopes will receive `,_jsx(_components.code,{children:`403 FORBIDDEN`}),` from this endpoint after the rollout; re-issue them with `,_jsx(_components.code,{children:`vault:\u003cservice>:exchange`}),`. In addition, key-bound grant tokens (those carrying `,_jsx(_components.code,{children:`cnf.jkt`}),`) must now be presented with a `,_jsx(_components.code,{children:`DPoP`}),` proof (`,_jsx(_components.code,{children:`Authorization: DPoP \u003cgrant_token>`}),` plus a `,_jsx(_components.code,{children:`DPoP`}),` header whose `,_jsx(_components.code,{children:`htu`}),` is this endpoint and whose `,_jsx(_components.code,{children:`ath`}),` hashes the token); a bare `,_jsx(_components.code,{children:`Bearer`}),` presentation of a key-bound token is rejected with `,_jsx(_components.code,{children:`401`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-headers`,children:`Request Headers`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Header`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Authorization`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Bearer \u003cgrant_token>`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Content-Type`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`application/json`})})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request Body`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`service`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`The service whose credential to retrieve (e.g. `,_jsx(_components.code,{children:`\"github\"`}),`, `,_jsx(_components.code,{children:`\"slack\"`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`delivery`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`token`}),` (the default) returns the credential. `,_jsx(_components.code,{children:`reference`}),` returns a short-lived credential reference instead; the relying party that holds the developer API key (for example `,_jsx(_components.code,{children:`@grantex/gateway`}),` with `,_jsx(_components.code,{children:`credentialReference: on`}),`) redeems it with `,_jsx(_components.a,{href:`/api-reference/vault/resolve`,children:`Resolve Reference`}),` and injects the credential upstream, so the agent never holds the secret. Needs `,_jsx(_components.code,{children:`VAULT_CREDENTIAL_REFERENCES_ENABLED=true`}),` on the auth service; otherwise refused with `,_jsx(_components.code,{children:`400 CREDENTIAL_REFERENCE_DISABLED`})]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example-request`,children:`Example Request`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,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:`6`,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.grantex.dev/v1/vault/credentials/exchange`}),_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 eyJhbGciOiJSUzI1NiIs...\"`}),_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:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"service\": \"github\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`response-—-200-ok`,children:`Response — 200 OK`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,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:`7`,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:` \"accessToken\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ghp_xxxxxxxxxxxx\"`}),_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:` \"service\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"github\"`}),_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:` \"credentialType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"oauth2\"`}),_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:` \"tokenExpiresAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-04-06T12:00:00.000Z\"`}),_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:` \"metadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"scopes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"repo\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"read:org\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`2`,id:`response-—-200-ok-delivery-reference`,children:[`Response — 200 OK (`,_jsx(_components.code,{children:`delivery: \"reference\"`}),`)`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,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:`8`,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:` \"credentialRef\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vcr_01J9ZK3X6Q0Z6W7F0X2Y1V8K3M\"`}),_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:` \"service\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"github\"`}),_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:` \"credentialType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"oauth2\"`}),_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:` \"tokenExpiresAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-04-06T12:00:00.000Z\"`}),_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:` \"metadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"scopes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"repo\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"read:org\"`}),_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:` \"referenceExpiresAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-04-06T09:05:00.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`No `,_jsx(_components.code,{children:`accessToken`}),` is returned. The reference is bound to the grant that obtained it,\nexpires after `,_jsx(_components.code,{children:`VAULT_CREDENTIAL_REFERENCE_TTL_SECONDS`}),` (300 by default), never later than the\ngrant token that obtained it, and is refused once the grant is revoked, stopped or expired. The agent presents it to the gateway as the\n`,_jsx(_components.code,{children:`Grantex-Credential-Ref`}),` request header.`]}),`\n`,_jsx(Heading,{level:`2`,id:`response-fields`,children:`Response Fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`accessToken`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`The decrypted upstream access token`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`service`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`Service identifier`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`credentialType`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{children:[`Credential type (e.g. `,_jsx(_components.code,{children:`\"oauth2\"`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tokenExpiresAt`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string | null`})}),_jsxs(_components.td,{children:[`ISO-8601 token expiry, or `,_jsx(_components.code,{children:`null`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`metadata`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`object`})}),_jsx(_components.td,{children:`Arbitrary metadata stored with the credential`})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`This endpoint returns the raw access token. The grant token’s `,_jsx(_components.code,{children:`sub`}),` (principal), `,_jsx(_components.code,{children:`dev`}),` (developer), and `,_jsx(_components.code,{children:`scp`}),` (scopes) claims are enforced before decrypting a credential. Keep grant scopes and expiry narrow.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`rate-limits`,children:`Rate Limits`}),`\n`,_jsxs(_components.p,{children:[`This endpoint is limited to `,_jsx(_components.strong,{children:`20 requests per minute`}),` per grant token.`]}),`\n`,_jsx(Heading,{level:`2`,id:`error-responses`,children:`Error Responses`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`BAD_REQUEST`})}),_jsxs(_components.td,{children:[`Missing `,_jsx(_components.code,{children:`service`}),` field, or `,_jsx(_components.code,{children:`delivery`}),` is neither `,_jsx(_components.code,{children:`token`}),` nor `,_jsx(_components.code,{children:`reference`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`CREDENTIAL_REFERENCE_DISABLED`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`delivery: \"reference\"`}),` requested but references are not enabled on this auth service`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`UNAUTHORIZED`})}),_jsx(_components.td,{children:`Missing, invalid, or expired grant token`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`FORBIDDEN`})}),_jsx(_components.td,{children:`Grant token does not include a service-matching credential scope`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`NOT_FOUND`})}),_jsx(_components.td,{children:`No credential found for this principal and service`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How It Works`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`The agent presents its Grantex grant token.`}),`\n`,_jsxs(_components.li,{children:[`The server verifies the JWT signature and extracts the `,_jsx(_components.code,{children:`sub`}),` (principal ID), `,_jsx(_components.code,{children:`dev`}),` (developer ID), and `,_jsx(_components.code,{children:`scp`}),` (scopes) claims.`]}),`\n`,_jsxs(_components.li,{children:[`The requested `,_jsx(_components.code,{children:`service`}),` must match one of the token credential scopes listed above.`]}),`\n`,_jsxs(_components.li,{children:[`The server looks up the vault credential matching `,_jsx(_components.code,{children:`(developerId, principalId, service)`}),`.`]}),`\n`,_jsx(_components.li,{children:`If found, the encrypted access token is decrypted and returned.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`This allows agents to access upstream services without ever seeing the raw credentials at configuration time — credentials are stored once by the developer and retrieved at runtime by authorized agents.`}),`\n`,_jsx(Heading,{level:`2`,id:`sdk-examples`,children:`SDK Examples`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`10`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Grantex`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@grantex/sdk'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` grantex`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Grantex`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'gx_...'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// The agent calls this with its grant token`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` cred`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` grantex`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`vault`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`exchange`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` grantToken:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'eyJhbGciOiJSUzI1NiIs...'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` service:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'github'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`cred`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`accessToken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// \"ghp_xxxxxxxxxxxx\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`9`,language:`python`,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:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` grantex `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Grantex`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`grantex `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Grantex(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gx_...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`cred `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` grantex.vault.exchange(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` grant_token`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"eyJhbGciOiJSUzI1NiIs...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` service`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"github\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(cred.access_token) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# \"ghp_xxxxxxxxxxxx\"`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`ownership`,children:`Ownership`}),`\n`,_jsxs(_components.p,{children:[`Grantex is owned by Orchestrum Technologies LLP. Inventor and owner: Sanjeev Kumar. Ownership contact: `,_jsx(_components.a,{href:`mailto:sanjeev@orchestrum.in`,children:`sanjeev@orchestrum.in`}),` or `,_jsx(_components.a,{href:`mailto:mishra.sanjeev@gmail.com`,children:`mishra.sanjeev@gmail.com`}),`.`]})]})}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":"Exchange Grant Token for Service Credential","sidebarTitle":"Exchange Credential","description":"Exchange a valid Grantex grant token for a stored upstream service credential.","href":"/api-reference/vault/exchange"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Endpoint","slug":"endpoint","depth":2,"children":[]},{"title":"Authentication","slug":"authentication","depth":2,"children":[]},{"title":"Request Headers","slug":"request-headers","depth":2,"children":[]},{"title":"Request Body","slug":"request-body","depth":2,"children":[]},{"title":"Example Request","slug":"example-request","depth":2,"children":[]},{"title":"Response — 200 OK","slug":"response-—-200-ok","depth":2,"children":[]},{"title":"Response — 200 OK (delivery: \"reference\")","slug":"response-—-200-ok-delivery-reference","depth":2,"children":[]},{"title":"Response Fields","slug":"response-fields","depth":2,"children":[]},{"title":"Rate Limits","slug":"rate-limits","depth":2,"children":[]},{"title":"Error Responses","slug":"error-responses","depth":2,"children":[]},{"title":"How It Works","slug":"how-it-works","depth":2,"children":[]},{"title":"SDK Examples","slug":"sdk-examples","depth":2,"children":[]},{"title":"Ownership","slug":"ownership","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"grantex","siteName":"Grantex","title":"Exchange Grant Token for Service Credential - Grantex","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-02T07:56:52.701Z","gitLastModified":"2026-10-02T07:56:30.000Z","originalFileLocation":"api-reference/vault/exchange.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 a valid Grantex grant token for a stored upstream service credential.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Grantex\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/grantex/8bJAlEutDRbcOOje/_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/grantex/8bJAlEutDRbcOOje/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/grantex/8bJAlEutDRbcOOje/_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/grantex/8bJAlEutDRbcOOje/_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/grantex/8bJAlEutDRbcOOje/_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/grantex/8bJAlEutDRbcOOje/_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/grantex/8bJAlEutDRbcOOje/_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/grantex/8bJAlEutDRbcOOje/_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/grantex/8bJAlEutDRbcOOje/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Exchange Grant Token for Service Credential - Grantex\">\u003cmeta data-mint-head property=\"og:description\" content=\"Exchange a valid Grantex grant token for a stored upstream service credential.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Grantex Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.grantex.dev/api-reference/vault/exchange\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://grantex.mintlify.site/_mintlify/api/og/v2?division=Vault\u0026amp;title=Exchange+Grant+Token+for+Service+Credential\u0026amp;description=Exchange+a+valid+Grantex+grant+token+for+a+stored+upstream+service+credential.\u0026amp;theme=615165a2998a6d8eb9253191\u0026amp;signature=2ec9312588087e9af8e57802fcceda1ed58c1d53c6d0075e034bcc7eb3960136\">\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=\"Exchange Grant Token for Service Credential - Grantex\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Exchange a valid Grantex grant token for a stored upstream service credential.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://grantex.mintlify.site/_mintlify/api/og/v2?division=Vault\u0026amp;title=Exchange+Grant+Token+for+Service+Credential\u0026amp;description=Exchange+a+valid+Grantex+grant+token+for+a+stored+upstream+service+credential.\u0026amp;theme=615165a2998a6d8eb9253191\u0026amp;signature=2ec9312588087e9af8e57802fcceda1ed58c1d53c6d0075e034bcc7eb3960136\">\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/grantex/8bJAlEutDRbcOOje/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Grantex\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3fb950\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.grantex.dev/api-reference/vault/exchange\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/vault/exchange.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.grantex.dev/#organization\",\"name\":\"Grantex\",\"url\":\"https://docs.grantex.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/grantex/fh2nVWzV0WTpAhmk/logo/light.svg?fit=max\u0026auto=format\u0026n=fh2nVWzV0WTpAhmk\u0026q=85\u0026s=45b5032cb19c05941960c4bb4239c8cd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.grantex.dev#website\",\"name\":\"Grantex\",\"url\":\"https://docs.grantex.dev\",\"publisher\":{\"@id\":\"https://docs.grantex.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.grantex.dev/api-reference/vault/exchange#webpage\",\"url\":\"https://docs.grantex.dev/api-reference/vault/exchange\",\"name\":\"Exchange Grant Token for Service Credential\",\"description\":\"Exchange a valid Grantex grant token for a stored upstream service credential.\",\"dateModified\":\"2026-10-02T07:56:30.000Z\",\"isPartOf\":{\"@id\":\"https://docs.grantex.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.grantex.dev/api-reference/vault/exchange#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.grantex.dev/api-reference/vault/exchange#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Vault\",\"item\":\"https://docs.grantex.dev/api-reference/vault/store\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Exchange Grant Token for Service Credential\",\"item\":\"https://docs.grantex.dev/api-reference/vault/exchange\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.grantex.dev/api-reference/vault/exchange#article\",\"headline\":\"Exchange Grant Token for Service Credential\",\"name\":\"Exchange Grant Token for Service Credential\",\"description\":\"Exchange a valid Grantex grant token for a stored upstream service credential.\",\"url\":\"https://docs.grantex.dev/api-reference/vault/exchange\",\"mainEntityOfPage\":{\"@id\":\"https://docs.grantex.dev/api-reference/vault/exchange#webpage\"},\"dateModified\":\"2026-10-02T07:56:30.000Z\",\"publisher\":{\"@id\":\"https://docs.grantex.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.grantex.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Grantex\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Grantex\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/vault/exchange.md","siteName":"Grantex","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"TypeScript SDK","pages":[{"title":"TypeScript SDK","href":"/sdks/typescript/overview"}]},{"tab":"Python SDK","pages":[{"title":"Python SDK","href":"/sdks/python/overview"}]},{"tab":"Go SDK","pages":[{"title":"Go SDK","href":"/sdks/go/overview"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/overview"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"group":"System","pages":[{"openapi":"get /health","title":null,"href":"/api-reference/system/health-check"},{"openapi":"get /.well-known/jwks.json","title":null,"href":"/api-reference/system/json-web-key-set"},{"openapi":"get /dashboard","title":null,"href":"/api-reference/system/developer-dashboard"},{"openapi":"get /dashboard/principal","title":null,"href":"/api-reference/system/principal-permissions-dashboard"}]},{"group":"Authentication","pages":[{"openapi":"post /v1/signup","title":null,"href":"/api-reference/authentication/register-a-new-developer-account"},{"openapi":"get /v1/me","title":null,"href":"/api-reference/authentication/get-current-developer-profile"},{"openapi":"post /v1/keys/rotate","title":null,"href":"/api-reference/authentication/rotate-api-key"},{"openapi":"post /v1/signup/verify","title":null,"href":"/api-reference/signup/send-verification"},{"openapi":"get /v1/signup/verify/{token}","title":null,"href":"/api-reference/signup/verify-token"}]},{"group":"Agents","pages":[{"openapi":"post /v1/agents","title":null,"href":"/api-reference/agents/register-a-new-agent"},{"openapi":"get /v1/agents","title":null,"href":"/api-reference/agents/list-all-agents"},{"openapi":"get /v1/agents/{id}","title":null,"href":"/api-reference/agents/get-agent-by-id"},{"openapi":"patch /v1/agents/{id}","title":null,"href":"/api-reference/agents/update-an-agent"},{"openapi":"delete /v1/agents/{id}","title":null,"href":"/api-reference/agents/delete-an-agent"}]},{"group":"Authorization","pages":[{"openapi":"post /v1/authorize","title":null,"href":"/api-reference/authorization/create-an-authorization-request"},{"openapi":"post /v1/authorize/{id}/approve","title":null,"href":"/api-reference/authorization/approve-an-authorization-request"},{"openapi":"post /v1/authorize/{id}/deny","title":null,"href":"/api-reference/authorization/deny-an-authorization-request"}]},{"group":"Tokens","pages":[{"openapi":"post /v1/token","title":null,"href":"/api-reference/tokens/exchange-authorization-code-for-grant-token"},{"openapi":"post /v1/token/refresh","title":null,"href":"/api-reference/tokens/refresh-a-grant-token"},{"openapi":"post /v1/tokens/verify","title":null,"href":"/api-reference/tokens/verify-a-grant-token-online"},{"openapi":"post /v1/tokens/revoke","title":null,"href":"/api-reference/tokens/revoke-a-grant-token"}]},{"group":"Events","pages":[{"openapi":"get /v1/events/stream","title":null,"href":"/api-reference/events/stream"},{"openapi":"get /v1/events/ws","title":null,"href":"/api-reference/events/websocket"}]},{"group":"Grants","pages":[{"openapi":"get /v1/grants","title":null,"href":"/api-reference/grants/list-grants"},{"openapi":"get /v1/grants/{id}","title":null,"href":"/api-reference/grants/get-grant-by-id"},{"openapi":"delete /v1/grants/{id}","title":null,"href":"/api-reference/grants/revoke-a-grant"},{"openapi":"post /v1/grants/verify","title":null,"href":"/api-reference/grants/verify-a-grant-tokens-revocation-status"},{"openapi":"post /v1/grants/delegate","title":null,"href":"/api-reference/grants/delegate-a-grant-to-a-sub-agent"}]},{"group":"Audit","pages":[{"openapi":"post /v1/audit/log","title":null,"href":"/api-reference/audit/log-an-audit-entry"},{"openapi":"get /v1/audit/entries","title":null,"href":"/api-reference/audit/list-audit-entries"},{"openapi":"get /v1/audit/{id}","title":null,"href":"/api-reference/audit/get-audit-entry-by-id"}]},{"group":"Policies","pages":[{"openapi":"post /v1/policies","title":null,"href":"/api-reference/policies/create-an-access-policy"},{"openapi":"get /v1/policies","title":null,"href":"/api-reference/policies/list-access-policies"},{"openapi":"get /v1/policies/{id}","title":null,"href":"/api-reference/policies/get-policy-by-id"},{"openapi":"patch /v1/policies/{id}","title":null,"href":"/api-reference/policies/update-a-policy"},{"openapi":"delete /v1/policies/{id}","title":null,"href":"/api-reference/policies/delete-a-policy"},{"openapi":"post /v1/policies/sync","title":null,"href":"/api-reference/policies/sync-policy-bundle"},{"openapi":"get /v1/policies/bundles","title":null,"href":"/api-reference/policies/list-bundles"},{"openapi":"get /v1/policies/bundles/active","title":null,"href":"/api-reference/policies/active-bundle"},{"openapi":"post /v1/policies/sync/webhook","title":null,"href":"/api-reference/policies/sync-webhook"}]},{"group":"Webhooks","pages":[{"openapi":"post /v1/webhooks","title":null,"href":"/api-reference/webhooks/register-a-webhook"},{"openapi":"get /v1/webhooks","title":null,"href":"/api-reference/webhooks/list-webhooks"},{"openapi":"delete /v1/webhooks/{id}","title":null,"href":"/api-reference/webhooks/delete-a-webhook"}]},{"group":"Billing","pages":[{"openapi":"get /v1/billing/subscription","title":null,"href":"/api-reference/billing/get-current-subscription"},{"openapi":"post /v1/billing/checkout","title":null,"href":"/api-reference/billing/create-a-stripe-checkout-session"},{"openapi":"post /v1/billing/portal","title":null,"href":"/api-reference/billing/create-a-stripe-billing-portal-session"},{"openapi":"post /v1/billing/webhook","title":null,"href":"/api-reference/billing/stripe-webhook-handler"}]},{"group":"Anomalies","pages":[{"openapi":"post /v1/anomalies/detect","title":null,"href":"/api-reference/anomalies/run-anomaly-detection"},{"openapi":"get /v1/irregularities/response-policy","title":null,"href":"/api-reference/anomalies/response-policy"},{"openapi":"get /v1/anomalies","title":null,"href":"/api-reference/anomalies/list-detected-anomalies"},{"openapi":"patch /v1/anomalies/{id}/acknowledge","title":null,"href":"/api-reference/anomalies/acknowledge-an-anomaly"},{"openapi":"get /v1/anomaly/alerts","title":null,"href":"/api-reference/anomalies/list-alerts"},{"openapi":"post /v1/anomaly/alerts/{alertId}/acknowledge","title":null,"href":"/api-reference/anomalies/acknowledge-alert"},{"openapi":"post /v1/anomaly/alerts/{alertId}/resolve","title":null,"href":"/api-reference/anomalies/resolve-alert"},{"openapi":"get /v1/anomaly/metrics","title":null,"href":"/api-reference/anomalies/get-metrics"},{"openapi":"get /v1/anomaly/rules","title":null,"href":"/api-reference/anomalies/list-rules"},{"openapi":"post /v1/anomaly/rules","title":null,"href":"/api-reference/anomalies/create-rule"},{"openapi":"delete /v1/anomaly/rules/{ruleId}","title":null,"href":"/api-reference/anomalies/delete-rule"},{"openapi":"get /v1/anomaly/channels","title":null,"href":"/api-reference/anomalies/list-channels"},{"openapi":"post /v1/anomaly/channels","title":null,"href":"/api-reference/anomalies/create-channel"},{"openapi":"delete /v1/anomaly/channels/{channelId}","title":null,"href":"/api-reference/anomalies/delete-channel"}]},{"group":"Compliance","pages":[{"openapi":"get /v1/compliance/summary","title":null,"href":"/api-reference/compliance/get-compliance-summary"},{"openapi":"get /v1/compliance/export/grants","title":null,"href":"/api-reference/compliance/export-grants-for-compliance"},{"openapi":"get /v1/compliance/export/audit","title":null,"href":"/api-reference/compliance/export-audit-entries-for-compliance"},{"openapi":"get /v1/compliance/evidence-pack","title":null,"href":"/api-reference/compliance/generate-compliance-evidence-pack"}]},{"group":"SCIM","pages":[{"openapi":"post /v1/scim/tokens","title":null,"href":"/api-reference/scim/create-a-scim-provisioning-token"},{"openapi":"get /v1/scim/tokens","title":null,"href":"/api-reference/scim/list-scim-tokens"},{"openapi":"delete /v1/scim/tokens/{id}","title":null,"href":"/api-reference/scim/delete-a-scim-token"},{"openapi":"get /scim/v2/ServiceProviderConfig","title":null,"href":"/api-reference/scim/scim-service-provider-configuration"},{"openapi":"get /scim/v2/Users","title":null,"href":"/api-reference/scim/list-scim-users"},{"openapi":"post /scim/v2/Users","title":null,"href":"/api-reference/scim/create-a-scim-user"},{"openapi":"get /scim/v2/Users/{id}","title":null,"href":"/api-reference/scim/get-scim-user-by-id"},{"openapi":"put /scim/v2/Users/{id}","title":null,"href":"/api-reference/scim/replace-a-scim-user"},{"openapi":"patch /scim/v2/Users/{id}","title":null,"href":"/api-reference/scim/patch-a-scim-user"},{"openapi":"delete /scim/v2/Users/{id}","title":null,"href":"/api-reference/scim/delete-a-scim-user"}]},{"group":"SSO","pages":[{"openapi":"post /v1/sso/config","title":null,"href":"/api-reference/sso/configure-oidc-sso"},{"openapi":"get /v1/sso/config","title":null,"href":"/api-reference/sso/get-sso-configuration"},{"openapi":"delete /v1/sso/config","title":null,"href":"/api-reference/sso/remove-sso-configuration"},{"openapi":"get /sso/login","title":null,"href":"/api-reference/sso/initiate-sso-login"},{"openapi":"get /sso/callback","title":null,"href":"/api-reference/sso/sso-callback"},{"openapi":"post /v1/sso/connections","title":null,"href":"/api-reference/sso/create-sso-connection"},{"openapi":"get /v1/sso/connections","title":null,"href":"/api-reference/sso/list-sso-connections"},{"openapi":"patch /v1/sso/connections/{id}","title":null,"href":"/api-reference/sso/update-sso-connection"},{"openapi":"delete /v1/sso/connections/{id}","title":null,"href":"/api-reference/sso/delete-sso-connection"},{"openapi":"post /v1/sso/connections/{id}/test","title":null,"href":"/api-reference/sso/test-sso-connection"},{"openapi":"post /v1/sso/enforce","title":null,"href":"/api-reference/sso/set-sso-enforcement"},{"openapi":"get /v1/sso/sessions","title":null,"href":"/api-reference/sso/list-sso-sessions"},{"openapi":"delete /v1/sso/sessions/{id}","title":null,"href":"/api-reference/sso/revoke-sso-session"},{"openapi":"post /sso/callback/oidc","title":null,"href":"/api-reference/sso/oidc-callback"},{"openapi":"post /sso/callback/saml","title":"SAML sign-in callback","href":"/api-reference/sso/saml-callback"},{"title":"LDAP Callback","openapi":"post /sso/callback/ldap","href":"/api-reference/sso/ldap-callback"}]},{"group":"Principal Sessions","pages":[{"openapi":"post /v1/principal-sessions","title":null,"href":"/api-reference/principal-sessions/create-principal-session"},{"openapi":"get /v1/principal/grants","title":null,"href":"/api-reference/principal-sessions/list-principal-grants"},{"openapi":"get /v1/principal/audit","title":null,"href":"/api-reference/principal-sessions/get-principal-audit"},{"openapi":"delete /v1/principal/grants/{id}","title":null,"href":"/api-reference/principal-sessions/revoke-principal-grant"}]},{"group":"Consent","pages":[{"openapi":"get /consent","title":null,"href":"/api-reference/consent/consent-ui-page"},{"openapi":"get /v1/consent/{id}","title":null,"href":"/api-reference/consent/get-consent-request-details"},{"openapi":"post /v1/consent/{id}/approve","title":null,"href":"/api-reference/consent/approve-consent-end-user-action"},{"openapi":"post /v1/consent/{id}/deny","title":null,"href":"/api-reference/consent/deny-consent-end-user-action"}]},{"group":"WebAuthn / FIDO","pages":[{"openapi":"post /v1/webauthn/register/options","title":null,"href":"/api-reference/webauthn/generate-registration-options"},{"openapi":"post /v1/webauthn/enrollment-sessions","title":null,"href":"/api-reference/webauthn/create-enrollment-session"},{"openapi":"get /passkey-enroll","title":null,"href":"/api-reference/webauthn/hosted-enrollment"},{"openapi":"post /v1/webauthn/register/verify","title":null,"href":"/api-reference/webauthn/verify-registration"},{"openapi":"get /v1/webauthn/credentials","title":null,"href":"/api-reference/webauthn/list-credentials"},{"openapi":"delete /v1/webauthn/credentials/{id}","title":null,"href":"/api-reference/webauthn/delete-credential"},{"openapi":"post /v1/webauthn/assert/options","title":null,"href":"/api-reference/webauthn/generate-assertion-options"},{"openapi":"post /v1/webauthn/assert/verify","title":null,"href":"/api-reference/webauthn/verify-assertion"}]},{"group":"Budgets","pages":[{"title":"Allocate Budget","sidebarTitle":"Allocate Budget","href":"/api-reference/budgets/allocate"},{"title":"Debit Budget","sidebarTitle":"Debit Budget","href":"/api-reference/budgets/debit"},{"title":"Get Budget Balance","sidebarTitle":"Get Balance","href":"/api-reference/budgets/balance"},{"title":"List Budget Transactions","sidebarTitle":"List Transactions","href":"/api-reference/budgets/transactions"},{"title":"List Budget Allocations","sidebarTitle":"List Allocations","href":"/api-reference/budgets/allocations"}]},{"group":"Domains","pages":[{"title":"Register Custom Domain","sidebarTitle":"Register Domain","href":"/api-reference/domains/create"},{"title":"List Custom Domains","sidebarTitle":"List Domains","href":"/api-reference/domains/list"},{"title":"Verify Domain DNS","sidebarTitle":"Verify Domain","href":"/api-reference/domains/verify"},{"title":"Delete Custom Domain","sidebarTitle":"Delete Domain","href":"/api-reference/domains/delete"}]},{"group":"Usage","pages":[{"title":"Get Current Usage","sidebarTitle":"Current Usage","href":"/api-reference/usage/current"},{"title":"Get Usage History","sidebarTitle":"Usage History","href":"/api-reference/usage/history"}]},{"group":"Vault","pages":[{"title":"Store Vault Credential","sidebarTitle":"Store Credential","href":"/api-reference/vault/store"},{"title":"List Vault Credentials","sidebarTitle":"List Credentials","href":"/api-reference/vault/list"},{"title":"Get Vault Credential","sidebarTitle":"Get Credential","href":"/api-reference/vault/get"},{"title":"Delete Vault Credential","sidebarTitle":"Delete Credential","description":"Permanently delete a Grantex vault credential through the documented API. Review account authorization and deletion behavior before removing a secret.","href":"/api-reference/vault/delete"},{"title":"Exchange Grant Token for Service Credential","sidebarTitle":"Exchange Credential","href":"/api-reference/vault/exchange"},{"title":"Resolve a Credential Reference","sidebarTitle":"Resolve Reference","description":"Redeem a short-lived credential reference for the stored upstream credential; for the relying party that injects credentials on the agent's behalf.","href":"/api-reference/vault/resolve"}]},{"group":"Offline","pages":[{"title":"Consent Bundles API","sidebarTitle":"Consent Bundles","href":"/api-reference/consent-bundles"},{"title":"Offline Sync API","sidebarTitle":"Offline Sync","href":"/api-reference/offline-sync"}]},{"group":"Verifiable Credentials","pages":[{"openapi":"get /v1/credentials/{id}","title":null,"href":"/api-reference/credentials/get-credential"},{"openapi":"get /v1/credentials","title":null,"href":"/api-reference/credentials/list-credentials"},{"openapi":"post /v1/credentials/verify","title":null,"href":"/api-reference/credentials/verify-credential"},{"openapi":"get /v1/credentials/status/{id}","title":null,"href":"/api-reference/credentials/status-list"}]},{"group":"DPDP Compliance","pages":[{"title":"Create Consent Record","sidebarTitle":"Create Consent Record","href":"/api-reference/dpdp/create-consent-record"},{"title":"Get Consent Record","sidebarTitle":"Get Consent Record","href":"/api-reference/dpdp/get-consent-record"},{"title":"List Consent Records","sidebarTitle":"List Consent Records","href":"/api-reference/dpdp/list-consent-records"},{"title":"Withdraw Consent","sidebarTitle":"Withdraw Consent","href":"/api-reference/dpdp/withdraw-consent"},{"title":"List Principal Records","sidebarTitle":"List Principal Records","href":"/api-reference/dpdp/list-principal-records"},{"title":"Request Erasure","sidebarTitle":"Request Erasure","href":"/api-reference/dpdp/request-erasure"},{"title":"Get Erasure Request","sidebarTitle":"Get Erasure Request","href":"/api-reference/dpdp/get-erasure-request"},{"title":"Create Consent Notice","sidebarTitle":"Create Consent Notice","href":"/api-reference/dpdp/create-consent-notice"},{"title":"List Consent Notices","sidebarTitle":"List Consent Notices","href":"/api-reference/dpdp/list-consent-notices"},{"title":"Get Consent Notice","sidebarTitle":"Get Consent Notice","href":"/api-reference/dpdp/get-consent-notice"},{"title":"Consent Notice Content","sidebarTitle":"Consent Notice Content","href":"/api-reference/dpdp/consent-notice-content"},{"title":"File Grievance","sidebarTitle":"File Grievance","href":"/api-reference/dpdp/file-grievance"},{"title":"List Grievances","sidebarTitle":"List Grievances","href":"/api-reference/dpdp/list-grievances"},{"title":"Get Grievance","sidebarTitle":"Get Grievance","href":"/api-reference/dpdp/get-grievance"},{"title":"Update Grievance","sidebarTitle":"Update Grievance","href":"/api-reference/dpdp/update-grievance"},{"title":"Record Breach","sidebarTitle":"Record Breach","href":"/api-reference/dpdp/record-breach"},{"title":"List Breaches","sidebarTitle":"List Breaches","href":"/api-reference/dpdp/list-breaches"},{"title":"Get Breach","sidebarTitle":"Get Breach","href":"/api-reference/dpdp/get-breach"},{"title":"Update Breach","sidebarTitle":"Update Breach","href":"/api-reference/dpdp/update-breach"},{"title":"Record Principal Intimation","sidebarTitle":"Record Principal Intimation","href":"/api-reference/dpdp/record-breach-intimation"},{"title":"Create Export","sidebarTitle":"Create Export","href":"/api-reference/dpdp/create-export"},{"title":"EU AI Act Evidence Pack","sidebarTitle":"EU AI Act Evidence Pack","href":"/api-reference/dpdp/eu-ai-act-evidence"},{"title":"Get Export","sidebarTitle":"Get Export","href":"/api-reference/dpdp/get-export"}]},{"group":"DID","pages":[{"openapi":"get /.well-known/did.json","title":null,"href":"/api-reference/did/did-document"}]}]},{"tab":"Protocol","pages":[{"title":"Protocol","href":"/protocol/specification"}]},{"tab":"Blog","pages":[{"title":"Blog","href":"/blog/oacp-one-trust-layer-under-ucp-acp-ap2"}]}]},"basePath":"","title":"Exchange Grant Token for Service Credential - Grantex","deploymentId":"dpl_FZMKUpaaKiVETbfqhoUe4sPFDTmY","buildId":"dpl_FZMKUpaaKiVETbfqhoUe4sPFDTmY","dynamics":[],"chunks":[]}