Check uploads and webhooks from your app, and make QR codes and avatars on the fly.
Upload code is hard to test without a server. /upload accepts a multipart form or raw bytes up to 1 MB and tells you what arrived: field names, file names, sizes, detected file types and SHA-256 hashes, so you can confirm your app sends what you think. /webhooks/test is a receiver for webhook senders: it echoes the delivery, gives it an id, can answer with any status code to test retries, and checks an HMAC-SHA256 signature.
/images/qr makes a QR code for any text or link, and /images/avatar draws a round avatar with a person’s initials, in Khmer too. Nothing you send is stored.
Upload one or more files (multipart/form-data) or raw bytes. Returns metadata for each file and the text fields. Up to 1 MB.
With curl: curl -F "file=@photo.jpg" -F "caption=Hello" https://toolorca.com/api/v1/upload. In Flutter use http.MultipartRequest, in Kotlin OkHttp’s MultipartBody. The example below sends a small JSON body, which is treated as one raw file.
const res = await fetch('https://toolorca.com/api/v1/upload', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
"hello": "world"
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
console.log(data);
import 'dart:convert';
import 'package:http/http.dart' as http;
Future<void> main() async {
final res = await http.post(
Uri.parse('https://toolorca.com/api/v1/upload'),
headers: {'Content-Type': 'application/json'},
body: jsonEncode({
'hello': 'world',
}),
);
if (res.statusCode >= 400) throw Exception('HTTP ${res.statusCode}');
final data = jsonDecode(utf8.decode(res.bodyBytes));
print(data);
}
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.RequestBody.Companion.toRequestBody
// Call from a background thread or coroutine (Dispatchers.IO), never the main thread.
val client = OkHttpClient()
val json = """
{
"hello": "world"
}
""".trimIndent()
val request = Request.Builder()
.url("https://toolorca.com/api/v1/upload")
.post(json.toRequestBody("application/json".toMediaType()))
.build()
client.newCall(request).execute().use { res ->
if (!res.isSuccessful) error("HTTP ${res.code}")
println(res.body?.string())
}
Receives a webhook and returns what arrived with a fake delivery id.
To test signatures, send the header X-Signature: sha256=<hex HMAC-SHA256 of the raw body> (or X-Hub-Signature-256) and add ?secret=: the response says whether it is valid and shows the expected value.
Parameter
In
Type
Description
status
query
integer
Status code to answer with (200–599, default 200), e.g. 500 to test retries.
secret
query
string
Shared secret for the HMAC check (only for testing).
const res = await fetch('https://toolorca.com/api/v1/images/qr?text=https%3A%2F%2Ftoolorca.com%2Fdevelopers%2F&size=300');
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
console.log(data);
import 'dart:convert';
import 'package:http/http.dart' as http;
Future<void> main() async {
final res = await http.get(
Uri.parse('https://toolorca.com/api/v1/images/qr?text=https%3A%2F%2Ftoolorca.com%2Fdevelopers%2F&size=300'),
);
if (res.statusCode >= 400) throw Exception('HTTP ${res.statusCode}');
final data = jsonDecode(utf8.decode(res.bodyBytes));
print(data);
}
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.RequestBody.Companion.toRequestBody
// Call from a background thread or coroutine (Dispatchers.IO), never the main thread.
val client = OkHttpClient()
val request = Request.Builder()
.url("https://toolorca.com/api/v1/images/qr?text=https%3A%2F%2Ftoolorca.com%2Fdevelopers%2F&size=300")
.build()
client.newCall(request).execute().use { res ->
if (!res.isSuccessful) error("HTTP ${res.code}")
println(res.body?.string())
}
import Foundation
var request = URLRequest(url: URL(string: "https://toolorca.com/api/v1/images/qr?text=https%3A%2F%2Ftoolorca.com%2Fdevelopers%2F&size=300")!)
let (data, response) = try await URLSession.shared.data(for: request)
guard let http = response as? HTTPURLResponse, http.statusCode < 400 else {
throw URLError(.badServerResponse)
}
print(String(decoding: data, as: UTF8.self))
GET /images/qr?text=https%3A%2F%2Ftoolorca.com%2Fdevelopers%2…
const res = await fetch('https://toolorca.com/api/v1/images/avatar?name=Sokha%20Chan&size=160');
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
console.log(data);
import 'dart:convert';
import 'package:http/http.dart' as http;
Future<void> main() async {
final res = await http.get(
Uri.parse('https://toolorca.com/api/v1/images/avatar?name=Sokha%20Chan&size=160'),
);
if (res.statusCode >= 400) throw Exception('HTTP ${res.statusCode}');
final data = jsonDecode(utf8.decode(res.bodyBytes));
print(data);
}
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.RequestBody.Companion.toRequestBody
// Call from a background thread or coroutine (Dispatchers.IO), never the main thread.
val client = OkHttpClient()
val request = Request.Builder()
.url("https://toolorca.com/api/v1/images/avatar?name=Sokha%20Chan&size=160")
.build()
client.newCall(request).execute().use { res ->
if (!res.isSuccessful) error("HTTP ${res.code}")
println(res.body?.string())
}
import Foundation
var request = URLRequest(url: URL(string: "https://toolorca.com/api/v1/images/avatar?name=Sokha%20Chan&size=160")!)
let (data, response) = try await URLSession.shared.data(for: request)
guard let http = response as? HTTPURLResponse, http.statusCode < 400 else {
throw URLError(.badServerResponse)
}
print(String(decoding: data, as: UTF8.self))
GET /images/avatar?name=Sokha%20Chan&size=160
Example image
Checking a webhook signature
Most webhook senders sign the raw request body with a shared secret. Compute HMAC-SHA256(secret, rawBody) as hex, send it as X-Signature: sha256=… and call /webhooks/test?secret=yoursecret. If signature.valid is false, compare signature.expected with what you sent: the usual mistake is signing re-serialised JSON instead of the exact bytes.
Free daily limit
Shared with the other mock services: 50 requests per day and 10 per minute per IP address. QR and avatar images are cached for a day, so load each one once and let the browser or your image library keep it.
Frequently asked questions
Are uploaded files stored?
No. The server reads the request, measures and hashes the files, answers and forgets them.
What is the upload size limit?
1 MB per request. Larger bodies get 413 Payload Too Large, which is also worth testing in your app.
Can phones scan the QR codes?
Yes. They are standard QR codes (versions 1–40, byte mode, UTF-8), so any scanner app reads them, including Khmer text.
Can I hotlink the avatar and QR images?
In demos and prototypes, yes, but they count toward the 50-a-day limit for your users’ IP addresses. For production, generate them once and store them.