Resources

Resource Users

/api/users/authenticate?email&password

Methods

POST

Authenticate a given user with email & password. If the email&password combination is correct and the user has connected it's wheelmap account with the OSM account, the API will return the user's API key. If the combination is correct, but the user has no osm credentials, the API will answer 403 "Application needs to be authorized". Send the user to http://wheelmap.org/users/:user_id/edit to connect with osm. If combination is not correct, API answers 400, "Authorization failed"

request query parameter
Parameter Type Description
email* string The user's email address
password* string The user's password

Representations

Example locales representation. (application/json)

{ "users":
  {
    "id": 1,
    "api_key":"A valid API key",
    "terms_accepted": false,
    "privacy_accepted": true
  }
}

/api/users/accept_terms?terms_accepted

Methods

POST

Any client can declare on behalf of the authenticated user, that this given user has willfully accepted wheelmap.org's terms of usage and the privacy policy. The terms and the privacy policy have to be presented to the user separately, or a link to the terms and the privacy policy has to be provided. Please use the following url: http://blog.wheelmap.org/was-ist-wheelmap/terms/
http://blog.wheelmap.org/was-ist-wheelmap/privacy/

IMPORTANT: The user has to accept both terms and privacy policy in order the update or create new nodes as well as upload photos. The server will reject such requests unless the user accepted.

request query parameter
Parameter Type Description
terms_accepted* string Can be one of the following values. 'true', 'yes', '1' for ACCEPTED and 'false', 'no', '0' for DENIED.
privacy_accepted* string Can be one of the following values. 'true', 'yes', '1' for ACCEPTED and 'false', 'no', '0' for DENIED.

Representations

Example locales representation. (application/json)

{ "users":
  {
    "id": 1,
    "api_key":"A valid API key",
    "terms_accepted": false,
    "privacy_accepted": true
  }
}