A full NodeJS sms-activate.org api wrapper up to date in Typescript

Overview

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}`);
})();

/* Getting a number to activate Gmail services,
* the wrapper automatically resolves country and services names */
api.getNumber({ service: 'Gmail', country: 'France' }).then(async number: SMSNumber => {

  // Do your stuff with number.phoneNumber here,
  // like writing in the number field

  /** Setting code status to Ready **/
  await number.ready(); // or api.setStatus({ id: number.activationId, status: EActivationSetStatus.Ready });

  // Press the send sms button

  try {
    /** Waiting a maximum of 180s for the code to arrive **/
    const code = await number.getCode();

    // Do your stuff with the code there

    /** Setting code status to Success if everything worked as expected **/
    await number.success(); // or api.setStatus({ id: number.activationId, status: EActivationSetStatus.Success });

  } catch(err) {
    console.error(err);

    /** Setting code status to Failed if the code was used **/
    await number.failed();
  }

}).catch(error => console.error);

Note

I wrapped all the website API, the wiki is not yet finished but don't hesitate to ask for help in issues.

You might also like...

This is just a script I put together to check and notify me via email (MailGun) when there's an earlier date before my initial appointment date. It doesn't handle rescheduling.

This is just a script I put together to check and notify me via email (MailGun) when there's an earlier date before my initial appointment date. It doesn't handle rescheduling.

US-visa-appointment-notifier This is just a script I put together to check and notify me via email (MailGun) when there's an earlier date before my in

Jan 4, 2023

This is a full-stack exercise tracker web application built using the MERN (MongoDB, ExpressJS, ReactJS, NodeJS) stack. You can easily track your exercises with this Full-Stack Web Application.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Dec 25, 2021

A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and configure Typescript on it.

A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and configure Typescript on it.

CTSP- Create TS Project A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and conf

Sep 13, 2022

A simple nodejs module which is wrapper around solc that allows you to compile Solidity code

A simple nodejs module which is wrapper around solc that allows you to compile Solidity code

Simple Solidity Compiler It's a simple nodejs module which is wrapper around solc that allows you to compile Solidity code and get the abi and bytecod

Feb 21, 2022

freeCodeCamp.org's open source codebase and curriculum. Learn to code for free.

freeCodeCamp.org's open source codebase and curriculum. Learn to code for free.

freeCodeCamp.org's open-source codebase and curriculum freeCodeCamp.org is a friendly community where you can learn to code for free. It is run by a d

Jan 7, 2023

A pretty cool org-mode - interactive blog post tool

Radish A kinda-cool org-mode - interactive blog post tool written with and for Clojure(script). Here are two example posts created with this tool: Ra

Dec 28, 2021

Sumber kode dan kurikulum terbuka ngoding.org. Belajar pemrograman secara gratis.

Sumber kode dan kurikulum terbuka ngoding.org. Belajar pemrograman secara gratis.

Kode sumber dan kurikulum terbuka ngoding.org ngoding.org merupakan sebuah komunitas sumber terbuka yang memiliki misi untuk menyediakan sumber belaja

Nov 13, 2022

Get the answer in both wordle and wordleunlimited.org

Wordle Hack The best Wordle Hack. Discord Support Server: https://discord.gg/wqz4jW6a Made by rxzyx (rzx). This is purley for education purposes. 📫 H

Dec 15, 2022

The main repository for Youarerad.org

The main repository for Youarerad.org

Welcome to Rise Above The Disorder's Website Repo! We are a non-profit covering the cost of mental health care for people all over the world. Original

Jan 3, 2023
Comments
  • code cut off at https:

    code cut off at https:

    issue with parsing response, this is the response from api:

    Spark Wallet Verification :. Please click the link to verify your mobile phone number. https://link.sparkwallet.io/somesecretcode

    but what arrives:

    Spark Wallet Verification :. Please click the link to verify your mobile phone number. https:

    again because of the way this library checks for : and splits them. I think it should just send everything after the response is parsed.

    opened by pseudozach 3
  • failure on other code with : inside

    failure on other code with : inside

    can you handle this response from API:

    STATUS_OK:Dein OpenAI API Sicherheitscode lautet: 194130

    in this case, it returns Dein OpenAI API Sicherheitscode lautet where it should return Dein OpenAI API Sicherheitscode lautet: 194130

    opened by pseudozach 3
Owner
SegFault
SegFault
This gem aims to let you quickly send SMS from JavaScript and Python using the Orange SMS API.

Orange SMS API ?? Orange SMS is a client library that allow you to send SMS with Javascript and Python using the Orange SMS API Disclaimer â›” This gem

Honorable Con 6 Aug 4, 2022
Monitor incoming SMS for SMS-codes, add them to clipboard

MacOs only. Monitors SMS for codes, adds them to the clipboard. Monitors Messages SQLite file ~/Library/Messages/chat.db for new messages, uses regexp

Ilya Kantor 3 Sep 23, 2022
Nepali Multi Date Picker for jQuery. Supports both single date selections and multiple date selection.

Nepali Multi Date Picker A simple yet powerful date picker based in Nepali calendar. Supports both single date selections and multiple date selection.

Sanil Shakya 4 May 23, 2022
Create folder of snippets to activate them in one click !

-> FR Obsidian Group Snippet This plugin allow you to set group of CSS snippets to class them and enable them in one click (or command). Also, this pl

Lisandra Simonetti 8 Dec 31, 2022
It's a wrapper for tononkira.serasera.org (Lyrics database for Malagasy Songs)

Tonokira-Ts It's a wrapper for tononkira.serasera.org (Lyrics database for Malagasy Songs) ?? Install npm i tonokira #or yarn add tonokira ?? Usage

Toky 5 Aug 19, 2022
Textme.lk SMS SDK and Sample Apps

TextME Javascript SDK Table of Content Introduction Prerequisite Install Getting Started APIs constructor sendSMS viewSMS viewAllSMS Models ClientConf

Iconicto 3 Jan 29, 2022
Verify your E-Mail and Phone Number using link sent over mail and sms.

Phone-and-Mail-Verification-With-Link Verify your E-Mail and Phone Number using link sent over mail and sms. Endpoints POST /user/create Body { "n

Prasoon Soni 5 Sep 14, 2022
Verify your E-Mail and Phone Number using link sent over mail and sms.

Send Verification Link ✅ Explore the docs » • Report Bug • Request Feature • About The Project Verify your E-Mail and Phone Number using link sent ove

Prasoon Soni 4 Jun 28, 2022
A Roblox OpenCloud API wrapper for Deno (and NodeJS) written in TypeScript.

Active Development This module is currently in active development. Nothing is going to stay consistent as it reaches a stable release. Dynablox Docs |

null 12 Oct 28, 2022
this is a single-page web application. we built a book website where the user can add , remove and display books. we used modules to implement these functionalities. also, we used the Date class to display the date and time.

Awsome Books In this Project, we have built A Books websites. Built With ?? HTML CSS javascript Git & Github Live Demo Here you can find the live Demo

Nedjwa Bouraiou 10 Aug 3, 2022