Welcome to World of IPTV

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Forum Rules

Our Rules: Read to avoid getting banned!

Advertising

Introduce Yourself to the World with Us!

Resource Database

Find the newest resources around IPTV!

Account upgrade

Upgrade your account to unlock more benefits!

Question xui one api create line

chouaib23

Extended Member
Ext. Member
Joined
Nov 4, 2019
Messages
4
Reaction score
2
Points
11
Location
DZ
Hello

can someone help with Xui one api with add line


i use

api_key=API_KEY&action=create_line&username=TEST&password=TEST&max_connections=1&bouquets_selected=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"]&exp_date=365days

here all is fine and work problem is with allowed_outputs not work i test all syntax

&output_formats[]=1&allowed_outputs[]=1
allowed_outputs
output_formats[2]
allowed_outputs=ts
output_formats[]=1
allowed_outputs=1
allowed_outputs_selected=["1"]

this not add output_formats for Line
 
Hello

can someone help with Xui one api with add line


i use

api_key=API_KEY&action=create_line&username=TEST&password=TEST&max_connections=1&bouquets_selected=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"]&exp_date=365days

here all is fine and work problem is with allowed_outputs not work i test all syntax

&output_formats[]=1&allowed_outputs[]=1
allowed_outputs
output_formats[2]
allowed_outputs=ts
output_formats[]=1
allowed_outputs=1
allowed_outputs_selected=["1"]

this not add output_formats for Line
Hi check:
allowed_outputs_selected[]=1&allowed_outputs_selected[]=2
or
output_formats[]=1&output_formats[]=2
or
syntax error:
bouquets_selected=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"]
test
bouquets[]=1&output_formats[]=1
 
test both and not give result


{"status":"STATUS_SUCCESS","data":{"id":"37","member_id":"1","username":"TEST","password":"TEST","last_ip":null,"exp_date":"1776281450","admin_enabled":"1","enabled":"1","admin_notes":null,"reseller_notes":null,"bouquet":"[1,2,3,4,5,8,9,10,11,12,13,14,15]","allowed_outputs":"[]","max_connections":"1","is_restreamer":"0","is_trial":"0","is_mag":"0","is_e2":"0","is_stalker":"0","is_isplock":"0","allowed_ips":"[]","allowed_ua":"[]","created_at":"1744745450","pair_id":null,"force_server_id":"0","as_number":null,"isp_desc":"","forced_country":null,"bypass_ua":"0","play_token":null,"last_expiration_video":null,"package_id":null,"access_token":null,"contact":null,"last_activity":null,"last_activity_array":null,"updated":"0000-00-00 00:00:00"}}
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changcdn
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
test both and not give result


{"status":"STATUS_SUCCESS","data":{"id":"37","member_id":"1","username":"TEST","password":"TEST","last_ip":null,"exp_date":"1776281450","admin_enabled":"1","enabled":"1","admin_notes":null,"reseller_notes":null,"bouquet":"[1,2,3,4,5,8,9,10,11,12,13,14,15]","allowed_outputs":"[]","max_connections":"1","is_restreamer":"0","is_trial":"0","is_mag":"0","is_e2":"0","is_stalker":"0","is_isplock":"0","allowed_ips":"[]","allowed_ua":"[]","created_at":"1744745450","pair_id":null,"force_server_id":"0","as_number":null,"isp_desc":"","forced_country":null,"bypass_ua":"0","play_token":null,"last_expiration_video":null,"package_id":null,"access_token":null,"contact":null,"last_activity":null,"last_activity_array":null,"updated":"0000-00-00 00:00:00"}}
If you can't, you can play with the default value for the field and set the default value in that field in phpmyadmin and you will definitely have the output.
So that when you add the table, enter the value that you set. it will be the same for everyone new lines.
 
on lines on phpmyadmin it show

allowed_outputs=[1,2]

and tested not select anything
 
solved save this script as sh and run

#!/bin/bash

# Define as variaveis do banco de dados (BD)
DB_NAME="xui"
TABLE_NAME="lines"
TRIGGER_NAME="tr_lines_before_insert"

echo "--- Automacao da Criacao do TRIGGER ---"
echo " BD: ${DB_NAME}, Tabela: ${TABLE_NAME}"
echo "------------------------------------------"

# 1. Solicita as credenciais do MySQL
read -p "Digite o usuario MySQL : " DB_USER
read -s -p "Digite a senha do MySQL: " DB_PASS
echo
echo "Tentando conectar ao banco de dados..."

# 2. Define o comando SQL (o TRIGGER)
# O comando e formatado para ser executado em uma linha, usando um DELIMITER temporario.
SQL_COMMAND=$(cat <<EOF
DELIMITER //
CREATE TRIGGER ${TRIGGER_NAME}
BEFORE INSERT ON \`${TABLE_NAME}\` FOR EACH ROW
BEGIN
IF NEW.allowed_outputs = '[]' OR NEW.allowed_outputs = '' THEN
SET NEW.allowed_outputs = '[1,2,3]';
END IF;
END;
//
DELIMITER ;
EOF
)

# 3. Executa o comando SQL no banco de dados
# O cliente MySQL ira solicitar a senha, o que e mais seguro.
echo "${SQL_COMMAND}" | mysql -u "${DB_USER}" -p "${DB_NAME}"

# 4. Verifica o status da execucao
if [ $? -eq 0 ]; then
echo "✅ Sucesso! O TRIGGER '${TRIGGER_NAME}' foi criado/atualizado no BD '${DB_NAME}'."
else
echo "❌ FALHA: O comando MySQL nao foi executado corretamente."
echo " Verifique se o usuario/senha estao corretos e se o usuario tem permissao para criar TRIGGERS."
fi
 
Last edited:
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changcdn
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top