Replies: 1 comment
-
Glad you figured it out. 🙂 And to answer your question about tokens — activation tokens are per-license, so would need to be distributed alongside the license key. But we almost always recommend using license key authentication so that you only need to distribute a single value: the license key. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
**
UPDATE the answer was here: https://keygen.sh/docs/api/authentication/
TL;DR you need the Key's id value in the payload, and the actual License Key in the Auth header.
**
We've reached the point where our product will need to use activation and fingerprinting for individual and site licenses, but I'm not having much luck with it.
After a successful validate-key request, I get "NO_MACHINE" in the meta.code value, after which I try to activate the license using the ( already generated ) fingerprint.
I then get "Forbidden" for this request:
C#
var client = new RestClient("https://api.keygen.sh/v1/accounts/" + a);
var request = new RestRequest("machines").AddJsonBody(
new {
data = new {
type = "machines",
attributes = new {
fingerprint = fp
},
relationships = new {
license = new {
data = new {
type = "license",
id = l
}
}
}
}
});
( Apologies for code formatting... I can't make it not suck :( )
It seems that using the license key isn't working, even though I have the Authentication Strategy set to "LICENSE" in the Policy. This brings me to my next question, which is if I use a activation token, how does that work? I get the concept, but in practice I can't figure out how you apply an activation token. Do you have one global one you use everywhere? Do you have one for each app that you hard code in somewhere? One per policy? One per license? One per user?
Using the license seems much simpler, but there must be some other setting in the policy that is stopping it from working.
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions