Skip to main content

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

  1. email - Reputable Email
  1. name - min of 4
  1. password- Min of 8 chars
  1. passwordConfirm- Min of 8 chars

Request

POST
http://localhost:5501/api/v1/auth/

Response

{
"status": "String",
"message": "String",
"data": "String"
}

Response Validation

  1. status - request status
  1. message - response message
  1. 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

  1. phone - User phone in international format, min of 10
  1. name - min of 4
  1. password- Min of 8 chars
  1. passwordConfirm- Min of 8 chars

Request

POST
http://localhost:5501/api/v1/auth/mobile

Response

{
"status": "String",
"message": "String",
"data": "String"
}

Response Validation

  1. status - request status
  1. message - response message
  1. 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

  1. token - google success login token
  1. name - google user name
  1. email - google user email
  1. token - google user photo

Request

POST
http://localhost:5501/api/v1/auth/oauth/google/signup

Response

{
"status": "String",
"token": "String",
}

Response Validation

  1. status - request status
  1. token - User access token

Example

Headers

Origin: http://localhost:3000
client_id: pSpisBrYn4yIP1vGILcdZ

Body

{
"token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Response

{
"status": "success",
"token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
}