API Overview
The XPola API provides a secure method for encrypting and decrypting XPola player configuration data. You can build complex player configurations with headers, DRM, options, and more, then encrypt them for secure distribution.
Build Configuration
Create your player configuration using the available parameters like URL, headers, DRM, and options.
Format as Base64
Convert your configuration to base64 format for encryption.
Encrypt with API
Use the encryption API to convert your base64 data to XPOLA808 encrypted format.
Available Parameters
Below is the complete list of all parameters you can use when building your XPola player configuration:
| Parameter | Description | Format | Required |
|---|---|---|---|
| URL | Main video URL (must be first parameter) | https://example.com/video.m3u8 |
Required |
| pass | Password for decryption protection | pass=yourpassword |
Optional |
| name | Server or video name | name=HD Server |
Optional |
| player-type | Player type (exo, webplayer, browser, iframe, web2exo, m3u) | player-type=exo |
Optional |
| referer | Referer header for HTTP requests | referer=https://example.com/ |
Optional |
| origin | Origin header for HTTP requests | origin=https://example.com |
Optional |
| user-agent | User-Agent header for HTTP requests | user-agent=Mozilla/5.0... |
Optional |
| subtitle | <URL of the subtitle file (VTT/SRT) | subtitle=https://example.com/file/subtitle.vtt |
Optional |
| x-requested-with | X-Requested-With header | x-requested-with=com.example.app |
Optional |
| cookie | Cookie header for authentication | cookie=session=abc123;user=john |
Optional |
| auth | Authentication headers | auth=Bearer token123 |
Optional |
| httpcanary | Disable HTTP traffic interception detection | httpcanary=false |
Optional |
| deviceroot | Disable root detection | deviceroot=false |
Optional |
| cast | Disable casting functionality | cast=false |
Optional |
| vpn | Enable VPN requirement | vpn=true |
Optional |
| drm-info | DRM type (clearkey, widevine, playready) | drm-info=widevine |
Optional |
| DRM Key | DRM license key | arfFyeRLSAKTLifDFIPiZg:FmY0xnWCPCNaSpRDS-bUuTX |
Optional |
| applogo | App logo URL (Top Right) | applogo=https://example.com/logo.png |
Optional |
| applogotl | App logo URL (Top Left) | applogotl=https://example.com/logo.png |
Optional |
| applogobr | App logo URL (Bottom Right) | applogobr=https://example.com/logo.png |
Optional |
| applogobl | App logo URL (Bottom Left) | applogobl=https://example.com/logo.png |
Optional |
| applink | URL to open when logo is clicked | applink=https://my-app.com/download |
Optional |
| find | Pattern to find in web2exo mode | find=name;m3u8 |
Optional |
| sandbox | Disable iframe sandbox (iframe mode only) | sandbox=false |
Optional |
Code Builder
Use this interactive builder to create your XPola player configuration. Fill in the parameters you need and generate the code.
Encryption API
Use the encryption endpoint to convert your base64-encoded configuration into the XPOLA808 encrypted format.
Encryption Endpoint
Example Request:
https://flax-media.com/api/api.php?encrypt=aHR0cHM6Ly9leGFtcGxlLmNvbS92aWRlby5tM3U4fHBhc3M9MTIzNDV8bmFtZT1IRCBWaWRlb3xwbGF5ZXItdHlwZT1leG98cmVmZXJlcj1odHRwczovL2V4YW1wbGUuY29tLw==
Example Response:
{
"status": "success",
"action": "encrypt",
"output": "XPOLA808eGRkYGMqPz92fHFoPX11dHlxPnN/fT9gfHFpdWI/eX50dWg+YHhgbGBxY2MtJHJxdHF1dSUndnV0JSYhICAhInEiKSYiJyMhJSh2JXY=",
"message": "Encryption completed successfully"
}
Decryption API
Use the decryption endpoint to convert XPOLA808 encrypted data back to its original form.
Decryption Endpoint
Example Request:
https://flax-media.com/api/api.php?decrypt=WFBPQEE4MDhlR1JrWUdNcVB6OTJmSEZvUFgxMWRIbHhQbk4vZlQ5Z2ZIRnBkV0kvZVl4NTRkV2crWUhIZ2JnR0J4WTJNdUpISnFkSEZxZFNVU25kbjBWSlNZaElDQWhJbkVpS1NZeUp5TWhKc2gySldYPSY=&pass=12345
Example Response:
{
"status": "success",
"action": "decrypt",
"output": [
{
"url": "https://example.com/video.m3u8",
"pass": "827ccb0eea8a706c4c34a16891f84e7b",
"name": "HD Video",
"player-type": "exo",
"referer": "https://example.com/",
"httpcanary": false,
"deviceroot": false,
"cast": false
}
],
"password_verified": true,
"message": "Decryption completed successfully"
}