{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-products/esp/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Get key","description":"Integration and usage documentation.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"get-key","__idx":0},"children":["Get key"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns a session key to start an authentication process with SPID, CIE, or EIDAS.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"The key must be passed to the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/products/esp/enterprise-documentation/developer-documentation/integration-guide/login"},"children":["Login"]}," endpoint."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Deprecated endpoint"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The previous endpoint ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/sslprotected/environment_name/getKey"]}," is deprecated. Use the endpoint below instead."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For the full technical reference, see the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/products/esp/openapi/get-key"},"children":["OpenAPI specification"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"endpoint","__idx":1},"children":["Endpoint"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"GET /api/secure/{environment_name}/getKey\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"headers","__idx":2},"children":["Headers"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Esp-Api-Key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["API key for the environment."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"path-parameters","__idx":3},"children":["Path parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["environment_name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The environment path provided by Namirial during the assessment phase (e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["myintegration"]},")"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"query-parameters","__idx":4},"children":["Query parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["attributes"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attribute set: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Base"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Full"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["level"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authentication level: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["3"]},". Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["spidType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SPID purpose value. Applies to SPID authentication only. Defaults to physical person"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["spidType"]}," parameter is only relevant for SPID authentication."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"request-example","__idx":5},"children":["Request example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"GET /api/secure/myintegration/getKey?attributes=Base&level=2\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"response-examples","__idx":6},"children":["Response examples"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["200 — Session key"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response is a string (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authnKey"]},") to be passed to the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/products/esp/enterprise-documentation/developer-documentation/integration-guide/login"},"children":["Login"]}," endpoint."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"error-codes","__idx":7},"children":["Error codes"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"HTTP Status"},"children":["HTTP Status"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Error code"},"children":["Error code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Error type"},"children":["Error type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Solution"},"children":["Solution"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Bad request"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Check that all required parameters are present and valid"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unauthorized"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The API key is missing. Include the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Esp-Api-Key"]}," header"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Forbidden"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The API key is invalid"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not found"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["environment_name"]}," does not exist"]}]}]}]}]}]},"headings":[{"value":"Get key","id":"get-key","depth":1},{"value":"Endpoint","id":"endpoint","depth":4},{"value":"Headers","id":"headers","depth":4},{"value":"Path parameters","id":"path-parameters","depth":4},{"value":"Query parameters","id":"query-parameters","depth":4},{"value":"Request example","id":"request-example","depth":4},{"value":"Response examples","id":"response-examples","depth":4},{"value":"Error codes","id":"error-codes","depth":4}],"frontmatter":{"seo":{"title":"Get key"}},"lastModified":"2026-03-07T14:10:45.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/esp/enterprise-documentation/developer-documentation/integration-guide/getkey","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}