0.1.1 • Published 2 years ago

@osenco/africastalking v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Africa's Talking TypeScript Package

Install

yarn add '@osenco/africastalking'

Initialize

import { AfricasTalking }, ATConfig from '@osenco/africastalking'

const at = new AfricasTalking({
    username: '',
    apiKey: '',
    from: ''
})

Send SMS

Send one message to one

at.sms('Hello there').to(254705459494).send();

Send one message to many

at.smsMany('Hello there').to([254705459494, 254115911301]).send();

Send unique messages

With template

at.smsManyTemplate('Hello there', {name, amount}).to([254705459494, 254115911301]).send();

Predefined

at.smsManyDefine({'254705459494':'Hello there']).send();

Check balance

const balance = at.balance()