Skip to content
Last updated

Get key

Returns a session key to start an authentication process with SPID, CIE, or EIDAS.
The key must be passed to the Login endpoint.

Deprecated endpoint

The previous endpoint /sslprotected/environment_name/getKey is deprecated. Use the endpoint below instead.

For the full technical reference, see the OpenAPI specification.

Endpoint

GET /api/secure/{environment_name}/getKey

Headers

NameRequiredDescription
Esp-Api-KeyYesAPI key for the environment.

Path parameters

NameTypeRequiredDescription
environment_namestringYesThe environment path provided by Namirial during the assessment phase (e.g. myintegration)

Query parameters

NameTypeRequiredDescription
attributesstringYesAttribute set: Base or Full
levelstringNoAuthentication level: 1, 2, or 3. Defaults to 1
spidTypestringNoSPID purpose value. Applies to SPID authentication only. Defaults to physical person

The spidType parameter is only relevant for SPID authentication.

Request example

GET /api/secure/myintegration/getKey?attributes=Base&level=2

Response examples

200 — Session key

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

The response is a string (authnKey) to be passed to the Login endpoint.

Error codes

HTTP StatusError codeError typeSolution
400Bad requestCheck that all required parameters are present and valid
401UnauthorizedThe API key is missing. Include the Esp-Api-Key header
403ForbiddenThe API key is invalid
404Not foundThe environment_name does not exist