Regenerate JWT token for a device. This invalidates all previous tokens for this device.
Use case: If a token is compromised, regenerate to revoke access.
POST
/devices/token
curl \
--request POST 'http://localhost:7001/devices/token' \
--header "Content-Type: application/json" \
--data '{"device_id":"550e8400-e29b-41d4-a716-446655440000","device_secret":"a1b2c3d4e5f6g7h8"}'
Request examples
{
"device_id": "550e8400-e29b-41d4-a716-446655440000",
"device_secret": "a1b2c3d4e5f6g7h8"
}
Response examples (200)
{
"status": true,
"code": 200,
"message": "Token regenerated successfully. All previous tokens are now invalid.",
"data": {
"device_id": "string",
"token": "string"
}
}