Client library for the inbound message service from Oyen.
npm install @oyen-oss/inbound
import { Inbound } from '@oyen-oss/inbound';
const email = await Inbound.from({
teamId: '<your oyen team id>',
accessToken: 'eyj...',
handle: 'test',
domain: 'oyenbound.com',
});
const message = await email.once('message');
console.log(message);
// {
// from: 'somewhere@example.com',
// to: 'test@oyenbound.com',
// raw: '<mime encoded email>',
// }
import { Inbound } from '@oyen-oss/inbound';
const sms = await Inbound.from({
teamId: '<your oyen team id>',
accessToken: 'eyj...',
number,
});
const message = await sms.once('message');
console.log(message);
// {
// from: '2348123456789',
// to: '2348123456789',
// raw: 'Hello, World!',
// }