api.video
  1. Videos - Delegated upload
api.video
  • Account
    • Show account
      GET
  • Analytics
    • List live stream player sessions
      GET
    • List player session events
      GET
    • List video player sessions
      GET
  • Authentication
    • Authenticate
      POST
    • Refresh token
      POST
  • Live
    • List all live streams
      GET
    • Create live stream
      POST
    • Delete a live stream
      DELETE
    • Show live stream
      GET
    • Update a live stream
      PATCH
    • Delete a thumbnail
      DELETE
    • Upload a thumbnail
      POST
  • Players
    • List all players
      GET
    • Create a player
      POST
    • Delete a player
      DELETE
    • Show a player
      GET
    • Update a player
      PATCH
    • Delete logo
      DELETE
    • Upload a logo
      POST
  • Videos - Delegated upload
    • Upload with an upload token
      POST
    • List all active upload tokens.
      GET
    • Generate an upload token
      POST
    • Delete an upload token
      DELETE
    • Show upload token
      GET
  • Videos
    • List all videos
    • Create a video
    • Delete a video
    • Show a video
    • Update a video
    • Upload a video
    • Show video status
    • Pick a thumbnail
    • Upload a thumbnail
  • Captions
    • List video captions
    • Delete a caption
    • Show a caption
    • Update caption
    • Upload a caption
  • Chapters
    • List video chapters
    • Delete a chapter
    • Show a chapter
    • Upload a chapter
  • Webhooks
    • List all webhooks
    • Create Webhook
    • Delete a Webhook
    • Show Webhook details
  1. Videos - Delegated upload

Generate an upload token

POST
/upload-tokens
Videos - Delegated upload
Use this endpoint to generate an upload token. You can use this token to authenticate video uploads while keeping your API key safe. Tutorials using delegated upload.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://ws.api.video/upload-tokens' \
--header 'Content-Type: application/json' \
--data-raw '{
    "ttl": 3600
}'
Response Response Example
200 - response
{
  "createdAt": "2020-12-02T10:13:19.000Z",
  "expiresAt": "2020-12-02T11:13:19.000Z",
  "token": "to1tcmSFHeYY5KzyhOqVKMKb",
  "ttl": 3600
}

Request

Body Params application/json
ttl
integer 
optional
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.
>= 0<= 2147483647
Default:
0
Examples

Responses

🟢200Success
application/json
Body
createdAt
string <date-time>
optional
When the token was created, displayed in ISO-8601 format.
Example:
2019-12-16T08:25:51.000Z
expiresAt
string <date-time>
optional
When the token expires, displayed in ISO-8601 format.
Example:
2019-12-16T09:25:51.000Z
token
string 
optional
The unique identifier for the token you will use to authenticate an upload.
Example:
to1tcmSFHeYY5KzyhOqVKMKb
ttl
integer 
optional
Time-to-live - how long the upload token is valid for.
>= 0<= 2147483647
🟠400Bad Request
Modified at 2023-08-15 05:52:15
Previous
List all active upload tokens.
Next
Delete an upload token
Built with