Upload Tokens
Download SpecList all active upload tokens
Retrieve a list of all currently active delegated tokens.
apiKey
sortBy
string
Allowed: createdAt, ttl. You can use these to sort by when a token was created, or how much longer the token will be active (ttl - time to live). Date and time is presented in ISO-8601 format.
- Enum
-
- createdAt
- ttl
- Example
- "ttl"
sortOrder
string
Allowed: asc, desc. Ascending is 0-9 or A-Z. Descending is 9-0 or Z-A.
- Enum
-
- asc
- desc
- Example
- "asc"
currentPage
int
Choose the number of search results to return per page. Minimum value: 1
- Default
- 1
- Example
- 2
pageSize
int
Results per page. Allowed values 1-100, default is 25.
- Default
- 25
- Example
- 30
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/UploadTokensApi.md#list
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/UploadTokensApi.md#list
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const uploadTokens = await client.uploadTokens.list();
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/UploadTokensApi.md#list
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique identifier for the token you want information about.
# example passing only required values which don't have defaults set
# Show upload token
=
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/UploadTokensApi.md#list
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/UploadTokensApi.md#list
import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.UploadTokensApi;
import java.util.*;
public class Example {
public static void main(String[] args) {
ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
// if you rather like to use the sandbox environment:
// ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);
UploadTokensApi apiInstance = client.uploadTokens();
String uploadToken = "to1tcmSFHeYY5KzyhOqVKMKb"; // The unique identifier for the token you want information about.
try {
UploadToken result = apiInstance.getToken(uploadToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UploadTokensApi#getToken");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getMessage());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/UploadTokensApi.md#list
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class getTokenExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var uploadToken = to1tcmSFHeYY5KzyhOqVKMKb; // string | The unique identifier for the token you want information about.
var apiUploadTokensInstance = apiInstance.UploadTokens();
try
{
// Show upload token
UploadToken result = apiUploadTokensInstance.getToken(uploadToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UploadTokensApi.getToken: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/UploadTokensAPI.md#list
Response
Success
data
array[object (UploadToken)]
required
UploadToken
object (UploadToken)
createdAt
string
date-time
When the token was created, displayed in ISO-8601 format.
- Example
- "2019-12-16T08:25:51.000Z"
expiresAt
string or null
date-time
When the token expires, displayed in ISO-8601 format.
- Example
- "2019-12-16T09:25:51.000Z"
token
string
The unique identifier for the token you will use to authenticate an upload.
- Example
- "to1tcmSFHeYY5KzyhOqVKMKb"
ttl
int
Time-to-live - how long the upload token is valid for.
- Min
- 0
- Max
- 2147483647
pagination
object (pagination)
required
- Example
- { "currentPage": 3, "currentPageItems": 20, "itemsTotal": 123, "links": { "first": { "rel": "first", "uri": "/videos/search?currentPage=1&pageSize=20" }, "last": { "rel": "last", "uri": "/videos/search?currentPage=6&pageSize=20" }, "next": { "rel": "next", "uri": "/videos/search?currentPage=4&pageSize=20" }, "previous": { "rel": "previous", "uri": "/videos/search?currentPage=2&pageSize=20" } }, "pageSize": 20, "pagesTotal": 7 }
currentPage
int
The current page index.
currentPageItems
int
The number of items on the current page.
itemsTotal
int
Total number of items that exist.
links
array[object (PaginationLink)]
required
PaginationLink
object (PaginationLink)
rel
string
uri
string
uri
pageSize
int
Maximum number of item per page.
pagesTotal
int
Number of items listed in the current page.
Generate an upload token
Generates an upload token that can be used to replace the API Key. More information can be found here
apiKey
ttl
int
Time in seconds that the token will be active. A value of 0 means that the token has no exipration date. The default is to have no expiration.
- Default
- 0
- Min
- 0
- Max
- 2147483647
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/UploadTokensApi.md#createToken
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/UploadTokensApi.md#createToken
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const tokenCreationPayload = {
ttl: 56, // Time in seconds that the token will be active. A value of 0 means that the token has no expiration date. The default is to have no expiration.
};
const uploadToken = await client.uploadTokens.createToken(tokenCreationPayload);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/UploadTokensApi.md#createToken
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # TokenCreationPayload |
# example passing only required values which don't have defaults set
# Generate an upload token
=
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/UploadTokensApi.md#createToken
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/UploadTokensApi.md#createToken
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();
try
{
// Generate an upload token
UploadToken result = apiUploadTokensInstance.createToken(tokenCreationPayload);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UploadTokensApi.createToken: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/UploadTokensAPI.md#createToken
Response
Success
Bad Request
createdAt
string
date-time
When the token was created, displayed in ISO-8601 format.
- Example
- "2019-12-16T08:25:51.000Z"
expiresAt
string or null
date-time
When the token expires, displayed in ISO-8601 format.
- Example
- "2019-12-16T09:25:51.000Z"
token
string
The unique identifier for the token you will use to authenticate an upload.
- Example
- "to1tcmSFHeYY5KzyhOqVKMKb"
ttl
int
Time-to-live - how long the upload token is valid for.
- Min
- 0
- Max
- 2147483647
name
string
The name of the parameter that caused the error.
problems
array[object (BadRequest)]
Returns any additional problems in the request in an array of objects.
BadRequest
object (BadRequest)
name
string
The name of the parameter that caused the error.
status
int
The HTTP status code.
title
string
A description of the error that occurred.
type
string
A link to the error documentation.
status
int
The HTTP status code.
title
string
A description of the error that occurred.
type
string
A link to the error documentation.
Retrieve upload token
Retrieve details about a specific upload token by id.
apiKey
uploadToken
string
required
The unique identifier for the token you want information about.
- Example
- "to1tcmSFHeYY5KzyhOqVKMKb"
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/UploadTokensApi.md#getToken
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/UploadTokensApi.md#getToken
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const uploadTokenId = 'to1tcmSFHeYY5KzyhOqVKMKb'; // The unique identifier for the token you want information about.
const uploadToken = await client.uploadTokens.getToken(uploadTokenId);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/UploadTokensApi.md#getToken
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique identifier for the token you want information about.
# example passing only required values which don't have defaults set
# Show upload token
=
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/UploadTokensApi.md#getToken
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/UploadTokensApi.md#getToken
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class getTokenExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var uploadToken = to1tcmSFHeYY5KzyhOqVKMKb; // string | The unique identifier for the token you want information about.
var apiUploadTokensInstance = apiInstance.UploadTokens();
try
{
// Show upload token
UploadToken result = apiUploadTokensInstance.getToken(uploadToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UploadTokensApi.getToken: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/UploadTokensAPI.md#getToken
Response
Success
Not Found
createdAt
string
date-time
When the token was created, displayed in ISO-8601 format.
- Example
- "2019-12-16T08:25:51.000Z"
expiresAt
string or null
date-time
When the token expires, displayed in ISO-8601 format.
- Example
- "2019-12-16T09:25:51.000Z"
token
string
The unique identifier for the token you will use to authenticate an upload.
- Example
- "to1tcmSFHeYY5KzyhOqVKMKb"
ttl
int
Time-to-live - how long the upload token is valid for.
- Min
- 0
- Max
- 2147483647
name
string
status
int
title
string
type
string
Delete an upload token
Delete an existing upload token. This is especially useful for tokens you may have created that do not expire.
apiKey
uploadToken
string
required
The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication.
- Example
- "to1tcmSFHeYY5KzyhOqVKMKb"
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/UploadTokensApi.md#deleteToken
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/UploadTokensApi.md#deleteToken
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const uploadToken = 'to1tcmSFHeYY5KzyhOqVKMKb'; // The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication.
await client.uploadTokens.deleteToken(uploadToken);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/UploadTokensApi.md#deleteToken
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication.
# example passing only required values which don't have defaults set
# Delete an upload token
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/UploadTokensApi.md#deleteToken
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/UploadTokensApi.md#deleteToken
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class deleteTokenExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var uploadToken = to1tcmSFHeYY5KzyhOqVKMKb; // string | The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication.
var apiUploadTokensInstance = apiInstance.UploadTokens();
try
{
// Delete an upload token
apiUploadTokensInstance.deleteToken(uploadToken);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UploadTokensApi.deleteToken: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/UploadTokensAPI.md#deleteToken
Response
No Content
Empty response
Not Found
No schema
name
string
status
int
title
string
type
string
Was this page helpful?