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"
}Authenticate the user based on the Stytch session token, and return the user information, and API Access Token. The Stych session token can be obtained from a Magic Links or OAuth token thanks to the registration status API.
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"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The Stytch session token