Logging in

From DreamFactory
Jump to: navigation, search
      1. Tutorial
      1. Log in as an Admin

The Admin login API is api/v2/system/admin/session

        1. API Endpoint
POST https://your-url/api/v2/system/admin/session
{
  "email": "user_email",
  "password": "password",
  "remember_me": bool
}
        1. Example - Logging in as an Admin
POST https://your-url/api/v2/system/admin/session
{
  "email": "[email protected]",
  "password": "secret",
  "remember_me": false
}

Note: Set remember_me flag to 'true' in order to get a JWT (token) that can be refreshed forever (until logout) without authentication.

      1. Log in as an User (non-admin)

The User login API is api/v2/user/session

        1. API Endpoint
POST https://your-url/api/v2/user/session
{
  "email": "user_email",
  "password": "password",
  "remember_me": bool
}
        1. Example - Logging in as an User (non-admin)
POST https://your-url/api/v2/user/session
{
  "email": "[email protected]",
  "password": "secret",
  "remember_me": false
}

Note: Set remember_me flag to 'true' in order to get a JWT (token) that can be refreshed forever (until logout) without authentication.