Create Vimeo Connection
curl --request POST \
--url https://api.pictory.ai/pictoryapis/v1/vimeo-connections \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"enabled": true,
"clientIdentifier": "<string>",
"clientSecret": "<string>",
"accessToken": "<string>"
}
'import requests
url = "https://api.pictory.ai/pictoryapis/v1/vimeo-connections"
payload = {
"name": "<string>",
"description": "<string>",
"enabled": True,
"clientIdentifier": "<string>",
"clientSecret": "<string>",
"accessToken": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
enabled: true,
clientIdentifier: '<string>',
clientSecret: '<string>',
accessToken: '<string>'
})
};
fetch('https://api.pictory.ai/pictoryapis/v1/vimeo-connections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pictory.ai/pictoryapis/v1/vimeo-connections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'enabled' => true,
'clientIdentifier' => '<string>',
'clientSecret' => '<string>',
'accessToken' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pictory.ai/pictoryapis/v1/vimeo-connections"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"clientIdentifier\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"accessToken\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pictory.ai/pictoryapis/v1/vimeo-connections")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"clientIdentifier\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"accessToken\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pictory.ai/pictoryapis/v1/vimeo-connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"clientIdentifier\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"accessToken\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "Test Vimeo Connection",
"description": "Testing Vimeo connection via API",
"enabled": true,
"clientIdentifier": "test_client_id_123",
"connectionId": "20251222155613307xv0nodhitf9cd0f",
"version": 1
}
{
"code": "DUPLICATE_CONNECTION",
"message": "Connection with same name already exist.",
"fields": []
}
{
"code": "INVALID_REQUEST_BODY",
"message": "Request body validation failed.",
"fields": [
{
"name": "name",
"errors": "name is required"
}
]
}
{
"message": "Unauthorized"
}
{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}
Vimeo Integration
Create Vimeo Connection
Connect your Vimeo account to enable automatic video uploads
POST
/
pictoryapis
/
v1
/
vimeo-connections
Create Vimeo Connection
curl --request POST \
--url https://api.pictory.ai/pictoryapis/v1/vimeo-connections \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"enabled": true,
"clientIdentifier": "<string>",
"clientSecret": "<string>",
"accessToken": "<string>"
}
'import requests
url = "https://api.pictory.ai/pictoryapis/v1/vimeo-connections"
payload = {
"name": "<string>",
"description": "<string>",
"enabled": True,
"clientIdentifier": "<string>",
"clientSecret": "<string>",
"accessToken": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
enabled: true,
clientIdentifier: '<string>',
clientSecret: '<string>',
accessToken: '<string>'
})
};
fetch('https://api.pictory.ai/pictoryapis/v1/vimeo-connections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pictory.ai/pictoryapis/v1/vimeo-connections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'enabled' => true,
'clientIdentifier' => '<string>',
'clientSecret' => '<string>',
'accessToken' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pictory.ai/pictoryapis/v1/vimeo-connections"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"clientIdentifier\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"accessToken\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pictory.ai/pictoryapis/v1/vimeo-connections")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"clientIdentifier\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"accessToken\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pictory.ai/pictoryapis/v1/vimeo-connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"clientIdentifier\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"accessToken\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "Test Vimeo Connection",
"description": "Testing Vimeo connection via API",
"enabled": true,
"clientIdentifier": "test_client_id_123",
"connectionId": "20251222155613307xv0nodhitf9cd0f",
"version": 1
}
{
"code": "DUPLICATE_CONNECTION",
"message": "Connection with same name already exist.",
"fields": []
}
{
"code": "INVALID_REQUEST_BODY",
"message": "Request body validation failed.",
"fields": [
{
"name": "name",
"errors": "name is required"
}
]
}
{
"message": "Unauthorized"
}
{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}
Overview
Create a new Vimeo connection using your authentication credentials and configuration. Each connection name must be unique within your account. For security, sensitive credentials (client secret and access token) are securely stored and never returned in subsequent API responses.You need a valid API key and Vimeo developer credentials to use this endpoint. Get your API key from the API Access page in your Pictory dashboard.
API Endpoint
POST https://api.pictory.ai/pictoryapis/v1/vimeo-connections
Request Parameters
Headers
string
required
API key for authentication (starts with
pictai_)Authorization: YOUR_API_KEY
Body Parameters
string
required
Display name for the Vimeo connection. Must be unique within your account and can only contain letters, numbers, spaces, underscores, and hyphens.Maximum length: 100 charactersExample:
"My Vimeo Account"string
Optional description explaining the connection’s purpose or usage.Maximum length: 250 charactersExample:
"Primary Vimeo account for marketing videos"boolean
default:"true"
required
Whether the connection should be active immediately after creation. Set to
true to enable, or false to create in a disabled state.Example: truestring
required
Vimeo application Client ID from your Vimeo app settings. This identifies your application to Vimeo’s API.Maximum length: 500 charactersExample:
"abc123def456ghi789jkl012"string
required
Vimeo application client secret from your app settings. Keep this confidential and never expose it in client-side code.Maximum length: 500 charactersExample:
"xyz789abc123def456ghi789"string
required
Vimeo access token that grants your application permission to access Vimeo resources. Obtain this through Vimeo’s OAuth flow or from your app settings.Maximum length: 500 charactersExample:
"1234567890abcdef1234567890abcdef"Response
Returns the created Vimeo connection object including theconnectionId, name, description, enabled status, and version number. For security, sensitive credentials (clientSecret and accessToken) are never returned in API responses - you will only see the clientIdentifier.
Response Examples
{
"name": "Test Vimeo Connection",
"description": "Testing Vimeo connection via API",
"enabled": true,
"clientIdentifier": "test_client_id_123",
"connectionId": "20251222155613307xv0nodhitf9cd0f",
"version": 1
}
{
"code": "DUPLICATE_CONNECTION",
"message": "Connection with same name already exist.",
"fields": []
}
{
"code": "INVALID_REQUEST_BODY",
"message": "Request body validation failed.",
"fields": [
{
"name": "name",
"errors": "name is required"
}
]
}
{
"message": "Unauthorized"
}
{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}
Code Examples
Replace
YOUR_API_KEY with your actual API key that starts with pictai_# Create a new Vimeo connection
# Replace YOUR_API_KEY with your actual API key
curl --request POST \
--url https://api.pictory.ai/pictoryapis/v1/vimeo-connections \
--header 'Authorization: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"name": "My Vimeo Account",
"description": "Primary Vimeo account for marketing videos",
"enabled": true,
"clientIdentifier": "abc123def456ghi789jkl012",
"clientSecret": "xyz789abc123def456ghi789",
"accessToken": "1234567890abcdef1234567890abcdef"
}' | python -m json.tool
// Replace 'YOUR_API_KEY' with your actual API key
const createVimeoConnection = async (apiKey, connectionData) => {
const response = await fetch('https://api.pictory.ai/pictoryapis/v1/vimeo-connections', {
method: 'POST',
headers: {
'Authorization': `${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(connectionData)
});
if (!response.ok) {
const error = await response.json();
throw new Error(`Failed: ${error.message}`);
}
return await response.json();
};
// Usage
try {
const connectionData = {
name: 'My Vimeo Account',
description: 'Primary Vimeo account for marketing videos',
enabled: true,
clientIdentifier: 'abc123def456ghi789jkl012',
clientSecret: 'xyz789abc123def456ghi789',
accessToken: '1234567890abcdef1234567890abcdef'
};
const result = await createVimeoConnection('YOUR_API_KEY', connectionData);
console.log('Connection Created:', result);
console.log('Connection ID:', result.connectionId);
} catch (error) {
console.error('Error:', error.message);
}
# Replace 'YOUR_API_KEY' with your actual API key
import requests
def create_vimeo_connection(api_key, connection_data):
"""Create a new Vimeo connection"""
url = "https://api.pictory.ai/pictoryapis/v1/vimeo-connections"
headers = {
"Authorization": api_key,
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers, json=connection_data)
response.raise_for_status()
return response.json()
# Usage
try:
connection_data = {
"name": "My Vimeo Account",
"description": "Primary Vimeo account for marketing videos",
"enabled": True,
"clientIdentifier": "abc123def456ghi789jkl012",
"clientSecret": "xyz789abc123def456ghi789",
"accessToken": "1234567890abcdef1234567890abcdef"
}
result = create_vimeo_connection("YOUR_API_KEY", connection_data)
print(f"Connection Created: {result}")
print(f"Connection ID: {result['connectionId']}")
except requests.exceptions.HTTPError as e:
error = e.response.json()
print(f"Error: {error.get('message', 'Request failed')}")
<?php
// Replace 'YOUR_API_KEY' with your actual API key
function createVimeoConnection($apiKey, $connectionData) {
$url = 'https://api.pictory.ai/pictoryapis/v1/vimeo-connections';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($connectionData));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode !== 201) {
$error = json_decode($response, true);
throw new Exception($error['message'] ?? 'Request failed');
}
return json_decode($response, true);
}
// Usage
try {
$connectionData = [
'name' => 'My Vimeo Account',
'description' => 'Primary Vimeo account for marketing videos',
'enabled' => true,
'clientIdentifier' => 'abc123def456ghi789jkl012',
'clientSecret' => 'xyz789abc123def456ghi789',
'accessToken' => '1234567890abcdef1234567890abcdef'
];
$result = createVimeoConnection('YOUR_API_KEY', $connectionData);
echo "Connection Created:\n";
print_r($result);
echo "Connection ID: " . $result['connectionId'] . "\n";
} catch (Exception $e) {
echo "Error: " . $e->getMessage() . "\n";
}
?>
// Replace "YOUR_API_KEY" with your actual API key
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
type VimeoConnectionRequest struct {
Name string `json:"name"`
Description string `json:"description"`
Enabled bool `json:"enabled"`
ClientIdentifier string `json:"clientIdentifier"`
ClientSecret string `json:"clientSecret"`
AccessToken string `json:"accessToken"`
}
type VimeoConnectionResponse struct {
ConnectionID string `json:"connectionId"`
Name string `json:"name"`
Description string `json:"description"`
ClientIdentifier string `json:"clientIdentifier"`
Enabled bool `json:"enabled"`
Version int `json:"version"`
}
func createVimeoConnection(apiKey string, connectionData VimeoConnectionRequest) (*VimeoConnectionResponse, error) {
url := "https://api.pictory.ai/pictoryapis/v1/vimeo-connections"
jsonData, err := json.Marshal(connectionData)
if err != nil {
return nil, err
}
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
if err != nil {
return nil, err
}
req.Header.Set("Authorization", apiKey)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}
if resp.StatusCode != http.StatusCreated {
return nil, fmt.Errorf("request failed (status %d): %s", resp.StatusCode, string(body))
}
var result VimeoConnectionResponse
if err := json.Unmarshal(body, &result); err != nil {
return nil, err
}
return &result, nil
}
// Usage
func main() {
connectionData := VimeoConnectionRequest{
Name: "My Vimeo Account",
Description: "Primary Vimeo account for marketing videos",
Enabled: true,
ClientIdentifier: "abc123def456ghi789jkl012",
ClientSecret: "xyz789abc123def456ghi789",
AccessToken: "1234567890abcdef1234567890abcdef",
}
result, err := createVimeoConnection("YOUR_API_KEY", connectionData)
if err != nil {
panic(err)
}
fmt.Printf("Connection Created: %+v\n", result)
fmt.Printf("Connection ID: %s\n", result.ConnectionID)
}
Error Handling
400 Bad Request - Duplicate Connection Name
400 Bad Request - Duplicate Connection Name
Cause: A connection with the same name already exists in your accountSolution:
- Choose a unique name for your connection
- Use the Get Vimeo Connections endpoint to see existing connection names
- Or update the existing connection using the Update Vimeo Connection endpoint
400 Bad Request - Validation Error
400 Bad Request - Validation Error
Cause: Required fields are missing or field values do not meet validation requirementsSolution:
- Ensure all required fields are included:
name,enabled,clientIdentifier,clientSecret,accessToken - Verify field values do not exceed maximum lengths:
name: 100 characters maxdescription: 250 characters maxclientIdentifier,clientSecret,accessToken: 500 characters max
- Check that
nameonly contains letters, numbers, spaces, underscores, and hyphens - Verify the request body is valid JSON
401 Unauthorized
401 Unauthorized
Cause: Invalid or missing API keySolution:
- Verify your API key is correct and starts with
pictai_ - Check the
Authorizationheader is properly formatted:YOUR_API_KEY - Ensure your API key hasn’t expired
- Get a new API key from the API Access page
Invalid Vimeo Credentials
Invalid Vimeo Credentials
Cause: The Vimeo client identifier, client secret, or access token is invalidSolution:
- Verify your credentials in the Vimeo Developer Portal
- Ensure you are using the correct Client ID, Client Secret, and Access Token
- Check that your Vimeo app has the necessary permissions (video upload and management)
- Generate a new access token if the current one has expired
Prerequisites: Getting Vimeo Credentials
Before creating a Vimeo connection, you need to obtain credentials from Vimeo:1
Step 1: Create a Vimeo App
- Go to the Vimeo Developer Portal
- Sign in with your Vimeo account
- Click Create App or New App
- Fill in the required details (app name, description, etc.)
- Click Create App
2
Step 2: Get Your Credentials
- Once your app is created, you will see the app details page
- Note down the Client Identifier (Client ID)
- Note down the Client Secret (keep this secure!)
- Generate an Access Token with the required scopes:
video- Upload and manage videosprivate- Access private videos
3
Step 3: Configure Permissions
Make sure your Vimeo app has the necessary permissions enabled:
- Video upload
- Video management
- Account access
Keep Your Credentials Secure: Never expose your Client Secret or Access Token in client-side code or public repositories. These credentials provide full access to your Vimeo account.
Was this page helpful?
