Devices are discovered by sending this request to all local IP addresses.
The
fingerprint
parameter is optional and is only used to avoid self-discovering. In this case, the server may respond with an error code if sender and receiver fingerprints match. The fingerprint is generated on each app start randomly.
GET /api/localsend/v1/info?fingerprint=abc
Response
{
"alias": "Nice Orange",
"deviceModel": "Samsung", // nullable
"deviceType": "mobile" // mobile | desktop | web
}
Sends only the metadata to the receiver.
The receiver will decide if this request gets accepted, partially accepted or rejected.
Be aware that only one active session is allowed, i.e. the server will reject all requests when another session is ongoing.
POST /api/localsend/v1/send-request
Request
{
"info": {
"alias": "Nice Orange",
"deviceModel": "Samsung", // nullable
"deviceType": "mobile" // mobile | desktop | web
},
"files": {
"some file id": {
"id": "some file id",
"fileName": "my image.png",
"size": 324242, // bytes
"fileType": "image", // image | video | pdf | text | other
"preview": "*preview data*" // nullable
},
"another file id": {
"id": "another file id",
"fileName": "another image.jpg",
"size": 1234,
"fileType": "image",
"preview": "*preview data*"
}
}
}
Response
{
"some file id": "some token",
"another file id": "some other token"
}
The file transfer.
Use the
fileId
and its file-specifictoken
from/send-request
.This route can be called in parallel.
POST /api/localsend/v1/send?fileId=some file id&token=some token
Request
Binary data
Response
No body
This route will be called when the sender wants to cancel the session.
The server will use the IP address to determine if the request is legitimate.
POST /api/localsend/v1/cancel
Response
No body