# `PolarExpress.Services.CustomerPortal.LicenseKeysService`
[🔗](https://github.com/jeffhuen/polar_express/blob/main/lib/polar_express/services/customer_portal/license_keys_service.ex#L2)

License-keys

LicenseKeys API operations.

# `activate_license_key`

```elixir
@spec activate_license_key(PolarExpress.Client.t(), map(), keyword()) ::
  {:ok, PolarExpress.Schemas.LicenseKeyActivationRead.t()}
  | {:error, PolarExpress.Error.t()}
```

Activate License Key

Activate a license key instance.

> This endpoint doesn't require authentication and can be safely used on a public
> client, like a desktop application or a mobile app.
> If you plan to validate a license key on a server, use the `/v1/license-keys/activate`
> endpoint instead.

See `PolarExpress.Params.CustomerPortal.LicenseKeysActivateLicenseKeyParams` for parameter details.

# `deactivate_license_key`

```elixir
@spec deactivate_license_key(PolarExpress.Client.t(), map(), keyword()) ::
  {:ok, term()} | {:error, PolarExpress.Error.t()}
```

Deactivate License Key

Deactivate a license key instance.

> This endpoint doesn't require authentication and can be safely used on a public
> client, like a desktop application or a mobile app.
> If you plan to validate a license key on a server, use the `/v1/license-keys/deactivate`
> endpoint instead.

See `PolarExpress.Params.CustomerPortal.LicenseKeysDeactivateLicenseKeyParams` for parameter details.

# `get_license_key`

```elixir
@spec get_license_key(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
  {:ok, PolarExpress.Schemas.LicenseKeyWithActivations.t()}
  | {:error, PolarExpress.Error.t()}
```

Get License Key

Get a license key.

**Scopes**: `customer_portal:read` `customer_portal:write`

See `PolarExpress.Params.CustomerPortal.LicenseKeysGetLicenseKeyParams` for parameter details.

# `list_license_keys`

```elixir
@spec list_license_keys(PolarExpress.Client.t(), map(), keyword()) ::
  {:ok, PolarExpress.ListObject.t()} | {:error, PolarExpress.Error.t()}
```

List License Keys

**Scopes**: `customer_portal:read` `customer_portal:write`

See `PolarExpress.Params.CustomerPortal.LicenseKeysListLicenseKeysParams` for parameter details.

# `validate_license_key`

```elixir
@spec validate_license_key(PolarExpress.Client.t(), map(), keyword()) ::
  {:ok, PolarExpress.Schemas.ValidatedLicenseKey.t()}
  | {:error, PolarExpress.Error.t()}
```

Validate License Key

Validate a license key.

> This endpoint doesn't require authentication and can be safely used on a public
> client, like a desktop application or a mobile app.
> If you plan to validate a license key on a server, use the `/v1/license-keys/validate`
> endpoint instead.

See `PolarExpress.Params.CustomerPortal.LicenseKeysValidateLicenseKeyParams` for parameter details.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
