REST API

The Visolix Video Downloader plugin provides external REST API access for video downloading functionality when the REST API feature is enabled in the plugin settings. This documentation covers the conditional API endpoints that require REST API activation.

Base URL

All API endpoints are prefixed with:

/wp-json/visolix/api/

Prerequisites

To use these endpoints, you must:

  1. Enable REST API in plugin settings: WordPress Admin → Visolix Video Downloader → Settings → REST API

  2. Set an API key in the plugin settings

  3. Have an active plugin license

Authentication

All external API endpoints require API key authentication:

  • Parameter: key=your_api_key (required)

The API key can be configured in the plugin settings under "REST API Settings".

Endpoints

1. Get Video Data

Endpoint: POST /wp-json/visolix/api/video-data

Retrieves raw video metadata and available download options for a given URL. This endpoint provides structured data about videos without initiating the actual download process.

Parameters

Parameter
Type
Required
Description

url

string

Yes

The video URL to analyze (must be a valid URL)

format

string

Conditional

Required only for YouTube URLs. Specifies the desired format/quality. See format options below.

key

string

Yes

API key for authentication

Format Options (YouTube Only)

When the URL is from YouTube, you must specify a format parameter. Available options:

Audio Formats:

  • mp3 - MP3 audio

  • m4a - M4A audio

  • webm_audio - WebM audio

  • aac - AAC audio

  • flac - FLAC audio

  • opus - Opus audio

  • ogg - OGG audio

  • wav - WAV audio

Video Formats:

  • 360 - MP4 (360p)

  • 480 - MP4 (480p)

  • 720 - MP4 (720p) [Default]

  • 1080 - MP4 (1080p)

  • 1440 - MP4 (1440p)

  • 2160 - WebM (4K)

Request Example

Note: The format parameter is required only for YouTube URLs. For other platforms (Instagram, Facebook, TikTok, etc.), omit the format parameter.

Response

Content Response Example:

Youtube Content Response Example::

Error Response (400/403/500):

Format Required Error (for YouTube URLs):

2. Progress Check

Endpoint: POST /wp-json/visolix/api/progress-check

Checks the progress of an ongoing YouTube video download process using a progress ID. This endpoint is specifically designed for YouTube downloads and provides real-time progress updates.

Parameters

Parameter
Type
Required
Description

id

string

Yes

Download progress ID (non-empty string)

key

string

Yes

API key for authentication

Request Example

Response

In Progress Response:

Download Complete Response:

Error Response (400/403/500):

Note: Progress value ranges from 0-1000 where 1000 represents 100% completion.

Error Codes

HTTP Status
Error Code
Description

400

missing_captcha

CAPTCHA response is required but missing

400

invalid_captcha_service

Invalid CAPTCHA service configured

400

captcha_failed

CAPTCHA verification failed

400

missing_required_parameters

Required parameters are missing

403

rest_api_disabled

REST API is disabled in settings

403

license_inactive

Plugin license is not active

500

internal_error

Internal server error

Supported Platforms

The API supports video downloads from the following platforms:

  • YouTube

  • Instagram

  • Facebook

  • TikTok

  • Snapchat

  • Telegram

  • ShareChat

  • Odnoklassniki (OK.ru)

  • Moj

Configuration

To enable REST API access:

  1. Go to WordPress Admin → Visolix Video Downloader → Settings

  2. Enable "REST API" option

  3. Set your API key

  4. Configure CAPTCHA if desired

  5. Save settings

Examples

cURL Example - Get Video Data

cURL Example - Check Download Progress

PHP Example - Get Video Data

PHP Example - Check Download Progress

JavaScript Example - Get Video Data

JavaScript Example - Check Download Progress

Troubleshooting

Common Issues

  1. 403 Forbidden: Check if REST API is enabled and license is active

  2. Invalid API Key: Verify your API key in plugin settings

For more information or support, please visit the Visolixarrow-up-right or contact support.

Last updated