Logging in

From DreamFactory
Jump to: navigation, search
(Logging in as a User (non-admin))
 
Line 23: Line 23:
 
Note: Set remember_me=true to get a JWT (token) that can be refreshed forever (until logout) without authentication.''  
 
Note: Set remember_me=true to get a JWT (token) that can be refreshed forever (until logout) without authentication.''  
  
=== Logging in as a User (non-admin) ===
+
=== Logging in as a User (Non-Admin) ===
  
 
The non-admin login API endpoint is api/v2/user/session
 
The non-admin login API endpoint is api/v2/user/session

Latest revision as of 20:38, 14 July 2016

Logging in as an Admin

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

Request URL:

POST https://foo.com/api/v2/system/admin/session

Request body:

{
  "email": "[email protected]",
  "password": "secret",
  "remember_me": false
}

cURL:

curl -i -k -3 -X POST "https://foo.com/api/v2/system/admin/session" -d '{ "email" : "[email protected]", "password" : "secret" }' -H "Content-Type: application/json"

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

Logging in as a User (Non-Admin)

The non-admin login API endpoint is api/v2/user/session

Request URL:

POST https://foo.com/api/v2/user/session

Request body:

{
  "email": "[email protected]",
  "password": "secret",
  "remember_me": false
}

cURL:

curl -i -k -3 -X POST "https://foo.com/api/v2/user/session" -d '{ "email" : "[email protected]", "password" : "secret" }' -H "Content-Type: application/json"

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