ReferenceAuth
/api/v1/auth/switch
Public; reads the device's accounts cookie. The chosen account's session becomes the session cookie and goes first in the accounts cookie, which keeps the previous one. Answers like login. 404 when the account is not on this device, 409 when its session here ran out or was ended: it needs its password again.
POST
/api/v1/auth/switchCookie Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/api/v1/auth/switch" \ -H "Content-Type: application/json" \ -d '{ "userId": "string" }'{ "$schema": "https://example.com/api/v1/schemas/UserResponse.json", "avatarId": "string", "canSharePublicly": true, "color": "amber", "displayName": "string", "email": "string", "emailConfirmation": { "expiresAt": "2019-08-24T14:15:22Z", "sentAt": "2019-08-24T14:15:22Z" }, "emailConfirmationPending": true, "emailSetupLink": { "expiresAt": "2019-08-24T14:15:22Z", "sentAt": "2019-08-24T14:15:22Z" }, "emailVerified": true, "hasPassword": true, "id": "string", "locale": "en", "role": "superadmin", "username": "string"}