Skip to content

Sign up

Masselot Antoine edited this page Jan 17, 2018 · 2 revisions

Sign up to the api

URL

http://212.47.231.5/signup

Http Method

POST

Http Status Codes

  • 400: Bad Request / User already exists

Query Parameters

  • username: string - Username for the user trying to sign up - UNIQUE
  • email: string - Email for the user trying to sign up - UNIQUE
  • password: string - Password for the user trying to sign up
  • passwordVerification: string - validation step for password

Request

  • Request with Valid credentials
curl -H "Content-Type: application/json" -X POST -d '{"username":"admin","password":"root", "passwordValidation": "root", "email":"admin@admin.fr"}' http://localhost:3000/signup 
  • Response
{
    "id": 19,
    "username": "admin",
    "email": "admin@hotmail.com",
    "createdAt": "2018-01-16T21:33:20.823Z",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MTYxNDIwMDAsInVzZXJuYW1lIjoiYWRtaW4iLCJ1c2VySWQiOjE5LCJpYXQiOjE1MTYxMzg0MDB9.50-u2Dkx9u0aH8sc6SSWEea12jFYTuw1QnJhJY1u07U"
}

Clone this wiki locally