Activate jwt
const url = 'https://example.com/api/v1/hardware-keys/yubikey/activations/jwt';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"request":{"activationCode":"example","fingerprint":"example","components":{"MachineName":"3f7a9c1e5b2d4a60"},"fingerprintMethod":"example","deviceName":"example","applicationScope":"example","applicationInstanceId":"example","email":"example","requestedLeaseDuration":"PT15M","targetSoftwareVersion":"example","useInteractiveUser":true,"tryMode":true},"attestation":{"fingerprint":"example","x5c":["example"]}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/hardware-keys/yubikey/activations/jwt \ --header 'Content-Type: application/json' \ --data '{ "request": { "activationCode": "example", "fingerprint": "example", "components": { "MachineName": "3f7a9c1e5b2d4a60" }, "fingerprintMethod": "example", "deviceName": "example", "applicationScope": "example", "applicationInstanceId": "example", "email": "example", "requestedLeaseDuration": "PT15M", "targetSoftwareVersion": "example", "useInteractiveUser": true, "tryMode": true }, "attestation": { "fingerprint": "example", "x5c": [ "example" ] } }'Activates a license with a YubiKey and returns the license token alone.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”An id of your own for the call. The answer returns it in the same header, and the server log carries it; when you send none, the server makes one.
A key of your own that makes a retry safe: a call repeated with the same key and the same body answers the first call’s result instead of running again. Send one key per call, and reuse it only to retry that call.
Request Bodyrequired
Section titled “Request Bodyrequired”The activation request, with the YubiKey key’s thumbprint as its fingerprint, and the key’s attestation. The DPoP header carries the proof that the device holds the key, signed over a nonce from nonce.
An online activation from a device whose fingerprint is a YubiKey key.
object
The activation request, exactly as the licensing API takes it; its fingerprint is the key’s.
object
Activation (or license) code required to identify entitlement or activation workflow.
The device fingerprint the license is bound to: the digest of the components (FingerprintDigest.Compute). It should be as unique as possible, since it identifies the seat. The server refuses a fingerprint that is not the digest of the components sent with it; a fingerprint sent without components is read as a single component named NodeId.
The device identity: per-component one-way hashes keyed by trait (MachineId, MachineName, MacAddress, OsVersion, UserName), or one entry for a single-value fingerprint. The entitlement’s ComponentMatchingStrategy (MatchAny/Two/Most) compares them when it looks for the device’s session, and a session found that way is re-bound to the components sent. Values are hashed on-device; raw component values never leave the client.
Example
{ "MachineName": "3f7a9c1e5b2d4a60"}How the device took Fingerprint: the device traits it combined, comma-separated (MachineName, OsVersion, MacAddress, UserName), such as “MachineName, MacAddress”. An entitlement whose fingerprinting method names traits refuses an activation that names none or names others. The SDK’s machine-derived fingerprint fills it in; leave it empty for a fingerprint you supply yourself.
The device name is optional (but highly recommended) additional information about the device (e.g. for display in management UIs).
The license is bound to restricted to the provided application scope. This is to ensure that the activation code is used only for its intended application.
Identifies the specific application or process that holds this license when concurrent licensing is enabled. Relevant when multiple processes on the same hardware require separate licenses.
End-user email (used for identity verification or association). Optional depending on policy.
Desired lease duration, an ISO 8601 duration on the wire (PT1H). Advisory: the server currently ignores this value and
derives the lease duration from the entitlement’s license-allocation policy.
Example
PT15MSoftware version requesting activation (policy may restrict allowed software versions).
When true, the server will resolve the authenticated user’s identity and find entitlements assigned to that user (via EntitlementPrincipal). Requires an authenticated request with a valid user token. The activation code may be omitted when this is true and the user has exactly one assigned entitlement.
When true, ActivationCode is read as an offer’s public try code and the server answers with the calling device’s own short-lived license, issuing one if the device has none. Fingerprint is required: the try code is public, so it identifies the offer and never the caller, and a request that names no device is refused.
The YubiKey’s attestation of the key.
object
The device fingerprint: the RFC 7638 thumbprint of the attested public key.
Base64 DER certificates in chain order: the attestation statement for the key’s slot, then the YubiKey’s factory attestation certificate (slot F9).
Responses
Section titled “Responses”The license was activated for the YubiKey; the body is the license token.
A signed license token (JWT).
Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
The activation request is not valid.
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
The license needs a signed-in user or a confirmed email address (license.authentication_required, with requires and WWW-Authenticate).
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
How to authenticate: the bearer challenge.
The YubiKey attestation was refused (hardware_key.attestation_refused), the proof of possession was refused (hardware_key.proof_refused), or the license’s policy refused the activation.
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
The activation code is not known.
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
The license has no free seat, or the request repeats an Idempotency-Key used for another request.
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
The body is not sent as application/json (request.unsupported).
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
Too many activations; retry after the time the response names.
The body of every failed call, served as application/problem+json (RFC 9457) with the members the platform adds: a numeric code, a codeName and a traceId.
object
A reference to the code’s entry on the error-codes page.
A short summary of the problem.
The HTTP status of the answer.
What went wrong in this call, in a sentence.
The path of the call.
The stable numeric error code. The error-codes page lists them.
The stable name of the error code, for example resource.not_found.
The id of the call in the server log. Quote it when you contact support. It equals the X-Correlation-Id of the answer.
The scope or condition the caller is missing, on a refusal that names one.
The limiter that shed the call, on a 429.
On a validation failure, the messages for each field, keyed by the field’s name.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": 1, "codeName": "example", "traceId": "example", "requires": "example", "scope": "example", "errors": "example"}Headers
Section titled “Headers”The correlation id of the call: the one you sent, or the one the server made.
The seconds to wait before the call is sent again.
The calls the limiter allows in its window, when it knows.
The calls left in the window, when the limiter knows.
The seconds until the window resets, when the limiter knows.
Names the limiter that shed the call.