simplelogin-client
Zero-dependency TypeScript client for the SimpleLogin.io API. Compatible with NodeJS and browsers.
Interested in the state of the project? Check the faq!
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: 'nederlanden_heatherington@example.com',
mailbox: { email: 'somewhere@gmail.com', 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.
:bangbang: Please don't contact the SimpleLogin team with issues regarding this client. Instead open an issue in this repository.
Want to contribute fixes to the API client or spec? Check the development guide!