Wi-Fi
Open the setup hotspot
POST
/api/wifi/setupAdmin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.Leaves the current Wi-Fi and opens the Tempolight-Setup hotspot.
Responses
200OKapplication/json
object
What the service did.
400The body isn't valid JSON, or a value is wrong.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
403Locked, or not allowed.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
502
Request
curl -X POST 'http://localhost:8080/api/wifi/setup'const res = await fetch("http://localhost:8080/api/wifi/setup", {
method: "POST",
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"http://localhost:8080/api/wifi/setup",
)
print(res.json())Response
{}{
"error": "Wi-Fi setup is only on the Tempolight Raspberry Pi image"
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}