@oyenjs/inbound

4.0.2 • Public • Published

@oyenjs/inbound

Client library for the inbound message service from oyen.

Install

npm install @oyenjs/inbound

Usage

Email

import { Inbound } from '@oyenjs/inbound';

const email = await Inbound.from({
  teamId: '<your oyen team id>',
  accessToken: 'eyj...',
  email: 'test@example.oyenmail.com',
});

const message = await email.once('message');

console.log(message);
// {
//   from: 'somewhere@example.com',
//   to: 'test@example.oyenmail.com',
//   raw: '<mime encoded email>',
// }

SMS

import { Inbound } from '@oyenjs/inbound';

const sms = await Inbound.from({
  teamId: '<your oyen team id>',
  accessToken: 'eyj...',
  sms: '+65 8888 8888',
});

const message = await sms.once('message');

console.log(message);
// {
//   from: '+1234 456 7890',
//   to: '+65 8888 8888',
//   raw: 'Hello, World!',
// }

Readme

Keywords

none

Package Sidebar

Install

npm i @oyenjs/inbound

Weekly Downloads

0

Version

4.0.2

License

MIT

Unpacked Size

133 kB

Total Files

31

Last publish

Collaborators

  • block65-bot
  • maxholman