Get Started in 5 Minutes
Connect your Udemy account and claim your first batch of free courses automatically.
-
1
Open the Connect section
Scroll to the "Connect Your Account" section on the homepage, or click "Get Started" in the top nav.
-
2
Choose Email Login
For the quickest setup, enter your Udemy email and password. If you encounter a CAPTCHA or CSRF error, switch to Cookie Login (see the Cookie Login guide below).
-
3
Click Connect Account
The engine will authenticate with the Udemy API and begin monitoring coupon sites immediately. No further action is required.
-
4
Wait for the first enrollments
Within minutes, the engine will start finding and applying 100% off coupons. Check your Udemy dashboard to see new courses appearing in "My Learning".
02
Authentication
4 min read
How to Use Cookie Login
The most reliable way to authenticate — bypasses CAPTCHA and works on any server environment.
-
1
Log in to Udemy in your browser
Open Chrome or Firefox and sign in to udemy.com with your account.
-
2
Open DevTools
Press F12 (or Cmd+Option+I on Mac) to open Browser Developer Tools.
-
3
Navigate to the Cookies panel
Click the "Application" tab at the top of DevTools. In the left sidebar, expand "Cookies" and click on "https://www.udemy.com".
-
4
Copy the three cookie values
Find and copy the value (not the name) of each of these three cookies:
access_token
client_id
csrftoken
-
5
Paste into the Cookie Login form
Switch to the Cookie Login tab on the Connect form. Paste each value into its corresponding field and click Connect Account.
-
6
Refreshing cookies when they expire
Udemy cookies typically last 30–90 days. When you see authentication errors, repeat this process to get fresh cookies.
03
Configuration
3 min read
Configuring Smart Filters
Control exactly which courses get enrolled — by rating, language, and instructor.
-
1
Set a minimum course rating
Filter out low-quality courses by setting a minimum star rating. For example, setting 4.0 means only courses rated 4.0 stars or higher will be enrolled.
-
2
Choose preferred languages
Specify one or more languages (e.g. English, Hindi) to ensure you only enroll in courses you can understand. The engine will skip courses listed in other languages.
-
3
Block specific instructors
Add instructor names to your exclusion list. Any course published by a blocked instructor will be skipped, regardless of rating or language.
-
4
Save and apply your filters
Filters are applied in real time. All new coupon checks will honour your updated preferences immediately after saving.
Running on a Cloud Server
Deploy the FastAPI backend on a VPS or cloud VM so the engine runs 24/7 without your computer.
-
1
Clone the repository
SSH into your server and clone the project:
git clone https://github.com/madhu2456/udemy_enroller_fastapi.git
cd udemy_enroller_fastapi
-
2
Install dependencies
Create a virtual environment and install the Python requirements:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
-
3
Configure your credentials
Copy the example environment file and add your Udemy credentials (or cookies) and any filter preferences:
cp .env.example .env
nano .env
-
4
Start the FastAPI server
Run the application with uvicorn:
uvicorn main:app --host 0.0.0.0 --port 8000
-
5
Keep it running with systemd or screen
To keep the process alive after you disconnect, use screen, tmux, or a systemd service file. See the GitHub README for a sample systemd config.
05
Troubleshooting
5 min read
Common Issues & Fixes
Solutions to the most common problems: CSRF errors, expired cookies, and enrollment failures.
-
1
CSRF error with Email Login
This happens when Udemy's anti-bot system flags the login from a server IP. Fix: switch to Cookie Login, which uses a token already issued by Udemy to your real browser session.
-
2
Cookies stopped working
Udemy session cookies expire after 30–90 days. Fix: log in to udemy.com again in your browser, re-extract the three cookie values (access_token, client_id, csrftoken), and update them in the form.
-
3
No courses being enrolled
Check that your smart filters are not too restrictive. If your minimum rating is set very high or your language filter only includes rare languages, there may be few matching courses on any given day. Try relaxing the filters temporarily.
-
4
Enrollment fails for specific courses
Some coupons expire between the moment the engine detects them and the time the API call completes. This is normal — the engine will continue checking and enrolling other valid coupons.
-
5
The engine is not starting
If running locally, ensure all dependencies are installed and your .env file contains valid credentials. If running on a server, check the process logs for Python errors and make sure the virtual environment is activated.
Still stuck?
Open an issue on GitHub or check the FAQ for quick answers.