Automates fund transfers using Kotak Bank's netbanking interface with Puppeteer.
- Logs in to Kotak netbanking
- Fetches OTP from email using Gmail API
- Initiates fund transfer to a specified beneficiary
- Bun.sh
- Puppeteer
- Gmail API
- Clone the repository
git clone https://github.com/neo773/kotak-bank-auto-transfer.git
- Install dependencies
bun install
-
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.
-
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
- 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.
bun ./src/index.ts -r <beneficiary_nickname> -a <amount> -o <clipboard|email>
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.