GET
/api/qrGenerate QR Login Code
Generate a QR code for mobile device login to the PocketPaw dashboard. Scan the QR code with your phone to authenticate without manually entering credentials or tokens.
Overview
Generates a QR code PNG image that encodes the dashboard URL with an embedded access token. Scanning this QR code on a mobile device automatically authenticates the user.
This endpoint is auth-exempt — it can be accessed without a token (intended for the initial login flow).
Response
Returns a PNG image (image/png content type) as a streaming response.
curl -X GET "http://localhost:8000/api/qr" -o login-qr.pngconst response = await fetch("http://localhost:8000/api/qr");const blob = await response.blob();const url = URL.createObjectURL(blob);// Use url in an <img> tag or download linkconsole.log("QR code blob URL:", url);import requests
response = requests.get("http://localhost:8000/api/qr")with open("login-qr.png", "wb") as f: f.write(response.content)print("QR code saved to login-qr.png")Binary PNG image (content-type: image/png)Was this page helpful?
Request
curl -X GET "http://localhost:8000/api/qr" \
-H "Content-Type: application/json"const response = await fetch("http://localhost:8000/api/qr", {
method: "GET",
headers: {
"Content-Type": "application/json"
},
});
const data = await response.json();
console.log(data);import requests
response = requests.get(
"http://localhost:8000/api/qr",
headers={'Content-Type':'application/json'},
)
print(response.json())package main
import (
"fmt"
"net/http"
"io"
)
func main() {
req, _ := http.NewRequest("GET", "http://localhost:8000/api/qr", nil)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}Response
Send a request to see the response
Headers
Response