Verify Login PIN API
Overview
Verify a user's login PIN and authenticate them, returning JWT token and user details.
API Details
- Method: POST
- URL: https://api.gafapay.com:8443/gafapay/v3/auth/verify_login_pin
- Content-Type: application/json
- authorization: Token required
- companyid: 59388167894b4d10a04fe5da3b8a2104
- requestid: b35d332f-131e-44c1-892f-8322e022da74
Constants
- User Types:
2= Customer3= Merchant5= Agent
Endpoint
POST https://api.gafapay.com:8443/gafapay/v3/auth/verify_login_pin
Headers
authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJmYjhmMDkyMTBlMGY0NmI3YjQyNjJkNzdmNWI2YzI3MyIsInJvbGVzIjpbIlJPTEVfQ1VTVE9NRVIiXSwiZXhwIjoxNzU2NTM1NTg2fQ.sg9RN_6hWjU3bTKjSVx6HUVYzlDEmYuw4mdjQMI5v8Q
companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: b35d332f-131e-44c1-892f-8322e022da74
Content-Type: application/json
Request Body
{
"dial_code": "+221",
"phone_number": "968784549",
"user_type": 2,
"login_pin": "1234"
}
Request Body Fields
- dial_code (string, required): Country dial code (e.g., "+221")
- phone_number (string, required): User's phone number
- user_type (integer, required): Type of user
2= Customer3= Merchant5= Agent
- login_pin (string, required): The PIN code to verify
Response
{
"success": 1,
"error": [],
"data": {
"message": "AUTH_USER_SUCCESSFULLY_LOGIN",
"token": {
"type": "Token",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIyYzYyNjdlMjFlMTY0YjM0YjYzZmE2MjEzYmMyYWE2ZiIsInJvbGVzIjpbIlJPTEVfQ1VTVE9NRVIiXSwiZXhwIjoxNzU3MTAwMTUyfQ.XSgvETwqM3NZUFb6ZXehhmflaaBDLNi0Cxjmybqvhv8"
},
"user_id": "2c6267e21e164b34b63fa6213bc2aa6f"
}
}
Response Fields
- success (integer): Response status indicator
1= Success0= Failure
- error (array): Array of error messages (empty on success)
- data (object): Response data object
- message (string): Success message indicating successful login
- token (object): Authentication token details
- type (string): Token type ("Token")
- token (string): JWT authentication token
- user_id (string): Unique identifier of the authenticated user
Example Usage
curl --location 'https://api.gafapay.com:8443/gafapay/v3/auth/verify_login_pin' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJmYjhmMDkyMTBlMGY0NmI3YjQyNjJkNzdmNWI2YzI3MyIsInJvbGVzIjpbIlJPTEVfQ1VTVE9NRVIiXSwiZXhwIjoxNzU2NTM1NTg2fQ.sg9RN_6hWjU3bTKjSVx6HUVYzlDEmYuw4mdjQMI5v8Q' \
--header 'companyid: 59388167894b4d10a04fe5da3b8a2104' \
--header 'requestid: b35d332f-131e-44c1-892f-8322e022da74' \
--header 'Content-Type: application/json' \
--data '{
"dial_code": "+221",
"phone_number": "968784549",
"user_type": 2,
"login_pin": "1234"
}'