After generating a token for the user, the next step is to check the status of the user’s email and phone number verification. This is done by calling the status check endpoint with the user’s ID.

Step 1: Prepare the Request #

URL:

https://auth-test.10npay.com/api/v1/User/{userId}/status


HTTP Method: GET

Headers:

accept: application/json

Authorization: Bearer {token}

URL Parameters:

{userId}: Replace this with the actual user ID obtained during the enrollment step.

Example URL: #

https://auth-test.10npay.com/api/v1/User/1330/status

Step 2: Send the Request #

Use a tool like curl, Postman, or your preferred HTTP client to send the request. Here’s a curl example:

curl -X 'GET' \ 'https://auth-test.10npay.com/api/v1/User/1330/status' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {Token}'

Step 3: Handle the Response #

Success Response: #

Status Code: 200 OK

Response Body:

{
"isEmailVerified": false,
"isPhoneNumberVerified": false
}

Error Responses: #

User Not Found:

Status Code: 400 Bad Request

Response Body: #

{
 "errors": {
 "Error": [
  "UserNotFound"
]
},
 "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
 "title": "Bad Request",
 "status": 400,
 "traceId": "00-d37cab6a6361528c39997d73e8ca8601-ecf6de63d22e9c74-01"
}

Purpose of Checking User Status #

The purpose of calling the https://auth-test.10npay.com/api/v1/User/{userId}/status endpoint is to verify whether the user’s email and phone number have been confirmed. This is a crucial step to ensure that the user’s contact information is verified for security and communication purposes.

Email Verification: If the email is not verified, the system should trigger an email containing a 6-digit verification code to the user’s email address.

Phone Number Verification: If the phone number is not verified, the system should trigger an sms containing a 6-digit verification code to the user’s phone.

Summary #

Prepare the request with the appropriate headers and URL, including the user’s ID.

Send the request using your preferred HTTP client.

Handle the response by checking the status code and response body to determine if the email and phone number are verified. If the user is not found, handle the error appropriately.

Snippet #

API Properties
Header parameters
Result of the call

Powered by BetterDocs