Kotak Bank Auto Transfer

Automates fund transfers using Kotak Bank's netbanking interface with Puppeteer.

Features

  • Logs in to Kotak netbanking
  • Fetches OTP from email using Gmail API
  • Initiates fund transfer to a specified beneficiary

Prerequisites

Setup

  1. Clone the repository
git clone https://github.com/neo773/kotak-bank-auto-transfer.git
  1. Install dependencies
bun install
  1. Set up the Gmail API (only if using email OTP method)

    Create credentials in Google Cloud Console:

    • Go to the Google Cloud Console and create a project.
    • Navigate to "API & Services" > "Dashboard" > "Enable APIs and Services".
    • Search for "Gmail API" and enable it.
    • Create credentials (OAuth client ID) and download the JSON file.
  2. Set up environment variables

  • Copy GMAIL_CLIENT_ID, GMAIL_CLIENT_SECRET, GMAIL_REDIRECT_URI from the downloaded JSON file to .env
cp .env.example .env
  1. Generate Gmail API access token
bun ./src/login.ts

Follow the instructions to complete the login process.

Copy the refresh token from url query params (?code=XXX) and paste it in the terminal.

paste the refresh token in the .env file.

Usage

bun ./src/index.ts -r <beneficiary_nickname> -a <amount> -o <clipboard|email>
image

License

MIT

Warning

This project is for educational purposes only. Use responsibly and ensure compliance with Kotak Bank's terms of service. The author claims no liability for any misuse or consequences. This code is posted under fair use for educational and research purposes.