Registration
Creating a user.
Email
Intro
A verification email will be sent. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vel dolor lacinia, pellentesque ligula vitae, ultrices dui. In tincidunt velit sit amet neque aliquet, a vulputate purus lobortis.
Request Headers
Origin: <CLIENT_APP_URL>
client_id: <API_CLIENT_ID>
Request body
{
"email":"String",
"name":"String",
"password":"String",
"passwordConfirm":"String"
}
Body Validation
- email - Reputable Email
- name - min of 4
- password- Min of 8 chars
- passwordConfirm- Min of 8 chars
Request
POST
http://localhost:5501/api/v1/auth/
Response
{
"status": "String",
"message": "String",
"data": "String"
}
Response Validation
- status - request status
- message - response message
- data - created user ID
Example
Headers
Origin: http://localhost:3000
client_id: pSpisBrYn4yIP1vGILcdZ
Body
{
"email":"user@example.com",
"name":"John Doe",
"password":"12345678",
"passwordConfirm":"12345678"
}
Response
{
"status": "success",
"message": "We have sent you a verification code. The code is only valid for 5 minutes",
"data": "62d4e6f6167f537cf7db8c37"
}
Mobile
Intro
A verification sms will be sent. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vel dolor lacinia, pellentesque ligula vitae, ultrices dui. In tincidunt velit sit amet neque aliquet, a vulputate purus lobortis.
Request Headers
Origin: <CLIENT_APP_URL>
client_id: <API_CLIENT_ID>
Request body
{
"phone":"String",
"name":"String",
"password":"String",
"passwordConfirm":"String"
}
Body Validation
- phone - User phone in international format, min of 10
- name - min of 4
- password- Min of 8 chars
- passwordConfirm- Min of 8 chars
Request
POST
http://localhost:5501/api/v1/auth/mobile
Response
{
"status": "String",
"message": "String",
"data": "String"
}
Response Validation
- status - request status
- message - response message
- data - created user ID
Example
Headers
Origin: http://localhost:3000
client_id: pSpisBrYn4yIP1vGILcdZ
Body
{
"phone":"254710xxxxxx",
"name":"John Doe",
"password":"12345678",
"passwordConfirm":"12345678"
}
Response
{
"status": "success",
"message": "We have sent you a verification code. The code is only valid for 2 minutes",
"data": "62d4e9bf167f537cf7db8c44"
}
Google
Intro
A google account will be required. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vel dolor lacinia, pellentesque ligula vitae, ultrices dui. In tincidunt velit sit amet neque aliquet, a vulputate purus lobortis.
Request Headers
Origin: <CLIENT_APP_URL>
client_id: <API_CLIENT_ID>
Request body
{
"token":"String",
"name":"String",
"email":"String",
"photo":"String",
}
Body Validation
- token - google success login token
- name - google user name
- email - google user email
- token - google user photo
Request
POST
http://localhost:5501/api/v1/auth/oauth/google/signup
Response
{
"status": "String",
"token": "String",
}
Response Validation
- status - request status
- token - User access token
Example
Headers
Origin: http://localhost:3000
client_id: pSpisBrYn4yIP1vGILcdZ
Body
{
"token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
Response
{
"status": "success",
"token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
}