Authentication

Shoutbox provides two ways to send emails: via our REST API or via SMTP. Both methods use the same API key for authentication.

Getting Your API Key

  1. Visit https://shoutbox.net
  2. Sign up for an account or log in if you already have one
  3. Navigate to the API Keys section in your dashboard
  4. Create a new API key

Your API key can be used for both REST API calls and SMTP authentication.

REST API Authentication

The REST API uses Bearer token authentication. Include your API key in the Authorization header with the Bearer prefix.

# Example using curl
curl -X POST https://api.shoutbox.net/send \
  -H "Authorization: Bearer XXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "[email protected]",
    "to": "[email protected]",
    "subject": "Hello from Shoutbox",
    "html": "<h1>This is a test email</h1>"
  }'

SMTP Authentication

For SMTP, use the following credentials:

  • Username: shoutbox
  • Password: Your API key (e.g., XXXXXXX)

SMTP Server Details

  • Host: smtp.shoutbox.net
  • Port: 587 (TLS) or 465 (SSL)
  • Authentication: Required
  • TLS: Required

Example Using Swaks

Swaks is a versatile SMTP testing tool. Here’s how to send a test email:

swaks --server smtp.shoutbox.net \
  --port 587 \
  --tls \
  --auth LOGIN \
  --auth-user shoutbox \
  --auth-password XXXXXXX \
  --from [email protected] \
  --to [email protected] \
  --header "Subject: Test Email" \
  --body "This is a test email from Shoutbox"

Security Best Practices

  1. Keep Your Key Secret: Never expose your API key in client-side code or public repositories
  2. Use Environment Variables: Store your API key in environment variables
  3. Regular Rotation: Rotate your API keys periodically
  4. Monitor Usage: Regularly check your API key usage in the dashboard
  5. Revoke if Compromised: Immediately revoke any compromised API keys

Rate Limits

API keys are subject to rate limits:

  • 60 requests per minute per API key
  • Same limit applies to both REST API and SMTP

Contact support if you need higher limits for your use case.

Troubleshooting

If you encounter authentication errors:

  1. Verify your API key is correct
  2. Ensure you’re using the correct authentication method:
    • REST API: Bearer XXXXXXX in Authorization header
    • SMTP: Username shoutbox, password is your API key
  3. Check if your API key has been revoked or expired
  4. Verify you haven’t exceeded rate limits

Support

If you need assistance with authentication:

  1. Check our documentation
  2. Contact support through your dashboard
  3. Email [email protected]