Eyowo Developer
Get An Account
staging
staging
  • Welcome, Engineer! 👩‍💻 👨‍💻
  • Getting Started
    • User Account & Developer Mode
    • Setup Developer Account
    • Setup Developer App
  • Api resources
    • Create Eyowo Account
    • Authentication
    • Transfers
    • Transactions
    • Banks
    • Query BVN
  • Reference
    • API Reference
    • Bank List
  • Additional Resource
    • Create App
Powered by GitBook
On this page
  • Validate User
  • Send OTP
  • Verify OTP
  • Refresh Access Wallet Token

Was this helpful?

  1. Api resources

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"
}
{
    "success": false,
    "error": "This user does not exist",
    "errorCode": "10003"
}

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

{
  "success": true,
  "message": "Please enter the passcode sent to 2348000000000"
}

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>

{
    "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.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

{
    "success": true,
    "data": {
        "accessToken": "kyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZDI6IjVkMWE4YjEzZjliZTJiNmE2MmUwZDEwMyIsIm1vYmlsZSI6IjIzNDgxODQyMDkxODgiLCJpYXQiOjE1NjI1MzMwNDEsImV4cCI6MTU2MjYxOTQ0MX0.qyZqwrmIIMLloPGbL9q-3O64nQwYNg5DtzDE7B776dQ",
        "expiresIn": 86400
    }
}

Note

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

PreviousCreate Eyowo AccountNextTransfers

Last updated 4 years ago

Was this helpful?