Sessions are used to allow users to access their individual data.
Requires:
Actions
URL | Verb | Information |
---|---|---|
/session | POST | Creates a new session. Returns the session id, or HTTP 401 if credentials are not correct. |
Requesting A Session ID
A session can be created for existing users.
Field | Data Type | Required | Additional Information |
---|---|---|---|
EmailAddress | String | Y | |
Password | String | Y |
If the credentials are not correct, the API will return HTTP 401 Unauthorized.
Using a Session ID
The session id should be sent with each request in a custom HTTP header with the field name "X-MILK-SESSION-ID". The HTTP header field name is not case sensitive.
Session length has not been specified yet. The client application should be prepared for any method which requires a session id to return 401 Unauthorized and be prepared to request a new session id and retry the request that failed.