Exchanges an authorization code for tokens, following the OIDC standard.
Send parameters as application/x-www-form-urlencoded and authenticate with HTTP Basic when using confidential clients.
Request Body
string
default:"authorization_code"
required
Must be ‘authorization_code’.
string
required
The authorization code received after a successful verification.
string
Required for public clients or when not using HTTP Basic.
string
required
Must exactly match the redirect URI used in the authorization request.
string
Confidential clients include their Client Secret either via HTTP Basic (recommended) or in the form body.
Response
string
Bearer token you can use to call the /userinfo endpoint.
string
default:"Bearer"
Always Bearer.
number
Lifetime of the access token in seconds: 600 (10 minutes). Call /userinfo before it expires. No refresh token is issued.
string
A JWT with technical, non‑PII claims (for example: sub, acr, hopae_loa, iat, exp, iss, aud).
Personal claims are not included in the ID Token. Use /userinfo to retrieve user attributes.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"hConnect","colors":{"primary":"#2563EB","light":"#E4E4E7","dark":"#2563EB"},"logo":{"light":"https://mintcdn.com/hopae-a83466ba/ZQEdy_FTEqcDCNky/logo/hconnect_light.png?fit=max\u0026auto=format\u0026n=ZQEdy_FTEqcDCNky\u0026q=85\u0026s=b55f8449a1816421b47a12dfaf0346ad","dark":"https://mintcdn.com/hopae-a83466ba/ZQEdy_FTEqcDCNky/logo/hconnect_dark.png?fit=max\u0026auto=format\u0026n=ZQEdy_FTEqcDCNky\u0026q=85\u0026s=637f0017e4b0ccc77fd6e28d5b177afe"},"favicon":"https://mintcdn.com/hopae-a83466ba/Ic1oE8rFNW-qnQGv/hopae.svg?fit=max\u0026auto=format\u0026n=Ic1oE8rFNW-qnQGv\u0026q=85\u0026s=eb81cb989e33aeaf7c15a3a8567492ca","api":{"openapi":["v2/openapi.json","v2/openapi-oidc.json"],"playground":{"display":"interactive"},"examples":{"languages":["curl","javascript","python"]},"mdx":{"auth":{"method":"basic"},"server":"https://sandbox.api.hopae.com/connect/v1"}},"navbar":{"primary":{"type":"button","label":"Console","href":"https://console.hopae.com"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"hopae-a83466ba","hasAudioNarration":false,"actualSubdomain":"hopae-a83466ba","customDomains":["docs.hopae.com"],"gitSource":{"type":"github","owner":"hopae-official","repo":"hconnect-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b0666a56513dbe6e092ca70","clientVersion":"0.0.4389","searchFilterCounts":[{"language":"default","tag":"Guides","count":52},{"language":"default","tag":"Verification API","count":32},{"language":"default","tag":"Workspace API","count":21},{"language":"default","tag":"Concepts","count":13},{"language":"default","tag":"Reference","count":12},{"language":"default","tag":"OIDC","count":11},{"language":"default","tag":"Verifications","count":11},{"language":"default","tag":"Overview","count":10},{"language":"default","tag":"Apps","count":9},{"language":"default","tag":"REST API","count":7}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"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}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"page-tags.css","content":"html:has(#sidebar-content a.bg-primary\\/10 [data-nav-tag=\"Sandbox\"]) #page-title::after{content:\"Sandbox\";display:inline-block;margin-left:0.625rem;padding:0.125rem 0.5rem;border-radius:0.375rem;font-size:0.875rem;font-weight:700;line-height:1.25rem;letter-spacing:normal;vertical-align:middle;color:rgb(var(--primary));background-color:rgb(var(--primary) / 0.1)}html.dark:has(#sidebar-content a.bg-primary\\/10 [data-nav-tag=\"Sandbox\"]) #page-title::after{color:rgb(var(--primary-light));background-color:rgb(var(--primary-light) / 0.1)}"}]}
{"page":{"pagePath":"api-reference/oidc/token","slug":"/api-reference/oidc/token","pageMetadata":{"title":"Exchange Code for Token","sidebarTitle":"Token","api":"POST https://sandbox.connect.hopae.com/token","description":null,"href":"/api-reference/oidc/token"},"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={code:`code`,p:`p`,..._provideComponents(),...props.components},{Heading,Info,ParamField,ResponseField}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Exchanges an authorization code for tokens, following the OIDC standard.`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Send parameters as `,_jsx(_components.code,{children:`application/x-www-form-urlencoded`}),` and authenticate with HTTP Basic when using confidential clients.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request Body`}),`\n`,_jsx(ParamField,{body:`grant_type`,type:`string`,required:true,default:`authorization_code`,id:`param-grant-type`,children:_jsx(_components.p,{children:`Must be ‘authorization_code’.`})}),`\n`,_jsx(ParamField,{body:`code`,type:`string`,required:true,id:`param-code`,children:_jsx(_components.p,{children:`The authorization code received after a successful verification.`})}),`\n`,_jsx(ParamField,{body:`client_id`,type:`string`,id:`param-client-id`,children:_jsx(_components.p,{children:`Required for public clients or when not using HTTP Basic.`})}),`\n`,_jsx(ParamField,{body:`redirect_uri`,type:`string`,required:true,id:`param-redirect-uri`,children:_jsx(_components.p,{children:`Must exactly match the redirect URI used in the authorization request.`})}),`\n`,_jsx(ParamField,{body:`client_secret`,type:`string`,id:`param-client-secret`,children:_jsx(_components.p,{children:`Confidential clients include their Client Secret either via HTTP Basic (recommended) or in the form body.`})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`access_token`,type:`string`,id:`param-access-token`,children:_jsxs(_components.p,{children:[`Bearer token you can use to call the `,_jsx(_components.code,{children:`/userinfo`}),` endpoint.`]})}),`\n`,_jsx(ResponseField,{name:`token_type`,type:`string`,default:`Bearer`,id:`param-token-type`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`Bearer`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`expires_in`,type:`number`,id:`param-expires-in`,children:_jsxs(_components.p,{children:[`Lifetime of the access token in seconds: `,_jsx(_components.code,{children:`600`}),` (10 minutes). Call `,_jsx(_components.code,{children:`/userinfo`}),` before it expires. No refresh token is issued.`]})}),`\n`,_jsx(ResponseField,{name:`id_token`,type:`string`,id:`param-id-token`,children:_jsxs(_components.p,{children:[`A JWT with technical, non‑PII claims (for example: `,_jsx(_components.code,{children:`sub`}),`, `,_jsx(_components.code,{children:`acr`}),`, `,_jsx(_components.code,{children:`hopae_loa`}),`, `,_jsx(_components.code,{children:`iat`}),`, `,_jsx(_components.code,{children:`exp`}),`, `,_jsx(_components.code,{children:`iss`}),`, `,_jsx(_components.code,{children:`aud`}),`).\nPersonal claims are not included in the ID Token. Use `,_jsx(_components.code,{children:`/userinfo`}),` to retrieve user attributes.`]})})]})}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 Code for Token","sidebarTitle":"Token","api":"POST https://sandbox.connect.hopae.com/token","description":null,"href":"/api-reference/oidc/token"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,ParamField,RequestExample,ResponseExample,ResponseField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Exchanges an authorization code for tokens, following the OIDC standard.`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Send parameters as `,_jsx(_components.code,{children:`application/x-www-form-urlencoded`}),` and authenticate with HTTP Basic when using confidential clients.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request Body`}),`\n`,_jsx(ParamField,{body:`grant_type`,type:`string`,required:true,default:`authorization_code`,id:`param-grant-type`,children:_jsx(_components.p,{children:`Must be ‘authorization_code’.`})}),`\n`,_jsx(ParamField,{body:`code`,type:`string`,required:true,id:`param-code`,children:_jsx(_components.p,{children:`The authorization code received after a successful verification.`})}),`\n`,_jsx(ParamField,{body:`client_id`,type:`string`,id:`param-client-id`,children:_jsx(_components.p,{children:`Required for public clients or when not using HTTP Basic.`})}),`\n`,_jsx(ParamField,{body:`redirect_uri`,type:`string`,required:true,id:`param-redirect-uri`,children:_jsx(_components.p,{children:`Must exactly match the redirect URI used in the authorization request.`})}),`\n`,_jsx(ParamField,{body:`client_secret`,type:`string`,id:`param-client-secret`,children:_jsx(_components.p,{children:`Confidential clients include their Client Secret either via HTTP Basic (recommended) or in the form body.`})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`access_token`,type:`string`,id:`param-access-token`,children:_jsxs(_components.p,{children:[`Bearer token you can use to call the `,_jsx(_components.code,{children:`/userinfo`}),` endpoint.`]})}),`\n`,_jsx(ResponseField,{name:`token_type`,type:`string`,default:`Bearer`,id:`param-token-type`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`Bearer`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`expires_in`,type:`number`,id:`param-expires-in`,children:_jsxs(_components.p,{children:[`Lifetime of the access token in seconds: `,_jsx(_components.code,{children:`600`}),` (10 minutes). Call `,_jsx(_components.code,{children:`/userinfo`}),` before it expires. No refresh token is issued.`]})}),`\n`,_jsx(ResponseField,{name:`id_token`,type:`string`,id:`param-id-token`,children:_jsxs(_components.p,{children:[`A JWT with technical, non‑PII claims (for example: `,_jsx(_components.code,{children:`sub`}),`, `,_jsx(_components.code,{children:`acr`}),`, `,_jsx(_components.code,{children:`hopae_loa`}),`, `,_jsx(_components.code,{children:`iat`}),`, `,_jsx(_components.code,{children:`exp`}),`, `,_jsx(_components.code,{children:`iss`}),`, `,_jsx(_components.code,{children:`aud`}),`).\nPersonal claims are not included in the ID Token. Use `,_jsx(_components.code,{children:`/userinfo`}),` to retrieve user attributes.`]})}),`\n`,_jsx(RequestExample,{children:_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:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_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:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://sandbox.connect.hopae.com/token'`}),_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:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/x-www-form-urlencoded'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'grant_type=authorization_code\u0026code=auth_xyz\u0026redirect_uri=https%3A%2F%2Fapp.example.com%2Fcallback'`})]}),`\n`]})})})}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`Response`,numberOfLines:`6`,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:`6`,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:` \"access_token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"token_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer\"`}),_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:` \"expires_in\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`600`}),_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:` \"id_token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{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 Code for Token","sidebarTitle":"Token","api":"POST https://sandbox.connect.hopae.com/token","description":null,"href":"/api-reference/oidc/token"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Request Body","slug":"request-body","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --request\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --url\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'https://sandbox.connect.hopae.com/token'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Content-Type: application/x-www-form-urlencoded'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --data\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'grant_type=authorization_code\u0026#x26;code=auth_xyz\u0026#x26;redirect_uri=https%3A%2F%2Fapp.example.com%2Fcallback'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"Response","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"6\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"access_token\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"eyJhbGciOiJSUzI1NiIs...\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"token_type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Bearer\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"expires_in\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">600\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id_token\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Exchange Code for Token","path":"/token","servers":[{"url":"https://sandbox.connect.hopae.com"}],"method":"post","request":{"security":[{"title":"Basic Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"basic","description":"Basic authentication header of the form `Basic \u003cencoded-value>`, where `\u003cencoded-value>` is the base64-encoded string `username:password`."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"grant_type":[{"type":"string","description":"Must be ‘authorization_code’.","required":true}],"code":[{"type":"string","description":"The authorization code received after a successful verification.","required":true}],"client_id":[{"type":"string","description":"Required for public clients or when not using HTTP Basic."}],"redirect_uri":[{"type":"string","description":"Must exactly match the redirect URI used in the authorization request.","required":true}],"client_secret":[{"type":"string","description":"Confidential clients include their Client Secret either via HTTP Basic (recommended) or in the form body."}]}}],"examples":{"example":{"value":{"grant_type":"\u003cstring>","code":"\u003cstring>","client_id":"\u003cstring>","redirect_uri":"\u003cstring>","client_secret":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"access_token":[{"type":"string","description":"Bearer token you can use to call the `/userinfo` endpoint."}],"token_type":[{"type":"string","description":"Always `Bearer` ."}],"expires_in":[{"type":"number","description":"Lifetime of the access token in seconds: `600` (10 minutes). Call `/userinfo` before it expires. No refresh token is issued."}],"id_token":[{"type":"string","description":"A JWT with technical, non‑PII claims (for example: `sub` , `acr` , `hopae_loa` , `iat` , `exp` , `iss` , `aud` ). Personal claims are not included in the ID Token. Use `/userinfo` to retrieve user attributes."}]}}],"examples":{"example":{"value":{"access_token":"\u003cstring>","token_type":"\u003cstring>","expires_in":123,"id_token":"\u003cstring>"}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"hopae-a83466ba","siteName":"hConnect","title":"Exchange Code for Token - hConnect","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{"v2":{"href":"/v2/api-reference/oidc/token","matchLevel":1},"v1":{"href":"/api-reference/oidc/token","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-11-19T09:32:08.154Z","originalFileLocation":"api-reference/oidc/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=\"application-name\" content=\"hConnect\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hopae-a83466ba/ZlLEDy_twj3SXOqy/_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/hopae-a83466ba/ZlLEDy_twj3SXOqy/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hopae-a83466ba/ZlLEDy_twj3SXOqy/_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/hopae-a83466ba/ZlLEDy_twj3SXOqy/_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/hopae-a83466ba/ZlLEDy_twj3SXOqy/_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/hopae-a83466ba/ZlLEDy_twj3SXOqy/_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/hopae-a83466ba/ZlLEDy_twj3SXOqy/_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/hopae-a83466ba/ZlLEDy_twj3SXOqy/_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/hopae-a83466ba/ZlLEDy_twj3SXOqy/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Exchange Code for Token - hConnect\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"hConnect\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.hopae.com/api-reference/oidc/token\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://hopae-a83466ba.mintlify.site/_mintlify/api/og/v2?division=OIDC\u0026amp;title=Exchange+Code+for+Token\u0026amp;theme=180b48189d0fcbc481a9acd9\u0026amp;signature=3d00e9bd446f4750b041fe31e63e69531711cabc462c39c94b9d0ca742d22f06\">\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 Code for Token - hConnect\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://hopae-a83466ba.mintlify.site/_mintlify/api/og/v2?division=OIDC\u0026amp;title=Exchange+Code+for+Token\u0026amp;theme=180b48189d0fcbc481a9acd9\u0026amp;signature=3d00e9bd446f4750b041fe31e63e69531711cabc462c39c94b9d0ca742d22f06\">\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/hopae-a83466ba/ZlLEDy_twj3SXOqy/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"hConnect\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563EB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.hopae.com/api-reference/oidc/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/oidc/token.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.hopae.com/#organization\",\"name\":\"hConnect\",\"url\":\"https://docs.hopae.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/hopae-a83466ba/ZQEdy_FTEqcDCNky/logo/hconnect_light.png?fit=max\u0026auto=format\u0026n=ZQEdy_FTEqcDCNky\u0026q=85\u0026s=b55f8449a1816421b47a12dfaf0346ad\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.hopae.com#website\",\"name\":\"hConnect\",\"url\":\"https://docs.hopae.com\",\"publisher\":{\"@id\":\"https://docs.hopae.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.hopae.com/api-reference/oidc/token#webpage\",\"url\":\"https://docs.hopae.com/api-reference/oidc/token\",\"name\":\"Exchange Code for Token\",\"dateModified\":\"2026-11-19T09:32:08.154Z\",\"isPartOf\":{\"@id\":\"https://docs.hopae.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.hopae.com/api-reference/oidc/token#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.hopae.com/api-reference/oidc/token#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"OIDC\",\"item\":\"https://docs.hopae.com/api-reference/oidc/well-known\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Exchange Code for Token\",\"item\":\"https://docs.hopae.com/api-reference/oidc/token\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.hopae.com/api-reference/oidc/token#apireference\",\"headline\":\"Exchange Code for Token\",\"name\":\"Exchange Code for Token\",\"url\":\"https://docs.hopae.com/api-reference/oidc/token\",\"mainEntityOfPage\":{\"@id\":\"https://docs.hopae.com/api-reference/oidc/token#webpage\"},\"dateModified\":\"2026-11-19T09:32:08.154Z\",\"publisher\":{\"@id\":\"https://docs.hopae.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.hopae.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"hConnect\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"hConnect\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/oidc/token.md","siteName":"hConnect","nav":{"global":null,"versions":[{"version":"v2","default":true,"hidden":false,"pages":[{"title":"v2","href":"/v2/api-reference/oidc/token"}]},{"version":"v1","default":false,"tabs":[{"tab":"Guides","icon":"book-open","pages":[{"title":"Guides","href":"/guides/getting-started/introduction"}]},{"tab":"Verification API","icon":"square-terminal","groups":[{"group":"Overview","pages":[{"title":"API Overview","sidebarTitle":"Introduction","href":"/api-reference/introduction"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Error Code Reference","sidebarTitle":"Error Codes","href":"/api-reference/error-codes"}]},{"group":"OIDC","pages":[{"title":"Discovery Document","api":"GET https://sandbox.connect.hopae.com/.well-known/openid-configuration","href":"/api-reference/oidc/well-known"},{"title":"Start Authorization","api":"GET https://sandbox.connect.hopae.com/auth","description":"Initiates the OIDC Authorization Code flow. Front‑channel redirect; no Authorization header.","href":"/api-reference/oidc/auth"},{"title":"Exchange Code for Token","sidebarTitle":"Token","api":"POST https://sandbox.connect.hopae.com/token","href":"/api-reference/oidc/token"},{"title":"UserInfo","api":"GET https://sandbox.connect.hopae.com/userinfo","description":"Returns user claims based on granted scopes. Requires a valid Bearer access token.","href":"/api-reference/oidc/userinfo"},{"title":"JWKS","api":"GET https://sandbox.connect.hopae.com/jwks","href":"/api-reference/oidc/jwks"}]},{"group":"REST API","pages":[{"title":"Get Providers","api":"GET /providers","href":"/api-reference/providers/get-providers"},{"title":"Create Verification","api":"POST /verifications","href":"/api-reference/verifications/create-verification"},{"title":"Get Verification Status","api":"GET /verifications/{verificationId}","href":"/api-reference/verifications/get-verification"},{"title":"Get Verification UserInfo","api":"GET /verifications/{verificationId}/userinfo","href":"/api-reference/verifications/get-verification-userinfo"},{"title":"Get Verification Evidence","api":"GET /verifications/{verificationId}/evidence","href":"/api-reference/verifications/get-verification-evidence"},{"title":"Cancel Verification","api":"DELETE /verifications/{verificationId}","href":"/api-reference/verifications/cancel-verification"},{"title":"Provider userData Requirements","href":"/api-reference/verifications/user-data-requirements"}]}]},{"tab":"Workspace API","icon":"square-terminal","pages":[{"title":"Workspace API","href":"/api-reference/workspace/introduction"}]}]}]},"basePath":"","title":"Exchange Code for Token - hConnect","deploymentId":"dpl_4DWa5VHHws8GyZotTfaG5njNqY1w","buildId":"dpl_4DWa5VHHws8GyZotTfaG5njNqY1w","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-BSmGr6_d.js","snippetPresets-ScYHtgPH.js","utils-CEQwJl7d.js","style-to-object-BY3JEAdk.js","utils-B22OY4jq.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-D7Wy8St1.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BR14VZ6P.js","_Uint8Array-C_Hiqjf5.js","isObject-FP1Yky1u.js","ApiExamples-rpsi2T43.js","usePlaygroundInputsStore-CUAKkrDg.js","shallow-Bpslp4zw.js","isEqual-HLimTTXg.js","CodeSnippets-CZ_WZFtq.js","CodeSnippet-SObXR_MO.js","use-playground-group-access-B94EDetc.js","Page-BkBC9rKz.js","api-description-markdown-viF3flEw.js","DynamicMarkdown-ChHD_AmO.js","SectionHeading-BXzqAgc6.js","MethodPill-D2328AeU.js","getPastedJson-BDyiAD6x.js","Check2Icon-8iE1_yY_.js","axios-CsQoIw0U.js"]}