Authentication

  • To login, make a POST request as below

  • Endpoint: {SERVER_URL}/api/method/eclectics.api.user.login

  • Method: POST

  • Payload

{
    "usr": "user@domain.com",
    "pwd": "password"
}
  • A response will be as below:

{
    "message": {
        "success": true,
        "status": 200,
        "message": "Logged in",
        "data": {
        "id": "user@domain.com",
        "full_name": "user",
        "token": "03dfdfdfd3:weserttf3434"
        }
    },
    "home_page": "/app",
    "full_name": "User"
}

Note

  • Store the returned value of the token property as this is token will be supplied to subsequent API calls for authentication purposes