Authentication

Authenticating a user's account and retrieving a wallet access token grants you, the developer, privileges to perform certain transactions like Phone Transfers, Bank Transfer, and purchasing VTU(s).

To obtain a wallet access token (X-App-Wallet-Access-Token), you have to validate the account is a valid Eyowo account, send an OTP, and finally, verify the OTP.

Validate User

POST https://api.console.staging-api.eyowo.com/v1/users/auth/validate

Usage: { "mobile" : "2348000000" }

Headers

Name
Type
Description

X-App-Key

string

X-App-Key

Request Body

Name
Type
Description

mobile

string

2348012345678 <valid Nigeria num>

{
  "success": true,
  "data": {
    "user": {
      "id": "OKHN8E4SS",
      "mobile": "2348000000000"
    }
  },
  "message": "Validation successful"
}

Send OTP

POST https://api.console.staging-api.eyowo.com/v1/users/auth

Usage: { "mobile" : "23480000000000" , "factor" : "sms" }

Headers

Name
Type
Description

X-App-Key

string

X-App-Key

Request Body

Name
Type
Description

mobile

string

2348012345678 <valid Nigerian num>

factor

string

sms

Verify OTP

POST https://api.console.staging-api.eyowo.com/v1/users/auth

Usage: { "mobile" : "234809999999", "factor": "sms", "passcode": "1234" }

Headers

Name
Type
Description

X-App-Key

string

X-App-Key

Request Body

Name
Type
Description

mobile

string

23480123456789 <valid Nigerian num>

factor

string

sms

passcode

string

12345 <valid otp>

Refresh Access Wallet Token

POST https://api.console.staging-api.eyowo.com/v1/users/accessToken

Usage: { "refreshToken": "5d1a....." }

Headers

Name
Type
Description

X-App-Key

string

X-App-Key

Request Body

Name
Type
Description

refreshToken

string

wallet refresh access token

Note

A user's wallet access token expires after a day. You might need to refresh the wallet to maintain access to the account.

Last updated

Was this helpful?