Login user
POST
/login
const url = 'https://example.com/api/v1/login';const options = { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: new URLSearchParams({user: 'example', pass: 'example'})};
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/api/v1/login \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data user=example \ --data pass=exampleRequest Body
Section titled “Request Body”Media typeapplication/x-www-form-urlencoded
object
user
Username
string
pass
User password
string
Examplegenerated
user=example&pass=exampleResponses
Section titled “Responses”Login successful
Media typeapplication/json
object
grommunioAuthJwt
API access token
string
csrf
CSRF token
string
Examplegenerated
{ "grommunioAuthJwt": "example", "csrf": "example"}Validation of input parameters failed
Media typeapplication/json
object
message
string
errors
List of errors encountered during validation
Array<string>
Examplegenerated
{ "message": "example", "errors": [ "example" ]}Login failed
An error occurred while processing the request
Media typeapplication/json
object
message
String representation of the exception
string
Examplegenerated
{ "message": "example"}The database query failed
Media typeapplication/json
object
message
Description of the error
string
Examplegenerated
{ "message": "example"}