TrackMe API Docs

Verify registration SMS and issue access and refresh tokens.

POST
/api/v1/auth/verify-otp

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/auth/verify-otp" \  -H "Content-Type: application/json" \  -d '{    "emailOrPhone": "string",    "code": "string"  }'
{  "data": {    "user": {      "id": "string",      "fullName": "string",      "email": "[email protected]",      "phone": "string",      "isVerified": true,      "avatarFileId": "string",      "avatar": {        "original": "string",        "thumb": "string",        "medium": "string",        "large": "string"      },      "city": "string",      "country": "string",      "status": "string",      "types": [        "string"      ],      "preferences": {},      "language": "string",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "deletedAt": "2019-08-24T14:15:22Z"    },    "token": "string",    "accessToken": "string",    "refreshToken": "string",    "accessTokenExpiresAt": "2019-08-24T14:15:22Z",    "refreshTokenExpiresAt": "2019-08-24T14:15:22Z"  },  "meta": {    "requestId": "string"  }}
{  "error": {    "code": "VALIDATION_ERROR",    "message": "One or more fields are invalid.",    "fields": [      {        "path": "email",        "rule": "email",        "message": "Must be a valid email address."      }    ]  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}
{  "error": {    "code": "RATE_LIMITED",    "message": "Too many requests — slow down and retry after the indicated delay.",    "retryAfterSeconds": 60  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}