Sign up - AmFlint/SI-Hybrid-Api GitHub Wiki
Sign up to the api
URL
Http Method
POST
Http Status Codes
- 400: Bad Request / User already exists
Query Parameters
username: string - Username for the user trying to sign up - UNIQUEemail: string - Email for the user trying to sign up - UNIQUEpassword: string - Password for the user trying to sign uppasswordVerification: 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":"[email protected]"}' http://localhost:3000/signup
- Response
{
"id": 19,
"username": "admin",
"email": "[email protected]",
"createdAt": "2018-01-16T21:33:20.823Z",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MTYxNDIwMDAsInVzZXJuYW1lIjoiYWRtaW4iLCJ1c2VySWQiOjE5LCJpYXQiOjE1MTYxMzg0MDB9.50-u2Dkx9u0aH8sc6SSWEea12jFYTuw1QnJhJY1u07U"
}