- API
- Temporary link
GET
https://send.now/api/file/generate_link?key=1ltghrilhllgrx2b2&file_code=eb58d02u8znz&file_max_dl=5&file_expire_time=2&file_expire_unit=HOUR
| Parameters |
Description |
Example |
Format |
Required |
| key |
API-Key |
1ltghrilhllgrx2b2 |
String |
yes |
| file_code |
File code of one of your files |
eb58d02u8znz |
String |
yes |
| file_max_dl |
How many times the temporary link can be downloaded. 0 or not sent = no limit |
5 |
Number |
no |
| file_expire_time |
How long the link works. 0 or not sent = it does not expire |
2 |
Number |
no |
| file_expire_unit |
Unit of file_expire_time: MINUTE (default), HOUR or DAY |
HOUR |
String |
no |
cURL example
curl --include \
'https://send.now/api/file/generate_link?key=1ltghrilhllgrx2b2&file_code=eb58d02u8znz&file_max_dl=5&file_expire_time=2&file_expire_unit=HOUR'
Response
{
"msg": "OK",
"result": {
"generated": 1,
"source_file_code": "eb58d02u8znz",
"file_code": "hloovuokqrh9",
"link": "https://send.now/hloovuokqrh9",
"short_link": "https://send.now/d/1pbZB",
"qr_link": "https://send.now/qr/4D",
"file_max_dl": 5,
"file_expire_time": 2,
"file_expire_unit": "HOUR",
"fld_id": 285479
},
"status": 200,
"server_time": "2024-08-26 12:19:28"
}
Response without a limit
{
"msg": "OK",
"result": {
"generated": 0,
"file_code": "eb58d02u8znz",
"link": "https://send.now/eb58d02u8znz",
"short_link": "https://send.now/d/1pbZB",
"qr_link": "https://send.now/qr/4D",
"file_max_dl": 0,
"file_expire_time": 0,
"file_expire_unit": "MINUTE"
},
"status": 200,
"server_time": "2024-08-26 12:19:28"
}
Notice
|
Makes a private copy of your file with its own link, in your folder "Shared", and puts the limit and the expiry on that copy. The original file and its link are not changed. |
|
Without file_max_dl and file_expire_time nothing is created: generated is 0 and the reply carries the link of the file itself. |
|
A temporary link keeps the password of the file. Delete it with Delete, change its limit with Edit temporary link. |
|
Free accounts can set DAY expiries only up to the limit of the site, premium accounts longer (403 otherwise). The site also limits how many temporary links one file can have (403 "You have reached your limit"). |
|
Only your own files: 404 for any other file. |
Status code
| 200 |
Everything is OK. Request succeeded |
| 400 |
Bad request (e.g. wrong parameters) |
| 403 |
Permission denied |
| 404 |
File not found |
| 451 |
Unavailable
|