Skip to content

A simple but unofficial NPM package to send SMS using Callcentric.

Notifications You must be signed in to change notification settings

pinveson/callcentric-npm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🤙 Callcentric NPM

This is an unofficial package. I honestly don't recommend you use it until Callcentric implements an official SMS API. I'll try to maintain this package. Let me know if anything stops working.


1. Preparation

We must grab the cookie from our browser data. This is fairly easy if you know what you're doing.

  • Go to the SMS page and start a new conversation with yourself. Before you send the message, open Dev Tools and click Network.

  • Then, send the message and look for an event from sms.ajax.php in Headers. Click on this and find the cookie (it's below content-type) Copy it.


2. Installation

Next, we'll use this cookie in our code with the NPM package. You'll want your code to look something like this. We'll explain each part in the next step.

const call = require('callcentric-npm') //call the package

test() //call the function

async function test() {

console.log(await call('MSG', 'TO', 'FROM', 'COOKIE'))

}

3. Defining Variables

In the code above, MSG refers to the message content.

TO is the phone number you want to send the message to (18005551234).

FROM is the phone number you want to send the message from. This number must be linked to your Callcentric account (18005551234).

COOKIE is the cookie we copied earlier. It expires every few days, so make sure you reset it regularly.


When you call the function, your data is passing through our server proxy to reach Callcentric (this way your host IP doesn't get banned). No data is stored or collected in this process.


**Do not** try to build a chat bot or something similar with this API. Simply use this for text message notifications. Think of it as Twilio.

If you don't receive a response from our server right away, don't worry. Your message will send within 2 minutes.

About

A simple but unofficial NPM package to send SMS using Callcentric.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published