diff --git a/src/inputs/apiKeyInput.ts b/src/inputs/apiKeyInput.ts index d24044c..23a6047 100644 --- a/src/inputs/apiKeyInput.ts +++ b/src/inputs/apiKeyInput.ts @@ -10,8 +10,9 @@ export async function apiKeyInput(isServerApiKey: boolean): Promise { { type: 'password', name: 'value', - message: 'Please enter your api key:', - validate: async (value) => { + message: + 'Please enter your Mailosaur API key (see https://mailosaur.com/app/account/keys):', + validate: async value => { const encodedApiKey = Buffer.from(`key:${value}`).toString('base64'); const res = await fetch('https://mailosaur.com/api/servers', { @@ -31,7 +32,7 @@ export async function apiKeyInput(isServerApiKey: boolean): Promise { return true; } - return 'Invalid api key'; + return 'This is not a valid Mailosaur API key'; }, }, { @@ -43,7 +44,11 @@ export async function apiKeyInput(isServerApiKey: boolean): Promise { if (isServerApiKey) { console.log( - pc.yellow(pc.bold('\nApi key is a server api key (some tests wont work)')) + pc.yellow( + pc.bold( + 'WARNING: This API key only supports email/SMS testing for a specific inbox (server). Some examples will not work with this API key.' + ) + ) ); } diff --git a/src/inputs/serverIdInput.ts b/src/inputs/serverIdInput.ts index 8a6df48..34f136c 100644 --- a/src/inputs/serverIdInput.ts +++ b/src/inputs/serverIdInput.ts @@ -9,13 +9,13 @@ export async function serverIdInput(): Promise { { type: 'text', name: 'value', - message: 'Please enter your server id:', + message: 'Enter your Server ID (see https://mailosaur.com/app/servers):', validate: async (value: string) => { if (value.length === 8) { return true; } - return 'Invalid server id'; + return 'Could not find inbox (server) with this ID. Please check and try again.'; }, }, {