Sms-Activate.org
This package fully supports all the https://sms-activate.org/ API with Typescript types.
Installation
Install the package using npm
npm install sms-activate-org
Usage/Examples
import { SMSActivate, SMSNumber } from 'sms-activate-org';
const api = new SMSActivate('myapikey');
(async () => {
const balance = await api.getBalance();
console.log(`My balance is ${balance}`);
})();
api.getNumber({ service: 'Gmail', country: 'France' }).then(async (number: SMSNumber) => {
await number.ready();
number.getCode(180).then(async code => {
await number.success();
}).catch(err => {
console.error(err);
number.failed();
})
}).catch(console.error);