5sim-api
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

5sim-api

GetSMS

NPM version NPM downloads

NPM

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() {
  // Get user balance
  const { balance } = await client.getUserBalance()
  console.log(balance)


  // Buy an activation number
  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)

Package Sidebar

Install

npm i 5sim-api

Weekly Downloads

10

Version

1.0.2

License

MIT

Unpacked Size

52 kB

Total Files

5

Last publish

Collaborators

  • codein-purple