# GetLicenseKey

Retrieve license key by license key name

`GET /api/v2/accounts/{id}/licensekey/{licensekeyname}`

**API:** AvaTax API
**Tag:** Accounts
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Accepts:** `application/json`
**Authentication:** API Key (`Authorization` in header) or OAuth 2.0 or Basic (username + license key)

Source: https://developer.avalara.com/products/crossborder/api/methods/Accounts/GetLicenseKey/

## Description

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, Registrar, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `id` | integer | path | Yes | The ID of the account to retrieve |
| `licensekeyname` | string | path | Yes | The license key name to be retrieved |
| `X-Avalara-Client` | string | header | No | Identifies the software you are using to call this API.  For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success | `AccountLicenseKeyModel` |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

### 200 Response: `AccountLicenseKeyModel`

An account user who is permitted to use AvaTax.

| Property | Type | Required | Description |
|---|---|---|---|
| `name` | string | **Yes** | The unique name for license key per account Example: `ABCDEFGHIJK`. |
| `accountId` | integer | **Yes** | AccountId for required license key Example: `123456789`. |
| `createdDate` | string | No | The date when this record was created. Example: `2026-07-02T00:00:00+00:00`. |
| `createdUserId` | integer | No | The user id for the user who created this record. Example: `1`. |
| `modifiedDate` | string | No | The date/time when this record was last modified. Example: `2026-07-02T00:00:00+00:00`. |
| `modifiedUserId` | integer | No | The user id of user who last modified this record. Example: `1`. |

## Example Request

```bash
curl -X GET "https://sandbox-rest.avatax.com/api/v2/accounts/{id}/licensekey/{licensekeyname}" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```