Retrieve HeyGen API accounts configuration
July 4, 2025
Table of contents
For your convenience, you can specify your HeyGen configuration values under your HeyGen account. If you specify multiple HeyGen accounts, the API will automatically perform load balancing by randomly selecting an account with available capacity before making calls to HeyGen.
This endpoint retrieves the complete list of configured API accounts for HeyGen.
https://api.useapi.net/v1/heygen/accounts
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
API token
is required, see Setup useapi.net for details.
Responses
-
{ "<email #1>": { "email": "<email #1>", "session": { "heygen_session": "…secured…", "ExpireTime": 1720123456789, "ExpireTimeUTC": "2024-07-04T12:30:45.789Z", "access_token": "…secured…", "session_token": "…secured…", "space_id": "space_abc123", "token": "…secured…", "username": "<email #1>", "ack_agreement": true, "internal": false, "need_mfa": false }, "maxJobs": 5, "password": "…secured…" }, "<email #2>": { "email": "<email #2>", "session": { "heygen_session": "…secured…", "ExpireTime": 1720123456789, "ExpireTimeUTC": "2024-07-04T12:30:45.789Z", "access_token": "…secured…", "session_token": "…secured…", "space_id": "space_def456", "token": "…secured…", "username": "<email #2>", "ack_agreement": true, "internal": false, "need_mfa": false }, "maxJobs": 3, "password": "…secured…" } }
-
{ "error": "Unauthorized", "code": 401 }
-
Configuration not found. To create configuration use POST /accounts.
Model
{ // TypeScript, all fields are optional
[email: string]: {
email: string
session: {
heygen_session: string
ExpireTime: number
ExpireTimeUTC: string
access_token: string
session_token: string
space_id: string
token: string
username: string
ack_agreement: boolean
internal: boolean
need_mfa: boolean
}
maxJobs: number
password: string
}
}
Examples
-
curl https://api.useapi.net/v1/heygen/accounts \ -H "Accept: application/json" \ -H "Authorization: Bearer …"
-
const token = "API token"; const apiUrl = "https://api.useapi.net/v1/heygen/accounts"; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result});
-
import requests token = "API token" apiUrl = "https://api.useapi.net/v1/heygen/accounts" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json())