Socket
Socket
Sign inDemoInstall

@sheilim/shimli-sdk

Package Overview
Dependencies
2
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @sheilim/shimli-sdk

API for sending WhatsApp, CRM, chatbot and more channels such as Facebook Messenger and Telegram


Version published
Weekly downloads
17
increased by6.25%
Maintainers
1
Install size
402 kB
Created
Weekly downloads
 

Readme

Source

shimli-sdk

Use of the Shimli api to send and read messages from the channels available in Shimli (WhatsApp, SMS, Telegram, Facebook Messanger and Instagram)

Link: https://www.shimli.app

Installation

npm i @sheilim/shimli-sdk --save

How is it used?

Send WhatsApp

const shimli = require('@sheilim/shimli-sdk');

(function(){
    shimli.config['token'] = "YOUR_TOKEN";
    const result = await shimli.sendWhatsApp({
        "type": "chat",
        "body": "Hi!! 👋",
        "to": "14243962506",
        "instance": "ID_INSTANCE"
    });
    if(result.error)
        console.log(result.message);
    else
        console.log(result);
})();

Options sendWhatsApp

  • type - string I could be chat, image, video, audio, location, document, sticker, gif, buttons, lists
  • body - string Message text or url of the media file to send
  • to - string WhatsApp number to which the message will be sent
  • instance - string Id of the instance connected to Shimli
  • caption - string (optional) Image or video caption
  • filename - string (optional) Name of the document to send
  • lat - string Required if it is of type location
  • lng - string Required if it is of type location

Send Facebook Messenger

const shimli = require('@sheilim/shimli-sdk');

(function(){
    shimli.config['token'] = "YOUR_TOKEN";
    const result = await shimli.sendFbMessenger({
        "type": "text",
        "body": "Hi!! 👋",
        "to": "PSID",
        "instance": "ID_INSTANCE"
    });
    if(result.error)
        console.log(result.message);
    else
        console.log(result);
})();

Options sendFbMessenger

  • type - string I could be text, image, video, audio, file
  • body - string Message text or url of the media file to send
  • to - string PSID
  • instance - string Id of the instance connected to Shimli
  • caption - string (optional) Image or video caption

Send WhatsApp Business API

const shimli = require('@sheilim/shimli-sdk');

(function(){
    shimli.config['token'] = "YOUR_TOKEN";
    const result = await shimli.sendWhBusinessApi({
        "type": "text",
        "body": "Hi!! 👋",
        "to": "14243962506",
        "instance": "ID_INSTANCE"
    });
    if(result.error)
        console.log(result.message);
    else
        console.log(result);
})();

Options sendWhBusinessApi

  • type - string I could be text, image, video, audio, document
  • body - string Message text or url of the media file to send
  • to - string WhatsApp number to which the message will be sent
  • instance - string Id of the instance connected to Shimli
  • caption - string (optional) Image or video caption

Add Lead to Shimli

const shimli = require('@sheilim/shimli-sdk');

(function(){
    shimli.config['token'] = "YOUR_TOKEN";
    const result = await shimli.leadInsert({
        to: "ID_CLIENT",
        instance: "ID_INSTANCE",
        text: "Insert Lead! 👋", channel: "whatsapp"
    });
    if(result.error)
        console.log(result.message);
    else
        console.log(result);
})();

Options leadInsert

  • to - string PSID (Facebook Messenger) or WhatsApp number
  • instance - string Id of the instance connected to Shimli
  • text - string Lead opening text
  • channel - string whatsapp or fb-messenger
  • area - string (optional) Id area Shimli
  • agent - string (optional) Id agent Shimli
  • process - string (optional) Id process
  • tags - string (optional) example ["customer service", "sales"]

Keywords

FAQs

Last updated on 04 Jan 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc