Pamoja Plus
Theme
Getting Started

Authentication

The description here

The Authentication steps are in the following formart:

1
Add phone number
Enter Phone number in any formart.
2
Enter verification code
Content for the second step.

User Acquisition

The user acquisition process is designed to be seamless and user-friendly. It typically involves the following steps:

route: /auth/initiate-registration Method: POST Request:

json
{
  "phone_number": "string"
}

Response 400 Bad Request:

json
{
  "message": "string"
}

Response 200 OK:

json
{
  "message": "string",
  "token": "string"
}

Resend code

route: /auth/initiate-registration/resend-otp

Method: POST

Authorized: YES

Request:

json
{
  "phone_number": "string"
}

Response 400 Bad Request:

json
{
  "message": "string"
}

Response 200 OK:

json
{
  "message": "string",
  "token": "string"
}

Verification Code

After the user initiates the registration process by providing their phone number, they will receive a verification otp code via SMS. The user must then enter this code to verify their phone number and complete the registration process.

route: /auth/initiate-registration/verify-otp

Method: POST

Authorized: YES

Request:

json
{
  "otp": "string",
}

Response 200 OK:

json
{
  "message": "string",
  "token": "string"
}

Response 400 Bad Request:

json
{
  "error": "string"
}

Complete Registration

Complete the initiated user's details for actual registration

route: /auth/complete-registration

Method: POST Authorized: YES Request:

json
{
  "first_name": "string",
  "last_name": "string",
  "username": "string",
  "email": "string",
  "phone_number": "string",
  "password": "string"
}

Response:

json
{
  "message": "string",
  "user": User,
  "access_token": "string",
  "refresh_token": "string"
}

Login

Start Login

route: /auth/login

Method: POST Authorized: No Request:

json
{
  "phone_number":"string",
  "password": "string"
}

Response 200 OK:

json
{
  "message": "string",
  "token": "string"
}

Resend Login OTP

route: /auth/login/resend-otp

Method: POST

Authorized: YES

Request:

json
{
  "phone_number": "string"
}

Response 400 Bad Request:

json
{
  "message": "string"
}

Response 200 OK:

json
{
  "message": "string",
  "token": "string"
}

Verify login otp

route: /auth/verify-login-otp

Method: POST

Authorized: YES

Request:

json
{
  "otp": "string"
}

Response 400 Bad Request:

json
{
  "message": "string"
}

Response 200 OK:

json
{
  "message": "string",
  "user": User,
  "access_token": "string",
  "refresh_token": "string"
}
Was this page helpful?