---
title: "Create token"
method: POST
path: "/token"
tags: ["Token"]
---

# Create token

`POST /token`

## Request

- Base URL: `https://go.netlicensing.io/core/v2/rest`
- URL: `https://go.netlicensing.io/core/v2/rest/token`
- Auth: HTTP basic

Create token by 'tokenType' and additional token parameters

## Request body `application/x-www-form-urlencoded`

- object
  - `tokenType` 'DEFAULT' | 'SHOP' | 'APIKEY', required: Token type to be generated
  - `apiKeyRole` 'ROLE_APIKEY_LICENSEE' | 'ROLE_APIKEY_ANALYTICS' | 'ROLE_APIKEY_OPERATION' | 'ROLE_APIKEY_MAINTENANCE' | 'ROLE_APIKEY_ADMIN': For <i>tokenType=APIKEY</i> only (default: ROLE_APIKEY_LICENSEE); defines token RoleID
  - `type` 'ACTION': For <i>tokenType=DEFAULT</i> only; action type to be set
  - `action` 'licenseeLogin': For <i>type=ACTION</i> only; defines token action to be perfromed
  - `licenseeNumber` string: For <i>tokenType=SHOP</i> or <i>type=ACTION</i> only (mandatory); identifies Licensee that will be assigned to the shop token
  - `privateKey` string: For <i>tokenType=APIKEY</i> only (optional); defines PrivateKey to be used with the validate method<br/><strong>Please Note:</strong> PrivateKey need to be provided as one line without spaces
  - `productNumber` string: For <i>tokenType=SHOP</i> only (mandatory); identifies Product that will be assigned to the shop token
  - `licenseTemplateNumber` string: For <i>tokenType=SHOP</i> only; identifies LicenseTemplate that will be assigned to the shop token
  - `predefinedShoppingItem` string: For <i>tokenType=SHOP</i> only; identifies Shopping Item name that will be shown to the customer
  - `successURL` string: For <i>tokenType=SHOP</i> only; take customers to this URL when they finish checkout
  - `successURLTitle` string: For <i>tokenType=SHOP</i> only; shop link title for successful checkout process
  - `cancelURL` string: For <i>tokenType=SHOP</i> only; take customers to this URL when they cancel their checkout
  - `cancelURLTitle` string: For <i>tokenType=SHOP</i> only; shop link title for cancel checkout process

## Response `200`

Successful request

- Netlicensing
  - `infos` Infos
  - `items` Items

## Other responses

- `400`: Malformed or illegal request
- `403`: Access is denied
- `404`: Resource not found
- `500`: Internal service error

## Changes

- **2026-07-13** `32bb94715eca`: 2 info
  - the endpoint scheme security `basicAuth` was added to the API
  - the endpoint scheme security `basicAuth AND api_key` was removed from the API

[Operation history](https://skmtc.dev/labs64/apis/labs64-netlicensing-restful-api-test-center/changes/token/post.md)

---

[API](https://skmtc.dev/labs64/apis/labs64-netlicensing-restful-api-test-center.md) - [All operations](https://skmtc.dev/labs64/apis/labs64-netlicensing-restful-api-test-center/llms.txt) - [OpenAPI document](https://skmtc.dev/labs64/apis/labs64-netlicensing-restful-api-test-center/revisions/32bb94715eca?raw)
