Contributing to the development of OVO API v3 features in the Unofficial OVOID API Wrapper for Node.js repository. GitHub Link.
Methods
- login2FA
- login2FAVerify
- loginSecurityCode
- getBalance
- getBudget
- logout
- unreadHistory
- getWalletTransaction
- generateTrxId
- transferOvo
Installation
npm install ovoid
or yarn add ovoid
Documentation
const OVOID = require('ovoid');
let ovoid = new OVOID();
Login
Step 1
let refId = await ovoid.login2FA('phone_number');
Response:
{
otp_refId: 'a82eddf0-1eee-400b-b8aa-xxxxxx',
device_id: '707503a4-9314-xxxx-a931-bf575c08b23b'
}
Step 2
let accessToken = await ovoid.login2FAVerify(refId.otp_refId, 'OTP', 'phone_number', refId.device_id);
Response
{
otp_ref_id: 'a82eddf0-1eee-400b-b8aa-1cce98fe10a8',
type: 'LOGIN',
expires_at: 1630598216,
otp_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb2RlaGFzaCI6IlptWmxZekJrTnpBeU5ESXpOR00zTjJGbU1Ea3daakF6TXpJMk1qTXdNV1UiLCJyYW5kb20iOiJNamt3TmpNM056STQiLCJ2ZXJzaW9uIjoxfQ.xxxxxxxxxxxxxx'
}
Step 3
let authToken = await ovoid.loginSecurityCode('PINOVO', accessToken.otp_ref_id, 'phone_number', refId.otp_refId, refId.device_id);
To access further resources
ovoid = new OVOID(authToken.refresh_token)
Get the number of unread notifications
Get the number of unread OVO account notifications.
let unread = await ovoid.getUnreadHistory();
Get notifications
Get OVO account notifications.
let notif = await ovoid.getAllNotification();
Get balance
Get your OVO balance, you can choose the wallet type:
- cash: OVO Cash
- point: OVO Point
let balanceCash = await ovoid.getBalance(type);
Transfer to another OVO user
Check if the recipient number is registered with OVO
let isOVO = await ovoid.isOVO(amount, 'recipient_number');
Transfer to the recipient number
let transferOvo = await ovoid.transferOvo('recipient_number', amount, 'note');
Transfer to a bank account
Check the bank code
let getRefBank = await ovoid.getRefBank();
Check transfer destination (transfer inquiry)
let transferInquiry = await ovoid.transferInquiry(account_number, amount, 'bank_code', 'bank_name', 'note');
Transfer to the recipient account
let transferBank = await ovoid.transferBank('recipient_name', 'ovo_account_number', 'recipient_account_number', amount, 'bank_code', 'bank_name', 'message', 'note');
Logout
ovoid.logout();