Retrieve token details

This guide walks through using one of's clients to retrieve a token from the upload tokens endpoint.

Choose an client

The clients offered by include:


To install your selected client, do the following:

go get
composer require api-video/php-api-client
npm install --save

...or with yarn: 
yarn add
pip install
Using Nuget
Install-Package ApiVideo

Retrieve token details

You need to have your token ID so that you can retrieve information about your specific token.

package main

import (
    apivideosdk ""

func main() {
    client := apivideosdk.ClientBuilder("YOUR_API_TOKEN").Build()
    // if you rather like to use the sandbox environment:
    // client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_TOKEN").Build()
    uploadToken := "to1tcmSFHeYY5KzyhOqVKMKb" // string | The unique identifier for the token you want information about.

    res, err := client.UploadTokens.GetToken(uploadToken)

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UploadTokens.GetToken``: %v\n", err)
    // response from `GetToken`: UploadToken
    fmt.Fprintf(os.Stdout, "Response from `UploadTokens.GetToken`: %v\n", res)

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', '', [
  'body' => '{"ttl":0}',
  'headers' => [
    'Accept' => 'application/json',
    'Authorization' => 'Bearer a',
    'Content-Type' => 'application/json',

echo $response->getBody();
const ApiVideoClient = require('');

(async () => {
    try {
        const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" });

        const uploadToken = 'to1tcmSFHeYY5KzyhOqVKMKb'; // The unique identifier for the token you want information about.

        // UploadToken
        const result = await client.uploadTokens.getToken(uploadToken);
    } catch (e) {
# Get information about a single token using the token ID
import apivideo
from apivideo.apis import UploadTokensApi
from apivideo.exceptions import ApiAuthException

# Set variables
api_key = "your api key here"
token = "your token ID here"

# Set up the client
client = apivideo.AuthenticatedApiClient(api_key)

# If you'd rather use the sandbox environment:
# client = apivideo.AuthenticatedApiClient(api_key, production=False)


tokens_api = UploadTokensApi(client)

# Send your request to retrieve information about a specific token
response = tokens_api.get_token(token)
using System.Diagnostics;
using ApiVideo.Client;

namespace Example
    public class createTokenExample
        public static void Main()
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var tokenCreationPayload = new TokenCreationPayload(); // TokenCreationPayload | 
            var apiUploadTokensInstance = apiInstance.UploadTokens();
                // Generate an upload token
                UploadToken result = apiUploadTokensInstance.createToken(tokenCreationPayload);
            catch (ApiException  e)
                Debug.Print("Exception when calling UploadTokensApi.createToken: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);


After you've checked that your token is configured the way you want, you can proceed with delegated uploads!

Did this page help you?