---
title: "Creates a new token."
method: POST
path: "/2/vod/shares/{share}/token"
tags: ["V3 > Share"]
---

# Creates a new token.

`POST /2/vod/shares/{share}/token`

Creates a new token associated with the provided share based on the provided parameters..

## Path parameters

- `share` string, required

## Headers

- `X-Ik-Token-Enforce-Ip` boolean — Extra header to pass if `ip_address` should be used, if this header isn't passed, the `ip_address` field will be ignored.

## Request body

- object
  - `allowed_domains` string[], nullable — List of allowed domains for the Token
  - `expires_at` string, nullable — a simple string
  - `ip_address` string, nullable — Valid ipv4 or ipv6 address address
  - `payload` string, nullable — a simple string
  - `restricted_domains` string[], nullable — List of restricted domain names for the Token
  - `salt` string, nullable — a simple string
  - `session` string, nullable — a simple string
  - `starts_at` string, nullable — a simple string
  - `strategy` string, required — the playback strategy to enforce protection for<note><strong>hls</strong>: Apple HTTP Live Streaming</note><note><strong>dash</strong>: Dynamic Adaptive Streaming over HTTP</note><note><strong>single</strong>: Single bitrate</note><note><strong>best</strong>: Playback strategy selecting the best available quality dynamically</note>
  - `window` integer, nullable — The Token validity duration (in seconds)

## Response `200`

OK

- object
  - `result` 'success' | 'error' | 'asynchronous', required — Result of the HTTP request
  - `data` string

---

[API](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools.md) · [All operations](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/infomaniak/api-reference-developer-tools/revisions/667aae28fec6/schema)
