A Python automation script to access your EPFO (Employees' Provident Fund Organization) account, view passbook, and retrieve service history programmatically.
- Features
- Prerequisites
- Installation
- Usage
- Configuration
- Troubleshooting
- Security
- Contributing
- License
- Disclaimer
- π Secure Login - Login to EPFO portal with UAN and password
- π View Passbook - Access your EPF passbook with complete transaction history
- π Service History - Retrieve your complete employment service history
- πΎ Download Passbook - Download passbook as PDF for offline access
- β Input Validation - Validates UAN format (12 digits)
- π Password Security - Hidden password input for security
- π€ Browser Automation - Automated navigation through EPFO portal
Before you begin, ensure you have the following installed:
- Python 3.7 or higher
- Google Chrome Browser (latest version)
- ChromeDriver (compatible with your Chrome version)
- Active EPFO Account with UAN and password
git clone https://github.com/Deadshot0x7/epfo-access-automation.git
cd epfo-access-automation# Windows
python -m venv venv
venv\Scripts\activate
# Linux/MacOS
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtrequirements.txt:
selenium==4.15.2
webdriver-manager==4.0.1
requests==2.31.0
Option A: Automatic (Recommended)
pip install webdriver-managerThe script will automatically download the correct ChromeDriver version.
Option B: Manual
- Download ChromeDriver from https://chromedriver.chromium.org/
- Extract and add to your system PATH
python epfo_access.py-
Run the script:
python epfo_access.py
-
Enter your credentials:
Enter your UAN (Universal Account Number): 123456789012 Enter your EPFO password: ******** -
Confirm your UAN:
UAN entered: 123456789012 Is this correct? (y/n): y -
Solve the Captcha manually when the browser opens
-
Press Enter after solving captcha
-
Choose your action:
What would you like to access? 1. Passbook 2. Service History 3. Both Enter your choice (1/2/3): 3 -
View your data in the browser window
-
Download (Optional): Choose to download passbook when prompted
To run the script without opening a visible browser window, uncomment this line in the code:
# chrome_options.add_argument('--headless')By default, files download to your system's default Downloads folder. To change this:
prefs = {
"download.default_directory": "/path/to/your/folder",
"download.prompt_for_download": False,
}
chrome_options.add_experimental_option("prefs", prefs)Error: SessionNotCreatedException: Message: session not created
Solution:
pip install --upgrade webdriver-managerError: NoSuchElementException
Solution:
- Check your internet connection
- Ensure EPFO portal is accessible
- Try increasing wait times in the script
Error: Invalid UAN! UAN should be 12 digits.
Solution:
- Ensure your UAN is exactly 12 digits
- Remove any spaces or special characters
Problem: Captcha expires before solving
Solution:
- Solve captcha quickly
- Refresh the page if captcha expires
- Ensure stable internet connection
Possible Causes:
- Incorrect UAN or password
- Account locked due to multiple failed attempts
- EPFO portal maintenance
Solution:
- Verify credentials on EPFO portal manually
- Wait 30 minutes if account is locked
- Check EPFO portal status
β οΈ Never share your credentials with anyoneβ οΈ Never commit credentials to version controlβ οΈ Use environment variables for sensitive data (optional):
import os
uan = os.getenv('EPFO_UAN')
password = os.getenv('EPFO_PASSWORD')β οΈ Keep dependencies updated to patch security vulnerabilitiesβ οΈ Use this script only on trusted devices
Windows:
set EPFO_UAN=123456789012
set EPFO_PASSWORD=yourpasswordLinux/MacOS:
export EPFO_UAN=123456789012
export EPFO_PASSWORD=yourpasswordContributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/AmazingFeature
- Commit your changes
git commit -m 'Add some AmazingFeature' - Push to the branch
git push origin feature/AmazingFeature
- Open a Pull Request
- Follow PEP 8 style guidelines
- Add comments for complex logic
- Update README for new features
- Test thoroughly before submitting PR
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Deadshot0x7
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...
This is an unofficial automation script and is NOT affiliated with EPFO or the Government of India.
- This script is for personal use only
- Use at your own risk
- The author is not responsible for:
- Any misuse of this script
- Any data loss or corruption
- Account suspension or blocking by EPFO
- Any violations of EPFO terms of service
- Always ensure you comply with EPFO's terms and conditions
- This script may break if EPFO updates their portal structure
- Do not use for commercial purposes
- Do not share your credentials with anyone
If you encounter any issues or have questions:
- Check the Troubleshooting section
- Search existing Issues
- Create a new issue with:
- Error message
- Python version
- Operating system
- Steps to reproduce
- Add support for EPF withdrawal claims
- Implement OTP-based login
- Add email notification feature
- Create GUI interface
- Add data export to Excel/CSV
- Schedule automated passbook downloads
- Multi-account support
If you find this project helpful, please consider giving it a star! β
Deadshot0x7
- GitHub: @Deadshot0x7
- Email: sviquarahmed@gmail.com
If you find this project helpful and would like to support its development, you can buy me a coffee! β
UPI ID: sviquarahmed@okaxis
Your support helps keep this project maintained and improved. Thank you! π
- β Star this repository
- π Report bugs and issues
- π‘ Suggest new features
- π€ Contribute code
- π’ Share with others who might find it useful
- Selenium WebDriver team
- Python community
- All contributors to this project
- Everyone who has supported this project
Made with β€οΈ for easier EPFO access
β‘ Remember: This tool is meant to simplify your EPFO access, not replace the official portal. Always verify important information on the official EPFO website.
If this project helped you, consider supporting it! π