wwebjs-s3
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

WhatsAppWeb.js AWS S3 Remote Auth Strategy

npm version License

🚀 WhatsAppWeb.js AWS S3 Remote Auth Strategy is a custom authentication strategy for WhatsAppWeb.js, allowing you to use AWS S3 for remote authentication.

Installation

Install the strategy using npm:

npm install wwebjs-s3

Usage

To use this AWS S3 remote auth strategy with WhatsAppWeb.js, follow these steps:

  1. Install the strategy package as shown above.
  2. Set up your AWS credentials using environment variables or configuration.
  3. Import and configure the strategy in your WhatsAppWeb.js app.
  4. Implement your custom authentication logic in your app.
  5. Here's an example of how to set up the strategy:
const { Client, RemoteAuth } = require('whatsapp-web.js');
const { S3Store } = require('wwebjs-s3');

const credentials = {
  region: 'your-s3-region',
  accessKeyId: 'your-s3-access-key-id',
  secretAccessKey: 'your-s3-secret-access-key',
  bucket: 'your-bucket-name'
}

const store = new S3Store(credentials)

const client = new Client({
    authStrategy: new RemoteAuth({
        store: store,
        backupSyncIntervalMs: 300000
    })
});

client.initialize();

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i wwebjs-s3

    Weekly Downloads

    10

    Version

    1.0.4

    License

    ISC

    Unpacked Size

    6.64 kB

    Total Files

    7

    Last publish

    Collaborators

    • eufelipemartins