# Mailosaur and Playwright - Quickstart guide Get Mailosaur up and running within your Playwright project in a few steps. ## What you'll need - A Mailosaur account or [free trial account](/app/signup). - An [API key](/app/keys) generated in your account. - Knowledge of how to send emails (or SMS) into your account. ## Express: Generate a sample project With **npm** installed, get started by generating a basic starter project for Playwright via the command line: ```sh npm create mailosaur@latest ``` This gives you a simple Playwright project with Mailosaur pre-configured, along with some basic tests. You can also see [sample code](https://github.com/mailosaur/examples/tree/main/playwright) on GitHub. ## Integrate into an existing Playwright project With an existing Playwright project (or one you've just created), this is how to install and configure Mailosaur's API client library: ### Install the API client 1. Install the Mailosaur Node.js library: ```sh npm install mailosaur ``` 2. Import the Mailosaur client into your test code: ```js const MailosaurClient = require("mailosaur"); // Find your API key at https://mailosaur.com/app/keys const mailosaur = new MailosaurClient("API_KEY"); ``` ### Make your first API call ```js // Make a simple API call to find the name of your inbox const result = await mailosaur.servers.list(); console.log(`Inbox name is ${result.items[0].name}`); ``` ## Start testing With a project connected to the Mailosaur API, you can start creating tests: - [Email testing](/docs/automation/playwright/email-testing) - test password resets, account verification, order confirmations, etc. - [SMS testing](/docs/automation/playwright/sms-testing) - test alerts, notifications, and 2FA logins - [2FA app testing](/docs/authenticator) - mimic the functionality of apps like Google Authenticator and Auth0 - [Email deliverability testing](/docs/api)