-
When activating a machine, the docs state the license key can be used as the bearer token:
When using the key, an error is returned: "errors": [
{
"title": "Unauthorized",
"detail": "You must be authenticated to complete the request",
"code": "TOKEN_INVALID",
"links": {
"about": "https://keygen.sh/docs/api/authentication/#token-authentication"
}
}
] When using the admin token, Attempting to use the license key fails. I've tried both FWIW: The policy attached to the license is both Related QuestionWhen activating the machine, I noticed you must provide the license Id in the attributes (relationships); is there an option to use the license key instead of the id? Any guidance would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The And to answer your related question — we do not support passing in a license key instead of a license ID in relationships. You will need to first validate the license, which will do 2 things: first, it will let you know if an activation is even needed (i.e. a Hope that helps? Let me know! |
Beta Was this translation helpful? Give feedback.
The
Bearer {token}
authorization scheme only supports API tokens. Likewise, theLicense {key}
only supports license keys. To authenticate with a license key, you will need to first set the license policy'sauthenticationStrategy
toLICENSE
orMIXED
, and then use theLicense {key}
authorization scheme. If theLicense
scheme was failing, it is likely due to the policy not allowing license key authentication, or the license key was incorrect, expired, or suspended. For more in-depth docs on API authentication, check out the docs (there is sections on License Key Authentication as well as Token Authentication).And to answer your related question — we do not support passing in a license key i…