npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

insim

v1.1.5

Published

npm i insim # Usage ## Sending SMS ```node.js const insim=require('insim'); var api =new insim()

Downloads

18

Readme

insim-node.js

Installation

npm i insim

Usage

Sending SMS

const insim=require('insim');
var api =new insim()

var data=JSON.stringify({
    "header": {
      "login": "[email protected]",
      "accessKey": "xYGt5Dl9wKvz+#RGGU!PjVB+KfiJAYnh%z4&q7oLL3xHRJ1KiN",
      "mode": "prod",
      "priority": 1
    },
    "messages": [
      {
        "phone_number": "+33******",
        "message": "Hi Cassandra, can you confirm our appointement?",
        "url": "https://www.my-link.com/",
        "priorite": 1,
        "date_to_send": "2022-10-29 14:12:10"
      }
    ]
  })
api.sendSmsApi(data,function(rep){
console.log(rep)
});
[
    {
        "id_sms_api": "Pf7v16XZ38oT02s",
        "sms_per_message": 1,
        "user": "[email protected]",
        "sent_time": "2022-10-29T14:12:53.996Z",
        "phone_number": "+336**",
        "message": "Hi Cassandra, can you confirm our appointement https://arsms.co/oloe00F6Vvsa \n \nSent for free from PC via arsms.co/free",
        "sent": 1
    }
]

Adding Contact

var contacts=JSON.stringify({
    "header": {
      "login": "[email protected]",
      "accessKey": "xYGt5Dl9wKvz+#RGGU!PjVB+KfiJAYnh%z4&q7oLL3xHRJ1KiN",
      "api": true
    },
    "contacts": [
      {
        "first_name": "Joe",
        "last_name": "",
        "phone_number": "0654*******", // local format with country code
        "country_code": "FR",
        "email": ""
      },
      {
        "first_name": "John",
        "last_name": "Smith",
        "phone_number": "+33621*******", // international format with or without country code
        "country_code": "FR",
        "email": ""
      }
    ]
  });
const insom=require('insim');
var api =new insim();
 api.addContactApi(contacts,function(contact){
   console.log(contact)
 });
Result example:
 {  

        "data":{  

        "contact":[  

        {

        "phone_number": "+33654XXXXXX",     // international format

        "first_name": "Doe",

        "last_name": "Joe",

        "adress": "contact adress"

        "email": "[email protected]",

        "result":"success"

        },
        {

        "phone_number": "+33621XXXXXX",     // international format

        "first_name": "John",

        "last_name": "Smith",

        "adress": "contact adress"

        "email": "[email protected]",

        "result":"success"

        }
        ]

        }

        }

Urls Callback (You do not need to install api solo to use it)

To use urls callbacks in order to get incoming Sms ,Sms delivery status ...You just need to have in your callback url :

Case Message delivery status :

var status_message =JSON.parse(req.query.status);
status_message is an object like this:
{
  "user":"SENDER_LOGIN",

   "phone_number":"RECIPIENT",

   "status":"received",      // values : "sent" or "received"

   "date_status":"2019-08-09T12:50:54.211Z",

   "id_sms_api":"YOUR_ID_SMS"      // or the one we provide you if empty when sending

 }

Case GET INCOMING MESSAGE :

var message =JSON.parse(req.query.message);

message is an object like this:
{
  "title":"incoming sms",

    "from":"+1XXXXXXXXXX",    // phone number (international format)

    "message":"Hello world !",

    "date":"2020-01-21 10:01:38"

 }

Case GET Clicked link :

var click =JSON.parse(req.query.click);
click is an object like this:
{  

    "title":"clicked link",

    "phonenumber":"+1XXXXXXXXXX",    // phone number (international format)

    "link":"https:\/\/www.my-link.com\/",

    "date":"2019-07-08 15:07:03",

    "id_sms_api":"YOUR_ID_SMS"      // or the one we provide you if empty when sending

 }

Case GET CALL LOGS :

var call  =JSON.parse(req.query.call);

call  is an object like this:
{  

    "TITLE":"INCOMING CALL", // or "OUTGOING CALL" or "MISSED"

    "PHONE_NUMBER":"+1XXXXXXXXXX",

    "CALL_TIME":"2019-07-05",

    "DURATION": "15:11:04"

 }

Case GET CALL QUALIFICATION :

var qualification  =JSON.parse(req.query.calls);


qualification is an object like this:
{

"title":"Call qualification From Mobile",// or title can be "Call qualification From Interface"

"from":"+1XXXXXXXXXX", // phone number (international format)

"qualification":"Hello world !",

"date":"2020-01-21 10:01:38"

}