Skip to content

Account Security

This document outlines the API endpoints for account security management, like for email updating and phone no. updating with OTP (One-Time Passwords) Verification.

Base URL

  • Base path /api2/security

Authorization

  • Requires Cookie: JSESSIONID=session_id

Data Schema

Field Type Description
field string Type of field being updated (email or phone)
value string New value for the field
otp string One-Time Password for verification

Init Update

Initiates the updating process by sending an OTP to the user's email or phone number.

🛠 Endpoint:

POST /update/init

Request Body:

Parameter Type Required Description
field email or phone required Key of the field being updated
value string required Value of the field being updated
200 OK
{
  "message": "OTP sent!",
}

Finish Update

Completes the update process by verifying the OTP and updating the user's information.

🛠 Endpoint:

POST /update/init

Request Body:

Parameter Type Required Description
field email or phone required Key of the field being updated
value string required Value of the field being updated
otp string required OTP sent to your email or phone
200 OK
{
 "name": "username",
 "phone": "9384738473874",
 ...other data
}

Verify Password

Validates passwrod, which can be used before performing secured actions

🛠 Endpoint:

POST /verify-password

Request Body:

Parameter Type Required Description
password string required Old password to check

cURL Request:

curl -X POST "https://api.trackongps.com/api2/security/verify-password" \
-H "Cookie: JSESSIONID=your_session_id" \
-H "Content-Type: application/json" \
-d '{
  "password": "your_password"
}'
200 OK
{
  "id":123,
 "name": "username",
 "phone": "9384738473874",
 ...other data
}