5sim-api
GetSMS
![NPM](https://nodei.co/npm/5sim-api.png?downloads=true&stars=true)
5sim-api - This is Node.js module that allows you to interact with the SMS services api
Description
The 5sim-api
is a powerful and easy-to-use API client for interacting with the 5sim.net service. This library allows you to manage SMS numbers, check your balance, retrieve order history, and handle incoming SMS.
Features
- Retrieve user balance
- Buy activation and hosting numbers
- Cancel or ban numbers
- Wait for incoming SMS
Installation
To install the package, run:
npm install 5sim-api
Yarn:
yarn add 5sim-api
Usage
import { FiveSim } from '5sim-api';
const client = new FiveSim('your_api_key');
async function bootstrap() {
const { balance } = await client.getUserBalance()
console.log(balance)
const { phone } = await client.buyActivationNumber()
console.log(phone)
}
bootstrap()
Balance Payload
{
id: number
email: string
vendor: string
default_forwarding_number: number
balance: number
rating: number
default_country: Country
default_operator: Operator
frozen_balance: number
}
Number Payload
{
id: number
phone: string
operator: string
product: string
price: number
status: StatusType
expires: Date
sms: null
created_at: Date
forwarding: boolean
forwarding_number: null
country: string
}
License
MIT License
Author
Purplex (github.com/HaloKodein)