Exchange an OAuth credential for a session (API/CLI, ADR-0049)
POST
/v1/auth/login
const url = 'https://example.com/v1/auth/login';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/auth/loginResponses
Section titled “Responses”Media typeapplication/json
object
csrf
required
The session’s CSRF token — browsers echo it in x-csrf-token on every
mutation (also delivered as the readable scarab_csrf cookie).
string
session
required
string
subject
required
string
Examplegenerated
{ "csrf": "example", "session": "example", "subject": "example"}Bad credential
Login not configured