-
Notifications
You must be signed in to change notification settings - Fork 1k
AVideo Platform API
- Enable the API plugin (Admin ➜ Plugins ➜ API ➜ Enable).
- Choose the endpoint style you prefer (legacy or simplified).
- Authenticate users (raw password, encoded password, or bearer token).
- Call the required endpoint (see the reference below).
- Handle the JSON response in your application.
Make sure the API plugin is active on your server.
- In the admin dashboard go to Plugins ➜ API ➜ Info to browse all resources.
- Demo site: https://demo.avideo.com/plugin/API/
Purpose | Legacy Format | Simplified Format (recommended) |
---|---|---|
Sign‑in | /plugin/API/get.json.php?APIName=signIn&user=admin&pass=123 |
/api/signIn?user=admin&pass=123 |
Any API | /plugin/API/get.json.php?APIName={name}&… |
/api/{name}?… |
Tip: To migrate, simply replace
…/plugin/API/get.json.php?APIName=
with…/api/
.
Send the plain password in the pass
parameter.
-
Generate an MD5 hash:
GET https://demo.avideo.com/objects/encryptPass.json.php?pass=123
-
Use the hash in
pass
and addencodedPass=true
.
If you generated an API secret, send it in the header:
Authorization: Bearer YOUR_API_SECRET
# Raw password
GET https://demo.avideo.com/api/signIn?user=admin&pass=123
# Encoded password
GET https://demo.avideo.com/api/signIn?user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true
<?php
/** Simple AVideo API login helper. */
session_start();
const API_BASE = 'https://demo.avideo.com/api/';
function signIn(string $user, string $pass): bool {
$url = API_BASE . 'signIn?user=' . urlencode($user) . '&pass=' . urlencode($pass);
$json = @file_get_contents($url);
$data = json_decode($json, true);
if (!empty($data['status']) && $data['status'] === '1') {
$_SESSION['user'] = $data;
return true;
}
return false;
}
function requireLogin(): void {
if (empty($_SESSION['user'])) {
header('Location: login.php');
exit;
}
}
?>
Use the Streamer API to upload videos from external systems.
Guide: https://github.com/WWBN/AVideo/wiki/Upload-videos-from-third-party-applications
GET https://demo.avideo.com/api/video?catName=default&rowCount=1
{
"error": false,
"response": {
"rows": [
{
"id": 7618408,
"title": "Live 24 hours",
"channelName": "MovieclipsTrailers",
"poster": "https://demo.avideo.com/plugin/Live/getImage.php?u=movieclips&format=jpg",
"link": "https://demo.avideo.com/live/0/MovieclipsTrailers",
"views_count": 0,
"duration": "Live",
"likes": 0,
"dislikes": 0
}
]
}
}
Track user engagement (watch time, last position, ad impressions, etc.) and push the data back via API.
A ready‑to‑fork React + Tailwind + Vite project that consumes the AVideo API.
GitHub: https://github.com/WWBN/AVideo-React-Sample
Key features:
- Video listing & playback
- API‑based login/logout
- Dark‑mode support & responsive UI
You must be logged in as an admin to view the live spec.
Demo credentials:user: admin
pass: 123
- Log in to the demo site: https://demo.avideo.com/
- Navigate to: https://demo.avideo.com/plugin/API/
- The page automatically loads the full OpenAPI 3.1 specification—endpoints, parameters, schemas, and example responses.
You can access the same documentation on any self‑hosted AVideo instance at:
https://YOUR‑DOMAIN/plugin/API/
Endpoint | Purpose |
---|---|
signIn |
Authenticate a user |
signUp |
Create an account |
video |
List videos |
videoAddView |
Register a view |
categories |
List categories |
encryptPass |
MD5 hash generator |
live |
List live streams |
search |
Search videos & channels |
user |
User profile data |
Refer to the OpenAPI 3.1 spec for complete details.
- API Plugin Wiki – https://github.com/WWBN/AVideo/wiki/API
- Upload Guide – https://github.com/WWBN/AVideo/wiki/Upload-videos-from-third-party-applications
- Statistics Guide – https://github.com/WWBN/AVideo/wiki/Developer-Guide:-Collecting-Video-and-Ad-Play-Statistics
Pull requests and issues are welcome. If you spot an error or want to extend the API, open a ticket or PR on GitHub.
Authored & maintained by [Daniel Neto](https://github.com/DanielnetoDotCom)