# Activate a Key Based License

In order to perform license activations or license checks, your software needs a way to interact with the LicenseSpring service.

For that you can either make calls directly to the LicenseAPI, or you can use one of the SDKs that we maintain.

{% hint style="info" %}
To keep things simple, we assume you selected license keys as your authorization method.
{% endhint %}

{% hint style="info" %}
There are many good reasons why you would call the LicenseAPI directly. However, the server response is in JSON which you would be responsible for parsing. We usually recommend that you use one of our SDKs, since give you a lot of additional functionality, such as performing local license checks, and working with the licenses as objects and calling functions on them, which could potentially save you a lot of time.
{% endhint %}

Regardless of whether you are using the LicenseAPI directly, or importing one of our SDKs in your codebase, you will need to enter some of the following information at a minimum.

### Connecting to the API

You will need your **api key** and your **shared key**. You can find these by logging in to the vendor account, and navigating to settings > keys. Click on the dropdown button beside the api key to reveal your shared key:

![Location of API Key and Shared Key](/files/ca54ebf793bc636d8c4a483663ffbcb8323a8a36)

{% hint style="info" %}
Alternative to api and shared key is [**OAuth authorization**](/vendor-platform/settings/oauth-configuration.md).
{% endhint %}

The minimum information required in order to run the `activate_license` webhook (or its respective SDK) for a key based license is:

* License key
* Product code
* HardwareID (a unique identifier for the device you are binding a license to)

If the activation is successful, the status of the license will say "Active", and the "Total activations" will have incremented by `1`.

![License Status](/files/03f6d1c77cfc1e4868c9847037f247100dd33576)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.licensespring.com/getting-started/activate-a-key-based-license.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
