API Docs
Authentication/Authorization
3min
how to use the post /login endpoint to authenticate and obtain an access token endpoint url https //yourapi com /api/login request method post request body email the email address of the user trying to log in password the password of the user trying to log in timezone (optional) the timezone of the user trying to log in, (not required at all) response if the login is successful, the api returns a json response containing the following fields status the http status code of the response message a message indicating whether the login was successful or not data an object containing user data like id, name, email, image, last login and login timezone access token a jwt access token that can be used to authenticate subsequent requests refresh token (optional) a jwt refresh token that can be used to obtain a new access token when the current one expires (expires every 30 days) if the login fails, the api returns a json response containing the following fields status the http status code of the response message a message indicating why the login failed note the access token returned by the api should be included in the authorization header of subsequent requests, like so using this token on all requests should allow the authorized user to update data within the project