Get your devices connected to Weblockr in minutes
Contact your system administrator to obtain your Group UUID. This is required for device registration.
Make a POST request to /api/devices/register with your device information and Group UUID.
Your device will be in "pending" status until an administrator approves it. You'll receive an API key upon approval.
Once approved, use your API key to send periodic heartbeats and poll for commands.
Configure your device client with the following settings:
https://www.weblockr.app
/api/devices/register/api/devices/:deviceId/heartbeat/api/devices/:deviceId/commandsHere's a complete example of how to register a device:
const response = await fetch('https://www.weblockr.app/api/devices/register', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'X-CSRF-Token': document.querySelector('meta[name="csrf-token"]')?.content },
body: JSON.stringify({
deviceId: 'UNIQUE-DEVICE-ID',
groupUuid: 'YOUR-GROUP-UUID',
deviceName: 'My Kiosk Device',
version: '1.0.0',
operatingSystem: 'Windows 11',
ipAddress: '192.168.1.100',
macAddress: 'AA:BB:CC:DD:EE:FF',
systemInfo: {
cpuType: 'Intel Core i7',
osName: 'Windows 11 Pro',
ramGB: 16,
hddGB: 512,
gpuName: 'NVIDIA GeForce RTX'
}
})
});
const data = await response.json();
console.log(data);
// Response: { status: 'pending', message: '...' }
// or: { status: 'active', apiKey: '...', message: '...' }
import requests
response = requests.post(
'https://www.weblockr.app/api/devices/register',
json={
'deviceId': 'UNIQUE-DEVICE-ID',
'groupUuid': 'YOUR-GROUP-UUID',
'deviceName': 'My Kiosk Device',
'version': '1.0.0',
'operatingSystem': 'Linux',
'ipAddress': '192.168.1.100',
'systemInfo': {
'cpuType': 'Intel Core i7',
'osName': 'Ubuntu 22.04',
'ramGB': 16,
'hddGB': 512
}
}
)
data = response.json()
print(data)
using System.Net.Http.Json;
var client = new HttpClient();
var response = await client.PostAsJsonAsync(
"https://www.weblockr.app/api/devices/register",
new {
deviceId = "UNIQUE-DEVICE-ID",
groupUuid = "YOUR-GROUP-UUID",
deviceName = "My Kiosk Device",
version = "1.0.0",
operatingSystem = "Windows 11",
ipAddress = "192.168.1.100",
systemInfo = new {
cpuType = "Intel Core i7",
osName = "Windows 11",
ramGB = 16,
hddGB = 512
}
}
);
var data = await response.Content.ReadFromJsonAsync();
After approval, send regular heartbeats to keep your device active:
// Send heartbeat every 30 seconds
setInterval(async () => {
const response = await fetch(
'https://www.weblockr.app/api/devices/YOUR-DEVICE-ID/heartbeat',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'YOUR-API-KEY'
},
body: JSON.stringify({
version: '1.0.0',
pcName: 'KIOSK-01',
ipAddress: '192.168.1.100',
url: 'https://example.com',
uptime: 123456,
metrics: {
cpuPercent: 45.2,
memoryPercent: 62.1,
memoryUsedMB: 8192,
memoryTotalMB: 16384,
diskFreeGB: 256,
diskTotalGB: 512
}
})
}
);
const data = await response.json();
console.log('Heartbeat sent:', data);
}, 30000);
A: Verify your Group UUID with your administrator. Ensure the group is active.
A: Contact your administrator to approve the device in the dashboard.
A: Check that you're including the correct API key in the X-API-Key header.
A: Ensure heartbeats are being sent every 30 seconds and check network connectivity.