Installing and importing the library#
Beta version
The functionality is in beta mode. Features are subject to change and may also work unstably. There may be additional charges for functionality in the future.
You can request access to the functionality via GREEN-API support
The library works only in the browser — both in a project with a build step and on a plain page. It has no runtime dependencies of its own.
Installation#
npm i @green-api/whatsapp-api-calls-client-js
Import#
Using ES6 JavaScript or TypeScript:
import { GreenApiVoipClient } from '@green-api/whatsapp-api-calls-client-js';
The library has no separate build for connecting from a CDN with a <script src="..."> tag, so it is installed via npm and connected with an import. This also works on a page without a framework: the script is connected as a module (<script type="module" src="/main.js">), and the bundler substitutes the library — this is how the vanilla JavaScript example is built, see setting up the environment.
This completes the installation and import of the library.