Skip to content

KennethWussmann/simplelogin-client

Repository files navigation

simplelogin-client

Zero-dependency TypeScript client for the SimpleLogin.io API. Compatible with NodeJS and browsers.

DocumentationAPI Spec

Features

Interested in the state of the project? Check the faq!

Getting started

simplelogin-client works in most NodeJS versions and browsers, but may require a tweak when not used with NodeJS 18 or in outdated browsers. Check the compatibility guide.

To start using this API client in your JS/TS projects:

# Install dependency
npm install --save simplelogin-client
import { AliasApi, SimpleLoginConfig } from 'simplelogin-client';

const alias = new AliasApi(
  new SimpleLoginConfig({
    apiKey: process.env.API_KEY,
  }),
);

const createdAlias = await alias.createRandomAlias({
  note: 'This alias was created with simplelogin-client!',
});

console.log(createdAlias);
/* Output:
{
  id: 50001,
  creation_date: '2023-02-10 20:19:37+00:00',
  alias: '[email protected]',
  mailbox: { email: '[email protected]', id: 50001 },
  enabled: true,
  pinned: false,
  note: "This alias was created with simplelogin-client!",
  ...
}
*/

Check the documentation for all available methods and the FAQ in case of questions.

‼️ Please don't contact the SimpleLogin team with issues regarding this client. Instead open an issue in this repository.

Development

Want to contribute fixes to the API client or spec? Check the development guide!