Skip to content
Florian Schmidt edited this page Mar 2, 2016 · 7 revisions

Sign-Up Process

Create a new user

In order to register a new user you need to send an email and a password to the API. An example HTTP-Request would look like to following:

POST /user/ HTTP/1.1
Content-Type: application/json
Host: yourdomain.org
Connection: close
Content-Length: 53

{"email":"[email protected]","password":"password"}

The server would then respond with 201 Created if successful. An error response would be send back if either the email is already is use or email/password are missing. An example response after successfully creating a user could look like the following:

{
  "password": null,
  "firstname": null,
  "lastname": null,
  "email": "[email protected]",
  "gender": null,
  "id": 2,
  "participant": null,
  "blocked": true
}

As one can see, the user is currently blocked, meaning that he can't do anything until he confirms his registration by clicking on the link in the registration email. This registration email will be sent to the email provided for the user. Information that is not yet entered will be returned as null, as well as the password field, which will always be null

Activate the account

Activating the account of a user will normally be done by clicking the activation link in the email. This link would be of the following form:

GET http://yourdomain.org/activation?token=tokenfromtheemail&[email protected]
Clone this wiki locally