-
Notifications
You must be signed in to change notification settings - Fork 0
Registration
In order to obtain an account (which contains an Access-Token) a new user must be registered and verified (via email). This is done via the /api/register
and /api/verify
endpoints.
Registration is done by doing a POST request to /api/register
with a email address provided in the header, like this:
POST /api/register HTTP/1.1
Host: example.com
Email: foo@example.com
---
On success a verification code is sent to the provided email which expires after 10 minutes and 200
is returned.
If something goes wrong either 400
(Failed to get the email), 409
(Email already registered) or 500
(internal server error) is returned
If this succeeds the server awaits the verification within the next 10 minutes
Verification is done by doing a GET request to /api/verify
with the email and the verification code in the URI, like this:
GET /api/verify/foo@example.com/000000000000000000
On success the user object is generated and it's infos are returned in the body of a status 200
response.
Else either 401
(Wrong Email / Code) or 500
(internal server error) is returned
DMNB - A Project by doncato - Thanks for your Interest