License Keys
Get Activation
Core API
- Checkout
- Checkout Links
- Custom Checkout Fields
- Customers
- Subscriptions
- Orders
- Discounts
- Refunds
- Products
- Benefits
- License Keys
- Files
- Organizations
- Metrics
Customer Portal API
- GETGet Customer
- GETGet Organization
- Sessions
- Subscriptions
- Orders
- License Keys
- File Downloads
Webhook Events
- Billing Events
- Organization Events
OAuth 2.0 API
- Connect
- Clients
License Keys
Get Activation
Get a license key activation.
GET
/
v1
/
license-keys
/
{id}
/
activations
/
{activation_id}
package main
import(
"context"
"os"
polargo "github.com/polarsource/polar-go"
"log"
)
func main() {
ctx := context.Background()
s := polargo.New(
polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")),
)
res, err := s.LicenseKeys.GetActivation(ctx, "<value>", "<value>")
if err != nil {
log.Fatal(err)
}
if res.LicenseKeyActivationRead != nil {
// handle response
}
}
{
"id": "<string>",
"license_key_id": "<string>",
"label": "<string>",
"meta": {},
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"license_key": {
"id": "<string>",
"organization_id": "<string>",
"user_id": "<string>",
"customer_id": "<string>",
"user": {
"id": "<string>",
"email": "<string>",
"public_name": "<string>",
"avatar_url": "<string>"
},
"customer": {
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"metadata": {},
"email": "<string>",
"email_verified": true,
"name": "<string>",
"billing_address": {
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>"
},
"tax_id": [
"<any>"
],
"organization_id": "<string>",
"avatar_url": "<string>"
},
"benefit_id": "<string>",
"key": "<string>",
"display_key": "<string>",
"status": "granted",
"limit_activations": 123,
"usage": 123,
"limit_usage": 123,
"validations": 123,
"last_validated_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Response
200
application/json
Successful Response
Creation timestamp of the object.
Last modification timestamp of the object.
The ID of the object.
The benefit ID.
Available options:
granted
, revoked
, disabled
Was this page helpful?
package main
import(
"context"
"os"
polargo "github.com/polarsource/polar-go"
"log"
)
func main() {
ctx := context.Background()
s := polargo.New(
polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")),
)
res, err := s.LicenseKeys.GetActivation(ctx, "<value>", "<value>")
if err != nil {
log.Fatal(err)
}
if res.LicenseKeyActivationRead != nil {
// handle response
}
}
{
"id": "<string>",
"license_key_id": "<string>",
"label": "<string>",
"meta": {},
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"license_key": {
"id": "<string>",
"organization_id": "<string>",
"user_id": "<string>",
"customer_id": "<string>",
"user": {
"id": "<string>",
"email": "<string>",
"public_name": "<string>",
"avatar_url": "<string>"
},
"customer": {
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"metadata": {},
"email": "<string>",
"email_verified": true,
"name": "<string>",
"billing_address": {
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>"
},
"tax_id": [
"<any>"
],
"organization_id": "<string>",
"avatar_url": "<string>"
},
"benefit_id": "<string>",
"key": "<string>",
"display_key": "<string>",
"status": "granted",
"limit_activations": 123,
"usage": 123,
"limit_usage": 123,
"validations": 123,
"last_validated_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
}
}