HeyGen ACTION
Retrieve Video Link
Fetches a link for a specific heygen video. The link is only available once the video status is
completed. Works for any video ID, including videos created in the HeyGen web app. If you don't have the video ID, use the List Videos action first (note it may not list web-app videos). Example: Video ID v_123 returns {"data": {"id": "v_123", "status": "completed", "video_url": "https://..."}, "video_link": "https://..."}; while the video is still processing, video_link is null and data.status is processing (check again later). If generation failed, data.status is failed, video_link is null, and failure_code and failure_message explain why; the video will never complete, so do not keep polling. See the documentation- Action
- Read only
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's HeyGen account once, then configure and run Retrieve Video Link from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "heygen-retrieve-video-link",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
heygen: { authProvisionId: "apn_xxxxxxx" },
videoId: "Video ID",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "heygen-retrieve-video-link",
"configured_props": {
"heygen": { "authProvisionId": "apn_xxxxxxx" },
"videoId": "Video ID"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "heygen",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "heygen-retrieve-video-link",
arguments: {
videoId: "Video ID",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
videoId Video ID | string | Identifier of a specific heygen video. Use the List Videos action to find video IDs. Example: 276970c8cf104bf0bf8fdfd679ea899d Required |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- heygen-retrieve-video-link
- Version
- 1.0.0
- App
- HeyGen
- Authentication
- API key
- Read-only
- Yes
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗