---
title: "🛡️ Log into a Cardinal app."
method: POST
path: "/api/v1/auth/login"
tags: ["Authentication"]
---

# 🛡️ Log into a Cardinal app.

`POST /api/v1/auth/login`

Logs the user into a client application that is hosted (bundled web app) or served by this server.

If logging into the Guest Account, no credentials are required. If logging into a Cardinal Account, a valid Cardinal SSO token is required.

The client app <strong>must</strong> set the <code>cardinal-app</code> header for this request.

Only the capability corresponding to the application that you are trying to log into will be validated.<br /><hr /><h3>🛡️ Requires one of these Capabilities: <code>AdminApp.Login</code> <code>MusicApp.Login</code> <code>PhotosApp.Login</code> <code>CinemaApp.Login</code></h3>

## Headers

- `cardinal-app` 'admin' | 'music' | 'photos' | 'cinema'

## Request body

- LoginDetails
  - `userId` string
  - `username` string
  - `password` string
  - `cardinalJWT` string

## Response `201`

- LoginResponse
  - `JWT` string, required
  - `user` object, required
  - `cloudJWT` string
  - `cloudUser` object
  - `refreshToken` string
  - `scope` object

## Other responses

- `401` — Returns a 401 if there is an issue with the SSO token.

---

[API](https://skmtc.net/cardinalapps/apis/cardinal-media-server-api.md) · [All operations](https://skmtc.net/cardinalapps/apis/cardinal-media-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cardinalapps/cardinal-media-server-api/revisions/0c30e5146acd/schema)
