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.eyowo.com/v1/users/auth/validate
Request Body: { "mobile" : "2348000000" }
Headers
X-App-Key
string
X-App-Key
Request Body
mobile
string
2348012345678 <valid Nigeria num>
{
"success": true,
"data": {
"user": {
"id": "OKHN8E4SS",
"mobile": "2348000000000"
}
},
"message": "Validation successful"
}
Send OTP
POST
https://api.console.eyowo.com/v1/users/auth
Request Body: { "mobile" : "23480000000000" , "factor" : "sms" }
Headers
X-App-Key
string
X-App-Key
Request Body
mobile
string
2348012345678 <valid Nigerian num>
factor
string
sms
{
"success": true,
"message": "Please enter the passcode sent to 2348000000000"
}
Verify OTP
POST
https://api.console.eyowo.com/v1/users/auth
Request Body : { "mobile" : "234809999999", "factor": "sms", "passcode": "1234" }
Headers
X-App-Key
string
X-App-Key
Request Body
mobile
string
23480123456789 <valid Nigerian num>
factor
string
sms
passcode
string
12345 <valid otp>
{
"success": true,
"message": "Wallet added successfully",
"data": {
"refreshToken": "5d07619d019bd118ae99786f3a34840d999b1e84",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkMDc2MTlkMDE5YmQxMThhZTk5Nzg2ZiIsIm1vYmlsZSI6IjIzNDgxODQyMDkxODgiLCJpYXQiOjE1NjA3NjQ4MjksImV4cCI6MTU2MDg1MTIyOX0.g90RxjYHhZJi9XVF1ZMYJQZu_rbUDXtPV77AjuE-HEU",
"expiresIn": 86400
}
}
Refresh Access Wallet Token
POST
https://api.console.eyowo.com/v1/users/accessToken
Request Body : { "refreshToken": "5d1a....." }
Headers
X-App-Key
string
X-App-Key
Request Body
refreshToken
string
wallet refresh access token
{
"success": true,
"data": {
"accessToken": "kyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZDI6IjVkMWE4YjEzZjliZTJiNmE2MmUwZDEwMyIsIm1vYmlsZSI6IjIzNDgxODQyMDkxODgiLCJpYXQiOjE1NjI1MzMwNDEsImV4cCI6MTU2MjYxOTQ0MX0.qyZqwrmIIMLloPGbL9q-3O64nQwYNg5DtzDE7B776dQ",
"expiresIn": 86400
}
}
GET
{{BASE_URL}}/v1/users/accounts
Headers
X-App-Key*
String
Application Key
X-App-Wallet-Access-Token *
String
{
success: true,
data: [
{
accountNumber: “700000”
balance: 100000,
type : “personal”
tier: “2”
secret: “chwha1133==“
}
]
}
Last updated
Was this helpful?