@alohi/faxplus-api
v3.0.5
Published
API client for faxplus
Downloads
10,678
Readme
Fax.Plus JavaScript SDK
- Also includes TypeScript definition
- Only available to Enterprise clients
Installation
// with npm
npm install @alohi/faxplus-api
// with yarn
yarn add @alohi/faxplus-api
Getting Started
Example usage:
const axios = require('axios');
const Configuration = require('@alohi/faxplus-api').Configuration;
const FaxesApiFp = require('@alohi/faxplus-api').FaxesApiFp;
const FilesApiFp = require('@alohi/faxplus-api').FilesApiFp;
const accessToken = "YOUR_ACCESS_TOKEN"
const configuration = new Configuration({
accessToken: accessToken,
basePath: 'https://restapi.fax.plus/v3',
});
// Get the first entry in the corporate member's inbox
const request = await FaxesApiFp(configuration).listFaxes({userId: "self"});
const response = await request(axios);
const cdrId = response.data.data.records[0].id;
// Upload file
const request = await FilesApiFp(configuration).uploadFile("self",
fs.createReadStream("./test/sample.pdf")
);
const response = await request(axios);
// Send fax
Documentation
Visit the full API reference at apidoc.fax.plus.
Author
© 2023 Alohi (Geneva, Switzerland) - Alohi.com