Devices
Create WiFi Config Grant
Create a stateless grant for configuring WiFi credentials on a device via BLE
POST
Create a WiFi configuration grant for a device. The grant is a stateless JWT that authorizes the companion app to send encrypted WiFi credentials to the device over BLE. The device uses the grant to derive a session key (Documentation Index
Fetch the complete documentation index at: https://docs.bota.dev/llms.txt
Use this file to discover all available pages before exploring further.
K_session) for decrypting the WiFi credentials. No WiFi passwords are stored on the backend — the grant is purely an authorization token.
Only devices with the WiFi Upload capability (
0x02) support WiFi configuration. Attempting to create a grant for a non-WiFi device returns a 400 error.Authentication
Requires an API key withdevices:write scope.
Path Parameters
The device’s unique identifier (e.g.,
dev_abc123).Request Body
How long the grant is valid, in seconds. Minimum 60 (1 minute), maximum 3600 (1 hour). Default is 900 (15 minutes).
Response
Returns the grant blob and its expiration timestamp.Response Fields
| Field | Type | Description |
|---|---|---|
grant_blob | string | Signed grant token to pass to device via BLE |
expires_at | string | Grant expiration timestamp (ISO 8601) |
Usage Flow
- App scans for WiFi networks — the SDK provides
scanNetworks()(Android) andgetCurrentSSID()(both platforms) so users can pick a network - App requests grant from your backend (this endpoint)
- App writes
grant_blobto the device’s BLE WiFi Grant characteristic - App encrypts WiFi credentials using a session key derived from the grant
- App writes encrypted credentials to the device’s BLE WiFi Credential characteristic
- Device connects to WiFi and reports status via the BLE WiFi Status characteristic
scanNetworks() for step 1 and handles steps 3-6 automatically via BotaClient.devices.configureWiFi().

