Uptobox api

Mecky Clouds

Active member
May 2, 2020
310
177
43
One Piece
streamscripts.xyz
Hi can i ask if someone know how to get direct download via api on uptobox.
i mean direct download not direct download link.

like this uptobox api
but instead giving direct download link. the result id like is automatic download.
if it is possible please help me to work it. thanks..

also if this thread is not allow. please closed the tread if not allowed thanks.
 

videva

Member
Aug 25, 2020
75
53
18
Hi can i ask if someone know how to get direct download via api on uptobox.
i mean direct download not direct download link.

like this uptobox api
but instead giving direct download link. the result id like is automatic download.
if it is possible please help me to work it. thanks..

also if this thread is not allow. please closed the tread if not allowed thanks.

try turn OFF the Configuration Direct Download in My Account
1.png

the result ID
3.png
 

videva

Member
Aug 25, 2020
75
53
18
even turn off/on still can generate direct download link..

i mean if is possible the result is not direct download link.. instead.. automatic start download..

also can i ask if generate download link is have expiration the link?
well if you want to automatic download you need to use PHP or JS FETCH/AXIOS.
this the example code for php
PHP:
<?php
/*for free member need to get waitingToken first
$url = 'https://uptobox.com/api/link?token=[USR_TOKEN]&file_code=[FILE_CODE]&waitingToken=[WAITING_CODE]';
*/

//for premium member do not need waitingToken
$url = 'https://uptobox.com/api/link?token=[USR_TOKEN]&file_code=[FILE_CODE]';

$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_URL, $url);

$result = curl_exec($curl);
$json = json_decode($result, true);

curl_close($curl);

if( $json['message'] == 'Success'){
/*
//you can use this header redirect if you want to automatic download the file
header('Location: '. $json['data']['dlLink']);
die;
*/
   
echo $json['data']['dlLink'];
}
?>

with php
1.png

with JS fetch
View attachment 49144
 

Mecky Clouds

Active member
May 2, 2020
310
177
43
One Piece
streamscripts.xyz
well if you want to automatic download you need to use PHP or JS FETCH/AXIOS.
this the example code for php
PHP:
<?php
/*for free member need to get waitingToken first
$url = 'https://uptobox.com/api/link?token=[USR_TOKEN]&file_code=[FILE_CODE]&waitingToken=[WAITING_CODE]';
*/

//for premium member do not need waitingToken
$url = 'https://uptobox.com/api/link?token=[USR_TOKEN]&file_code=[FILE_CODE]';

$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_URL, $url);

$result = curl_exec($curl);
$json = json_decode($result, true);

curl_close($curl);

if( $json['message'] == 'Success'){
/*
//you can use this header redirect if you want to automatic download the file
header('Location: '. $json['data']['dlLink']);
die;
*/
  
echo $json['data']['dlLink'];
}
?>

with php
1.png

with JS fetch
View attachment 49144
nice. but it is possible that per file code? example
localhost/uptoboxapi.php?id=[File code]
so no need to change on php every time hehe
 

videva

Member
Aug 25, 2020
75
53
18
nice. but it is possible that per file code? example
localhost/uptoboxapi.php?id=[File code]
so no need to change on php every time hehe
of course you can do like that the code i provide it just for example bro,
you can add or modify the code to make it better.

change the code above to be like this
PHP:
<?php
/*for free member need to get waitingToken first
$url = 'https://uptobox.com/api/link?token=[USR_TOKEN]&file_code=[FILE_CODE]&waitingToken=[WAITING_CODE]';
*/

//for premium member do not need waitingToken
//$url = 'https://uptobox.com/api/link?token=[USR_TOKEN]&file_code=[FILE_CODE]';
if(empty($_GET['id'])){
    die('NO ID');
}
$url = 'https://uptobox.com/api/link?token=[USR_TOKEN]&file_code='.$_GET['id'];


$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_URL, $url);

$result = curl_exec($curl);
$json = json_decode($result, true);

curl_close($curl);

if( $json['message'] == 'Success'){
/*
//you can use this header redirect if you want to automatic download the file
header('Location: '. $json['data']['dlLink']);
die;
*/

echo $json['data']['dlLink'];
}
?>
now you can access it with localhost/uptoboxapi.php?id=[File code]
 
  • Love
Reactions: Mecky Clouds

Mecky Clouds

Active member
May 2, 2020
310
177
43
One Piece
streamscripts.xyz
of course you can do like that the code i provide it just for example bro,
you can add or modify the code to make it better.

change the code above to be like this
PHP:
<?php
/*for free member need to get waitingToken first
$url = 'https://uptobox.com/api/link?token=[USR_TOKEN]&file_code=[FILE_CODE]&waitingToken=[WAITING_CODE]';
*/

//for premium member do not need waitingToken
//$url = 'https://uptobox.com/api/link?token=[USR_TOKEN]&file_code=[FILE_CODE]';
if(empty($_GET['id'])){
    die('NO ID');
}
$url = 'https://uptobox.com/api/link?token=[USR_TOKEN]&file_code='.$_GET['id'];


$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_URL, $url);

$result = curl_exec($curl);
$json = json_decode($result, true);

curl_close($curl);

if( $json['message'] == 'Success'){
/*
//you can use this header redirect if you want to automatic download the file
header('Location: '. $json['data']['dlLink']);
die;
*/

echo $json['data']['dlLink'];
}
?>
now you can access it with localhost/uptoboxapi.php?id=[File code]
thank you so much its big help :)
 

Mecky Clouds

Active member
May 2, 2020
310
177
43
One Piece
streamscripts.xyz
btw uptobox doesn't support every country like they block US
yes but this method direct link + plyr can bypass that hehe
check this
i already try that on US VPS that block when i open uptobox,com but its work on direct link + player.
that link is host the 1080p (mp4) on uptobox
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu