Exempel
curl -X DELETE "https://husvo.app/api/v1/auth/token" \
-H "Authorization: Bearer $TOKEN"Mejlad kod in, enhetstoken ut. Och utloggning av den egna enheten.
curl -X DELETE "https://husvo.app/api/v1/auth/token" \
-H "Authorization: Bearer $TOKEN"POST
/api/v1/auth/token
operationId redeemCode
| Fält | Typ | Krävs |
|---|---|---|
email |
string | nej |
code |
string | nej |
name |
string | nej |
device |
DeviceBody | nej |
{
"email": "du@exempel.se",
"code": "text",
"name": "text",
"device": {
"name": "text",
"platform": "text",
"appVersion": "text",
"pushToken": "text"
}
}curl -X POST "https://husvo.app/api/v1/auth/token" \
-H "Content-Type: application/json" \
-d '{"email":"du@exempel.se","code":"text","name":"text","device":{"name":"text","platform":"text","appVersion":"text","pushToken":"text"}}'{
"token": "hk_live_…",
"expiresAt": "2026-11-13T08:00:00Z",
"user": {
"id": 1,
"name": "text",
"email": "du@exempel.se"
},
"device": {
"id": 1,
"name": "text",
"platform": "text",
"appVersion": "text",
"createdAt": "2026-11-13T08:00:00Z",
"lastUsedAt": "2026-11-13T08:00:00Z",
"current": false
}
}Fel, som problem+json (felkoderna):
POST
/api/v1/auth/code
operationId requestCode
| Fält | Typ | Krävs |
|---|---|---|
email |
string | nej |
{
"email": "du@exempel.se"
}curl -X POST "https://husvo.app/api/v1/auth/code" \
-H "Content-Type: application/json" \
-d '{"email":"du@exempel.se"}'Inget innehåll.
Fel, som problem+json (felkoderna):