Skip to main content

Change ID

Change user phone or email

Email Change Request

Intro

You will need to be logged in to Get change link. 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>
Authorization: <BEARER_TOKEN>

Request body

{
}

Body Validation

Empty object


Request

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

Response

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

Response Validation

  1. status - request status
  1. id - user ID
  1. message - response message

Example

Headers

Origin: http://localhost:3000
client_id: pSpisBrYn4yIP1vGILcdZ
Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Body

{
}

Response

{
"status": "success",
"id": "629ad74878103d4e4a74e9e6",
"message": "email sent To user@example.com"
}

Update user Email

Intro

Update user email. 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>
Authorization: <BEARER_TOKEN>

Request body

{
"token":"String",
"email":"String"
}

Body Validation

  1. token - Change email token sent to user
  1. email - new User email

Request

PATCH
http://localhost:5501/api/v1/auth/changeemail

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
Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Body

{
"token":"1fd05461dcbee1c09189a16866876df607c4bf14d13934287f3cc575f8c3972b",
"email":"newemail@example.com"
}

Response

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

Mobile Change Request

Intro

You will need to be logged in to Get change link. 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>
Authorization: <BEARER_TOKEN>

Request body

{
}

Body Validation

Empty object


Request

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

Response

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

Response Validation

  1. status - request status
  1. id - user ID
  1. message - response message

Example

Headers

Origin: http://localhost:3000
client_id: pSpisBrYn4yIP1vGILcdZ
Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Body

{
}

Response

{
"status": "success",
"id": "62d4e9bf167f537cf7db8c44",
"message": "Sms code sent"
}

Update user Phone

Intro

Update user email. 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>
Authorization: <BEARER_TOKEN>

Request body

{
"token":"String",
"phone":"String"
}

Body Validation

  1. token - Change phone SMS code sent to user
  1. phone - new User Phone

Request

PATCH
http://localhost:5501/api/v1/auth/changephone

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
Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Body

{
"token":"289897",
"phone":"254710xxxxxx"
}

Response

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