Skip to main content
POST
/
authentication
/
login
Authenticate a user based on a Stytch session token
curl --request POST \
  --url https://api-dev.narrative.io/authentication/login \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "stytch_session_token": "1rjpyoFiYLucsV-nuoi7dZ_VOkMUkcZLw6rICEYBzAy0"
}
'
{
  "user": {
    "id": 10,
    "name": "First Last",
    "role": "partner_admin",
    "company_id": 100,
    "company_name": "ACME Corp"
  },
  "api_token": {
    "access_token": "OI2Sfun5GnOS9zk0irkc3w==",
    "access_token_expires_in": 1000,
    "refresh_token": "yZYCdZrvHvlnEQw9/C640Q",
    "refresh_token_expires_in": 10000
  },
  "legacy_token": "legacy-dsm-token"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
stytch_session_token
string
required

The Stytch session token

Response

OK

user
object
required
api_token
object
required
legacy_token
string
required