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

one_msg_waba_sdk

v2.39.5

Published

[1MSG.IO](https://1msg.io/) is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks. Every API request must contain an Authorize HTTP header with a token. This is your channel token, w

Downloads

30

Readme

one_msg_waba_sdk

OneMsgWabaSdk - JavaScript client for one_msg_waba_sdk 1MSG.IO is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks.

Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly.

The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={your_token}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body.

All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 2.39.5
  • Package version: 2.39.5
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

Installation

npm

install it via:

npm install one_msg_waba_sdk --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your one_msg_waba_sdk from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Vite Configuration

Using Vite you may encounter errors. You might need to add a babel plugin to your vite.config.js

import babel from 'vite-plugin-babel';

export default defineConfig({
  plugins: [babel()],
})

Getting Started

Please follow the installation instruction and execute the following JS code:

import * as OneMsgWabaSdk from 'one_msg_waba_sdk'
let defaultClient = OneMsgWabaSdk.ApiClient.instance;
// Configure path to your instance
defaultClient.basePath = "https://api.1msg.io/YOUR_INSTANCE_NUMBER/";

// Configure API key authorization: token
let token = defaultClient.authentications['token'];
token.apiKey = "YOUR_TOKEN_KEY_FOR_INSTANCE"

let api = new OneMsgWabaSdk.ChannelApi()
api.getMe().then(data=>{
  console.log(data)
},err=>{
  console.error(err)})

Documentation for API Endpoints

All URIs are relative to https://api.1msg.io/YOUR_INSTANCE_NUMBER

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- OneMsgWabaSdk.ChannelApi | getCommerce | GET /commerce | Get Commerce Settings OneMsgWabaSdk.ChannelApi | getExtendedStatistics | GET /extendedStatistics | Get Extended Channel statistics OneMsgWabaSdk.ChannelApi | getMe | GET /me | Get Profile Info OneMsgWabaSdk.ChannelApi | getSettings | GET /settings | Get Settings OneMsgWabaSdk.ChannelApi | getStatistics | GET /statistics | Get Channel statistics OneMsgWabaSdk.ChannelApi | getStatus | GET /status | Get Status OneMsgWabaSdk.ChannelApi | outputIP | GET /outputIP | Get channel server IP OneMsgWabaSdk.ChannelApi | setMe | POST /me | Change user info OneMsgWabaSdk.ChannelApi | setSettings | POST /settings | Set settings OneMsgWabaSdk.MediaApi | uploadMedia | POST /uploadMedia | Upload media & get mediaId OneMsgWabaSdk.MessagingApi | messagesList | GET /messages | Get messages list OneMsgWabaSdk.MessagingApi | readMessage | POST /readMessage | Mark message as read OneMsgWabaSdk.MessagingApi | sendContact | POST /sendContact | Send a Contact OneMsgWabaSdk.MessagingApi | sendFile | POST /sendFile | Send a File OneMsgWabaSdk.MessagingApi | sendList | POST /sendList | Send List Message OneMsgWabaSdk.MessagingApi | sendLocation | POST /sendLocation | Send a Location OneMsgWabaSdk.MessagingApi | sendMessage | POST /sendMessage | Send a Message OneMsgWabaSdk.ProductsCatalogsApi | sendProduct | POST /sendProduct | Send a Product OneMsgWabaSdk.ProductsCatalogsApi | setCommerce | POST /commerce | Set Commerce Settings OneMsgWabaSdk.TemplatesApi | addTemplate | POST /addTemplate | Create template OneMsgWabaSdk.TemplatesApi | removeTemplate | POST /removeTemplate | Remove template OneMsgWabaSdk.TemplatesApi | sendTemplate | POST /sendTemplate | Send Template Message OneMsgWabaSdk.TemplatesApi | templatesList | GET /templates | Get templates list OneMsgWabaSdk.WebhooksApi | ackHookInfo | GET /hookInfo | Check ACKs OneMsgWabaSdk.WebhooksApi | setWebhook | POST /webhook | Set webhook

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

token

  • Type: API key
  • API key parameter name: token
  • Location: URL query string