---
title: 'Tutorial: Manage Subscription License Keys Using the Access Server Web API (OpenAPI)'
canonical: https://openvpn.net/as-docs/v3/tutorials/tutorial--subscription-license-keys-with-web-api/
product: Access Server Docs
description: Learn how to manage Access Server subscription license keys using the Web API — including how to validate, activate, check the status of, and remove a subscription license key.
keywords: Subscription License Key
---

# Tutorial: Manage Subscription License Keys Using the Access Server Web API (OpenAPI)

## Overview

This tutorial shows you how to manage subscription license keys in OpenVPN Access Server using the Web API with the `sacli apicall` command.

> **Tip**
>
> This tutorial uses the `sacli apicall` command, but you can also use cURL or the Swagger UI. Refer to [Tutorial: Test the New Web API (OpenAPI) in Access Server 3.0](https://openvpn.net/as-docs/v3/tutorials/tutorial--test-the-new-web-api--openapi--in-access-server-3-0.md).

## Prerequisites

- Access Server 3.1.0 or newer.
- Root access to your Access Server's console.
- Access Server portal access.
- (Optional) A remote system for running API calls.

> **Important**
>
> The API specification can change between Access Server versions. Verify the API specification for your version before using these commands.
>
> Refer to: [Tutorial: Test the New Web API (OpenAPI) in Access Server 3.0](https://openvpn.net/as-docs/v3/tutorials/tutorial--test-the-new-web-api--openapi--in-access-server-3-0.md).

### Placeholder values used in this tutorial

Replace the following placeholder with the value for your environment:

| **Placeholder** | **Description** |
| --- | --- |
| `<SUBSCRIPTION_KEY>` | Your subscription license key. |

## Step 1: Copy your subscription license key

1. Sign in to the [Access Server portal](https://myaccount.openvpn.com/signin/as).
2. Select **Subscriptions**.
3. Copy the activation key for the target subscription.

## Step 2: Validate your subscription license key

1. Connect to the console and get root privileges.
2. Run the following command to retrieve the details and status of your subscription license key:

   ```
   sacli --method POST --url 'api/license/subscription/test' --value '{"subscription": "<SUBSCRIPTION_KEY>"}' apicall
   ```

## Step 3: Activate your subscription license key

1. Connect to the console and get root privileges.
2. Run the following command to activate your subscription license key:

   ```
   sacli --method POST --url 'api/license/subscription' --value '{"subscription": "<SUBSCRIPTION_KEY>"}' apicall
   ```

## Step 4: Check your subscription license key status

1. Connect to the console and get root privileges.
2. Run the following command to check the license status of the activated subscription on your Access Server:

   ```
   sacli --method GET --url 'api/license/info' --value '' apicall
   ```

## Step 5: Remove a subscription license key

1. Connect to the console and get root privileges.
2. Run the following command to remove the subscription license currently activated on your Access Server:

   ```
   sacli --method DELETE --url 'api/license/subscription' --value '' apicall
   ```

   > **Tip**
   >
   > This removes the subscription license from your Access Server only. It doesn't delete the subscription or affect any recurring charges. The subscription license remains active in the Access Server portal.

---

Prev: [Tutorial: Activate a Subscription License Key Using the Command-line Interface](https://openvpn.net/as-docs/v3/tutorials/tutorial--activate-subscription-license-cli.md)
Next: [Fixed License Activation](https://openvpn.net/as-docs/v3/tutorials/fixed-license-activation.md)
Index: https://openvpn.net/as-docs/llms.txt
