BLS Algeria AutoBot is a precision-engineered appointment automation system designed to monitor the official BLS Spain Algeria visa appointment portal around the clock β detecting newly released slots the moment they appear and securing bookings automatically.
It handles the full lifecycle from authentication, center & visa category selection, real-time slot polling, compliant selfie identity verification (via live webcam), through to final booking confirmation β all with human-in-the-loop approval gates at every critical step.
π‘ The instant an appointment slot opens, you receive a real-time alert on Telegram and WhatsApp β no more manual refreshing, no more missed windows.
| Feature | Description | |
|---|---|---|
| π’ | Auto Booking Engine | Monitors BLS Algeria portal 24/7 and locks open slots within seconds of release. |
| ποΈ | Multi-Center Support | Full support for all VAC locations β Algiers, Oran, Constantine, and more. |
| ποΈ | All Visa Categories | Tourist, Business, Family Reunification, Study, and all other BLS Algeria visa types. |
| π | Session Persistence | Encrypted browser session caching β avoids redundant logins and re-authentication. |
| π€³ | Compliant Selfie Flow | Real webcam integration with live human approval gate before every capture submission. |
| π | Resilient Slot Polling | Jittered interval polling with exponential backoff β zero portal flooding or IP bans. |
| π | Real-Time Notifications | Instant Telegram & WhatsApp alerts on slot detection, booking confirmation, or errors. |
| π§± | State Machine Core | Deterministic booking lifecycle with illegal transition prevention and error recovery. |
| πΈ | Audit Trail & Receipts | Auto-screenshots of every confirmation page with structured log entries in reports/. |
| βοΈ | Zero-Hardcode Config | All credentials, centers, and preferences live in a local .env β never in code. |
flowchart LR
A([π Launch Bot]) --> B[Load Config & Session]
B --> C{Session Valid?}
C -->|Yes| E
C -->|No| D[Login + OTP Entry]
D --> E[Select Center & Category]
E --> F[π Slot Polling Loop]
F -->|No slot| F
F -->|Slot found!| G[Lock Slot]
G --> H[π€³ Selfie Verification]
H --> I{User Approves?}
I -->|No / Retake| H
I -->|Yes| J[Submit to Portal]
J --> K{Confirmed?}
K -->|Yes| L([β
Booking Complete])
K -->|Error| M[Retry / Backoff]
M --> F
L --> N((π¨ Telegram Alert))
L --> O((π± WhatsApp Alert))
L --> P[(π Receipt Saved)]
stateDiagram-v2
[*] --> UNAUTHENTICATED
UNAUTHENTICATED --> AUTHENTICATED : Login + OTP verified
AUTHENTICATED --> CENTER_SELECTED : Center & category set
CENTER_SELECTED --> MONITORING_SLOTS : Polling started
MONITORING_SLOTS --> SLOT_LOCKED : Open slot detected
SLOT_LOCKED --> AWAITING_VERIFICATION : Selfie stage entered
AWAITING_VERIFICATION --> PENDING_CONFIRMATION : Selfie approved & submitted
AWAITING_VERIFICATION --> SLOT_LOCKED : Retake requested
PENDING_CONFIRMATION --> COMPLETED : User confirms & booking sent
COMPLETED --> [*]
MONITORING_SLOTS --> ABORTED : User cancels
PENDING_CONFIRMATION --> ABORTED : User cancels at review
BLS-Algeria-AutoBot/
β
βββ π AGENTS.md β Agent rules, compliance & debugging protocol
βββ π README.md β This file
βββ π PROJECT_STATUS.md β Live development status & health metrics
βββ π CHANGELOG.md β Full version history
βββ π TASKS.md β Phased roadmap & task tracking
βββ π requirements.txt β Python dependency manifest
β
βββ π src/ β Core automation engine
β βββ main.py β Entry point β wires all services
β βββ config/
β β βββ settings.py β Pydantic-validated .env loader
β βββ core/
β β βββ browser.py β Playwright context factory + session + camera
β β βββ state_machine.py β BookingState enum + transition guard
β βββ services/
β βββ auth_service.py β Login, session check, OTP (user-entered only)
β βββ booking_service.py β Slot polling (jitter) + race-condition guard
β βββ verification_service.py β Real webcam capture, human approval gate
β βββ audit_service.py β Confirmation extraction + receipt screenshot
β
βββ π workflows/ β Step-by-step portal interaction maps
βββ π architecture/ β System diagrams and blueprints
βββ π config/ β Environment templates
βββ π planning/ β Issue registry and roadmaps
βββ π testing/ β Test suites
βββ π logs/ β Runtime logs (git-ignored)
βββ π reports/ β Booking receipts & screenshots (git-ignored)
- Python 3.10 or later
- Windows 10 / 11
- A working webcam (required for selfie verification step)
- A BLS Algeria applicant account
# Clone or download the project cd "BLS-Algeria-AutoBot" # Create and activate virtual environment python -m venv .venv .venv\Scripts\activate # Install dependencies pip install -r requirements.txt # Install Playwright browser engine playwright install chromium
# Copy the environment template copy config\.env.example .env
Open .env and fill in your details:
BLS_EMAIL=[email protected] BLS_PASSWORD=your_password CENTER=Oran # Algiers | Oran | Constantine CATEGORY=Normal VISA_TYPE=Tourist POLL_INTERVAL_MIN=25 POLL_INTERVAL_MAX=55
python -m src.main
The bot will open a visible browser window, authenticate, and begin monitoring. You will be prompted in the terminal at every critical decision point (OTP, selfie review, final booking confirmation).
π¨ Telegram Alerts β Setup Guide
- Open Telegram β message @BotFather β
/newbotβ copy the Bot Token. - Message your bot once to initialize the chat.
- Get your Chat ID via @userinfobot.
- Add to your
.env:TELEGRAM_BOT_TOKEN=your_token_here TELEGRAM_CHAT_ID=your_chat_id_here
π± WhatsApp Alerts β Setup Guide
WhatsApp alerts are delivered via a notification gateway integration.
Contact via the links below to receive your API credentials and setup instructions.
Important
This bot is built on a strict human-in-the-loop design. It does not bypass, spoof, or manipulate any biometric challenge, identity verification, CAPTCHA, or security gate.
| Principle | Implementation |
|---|---|
| No Biometric Spoofing | Real webcam via browser getUserMedia β no virtual cameras or injected media |
| User OTP Entry | OTP is always entered by the human via terminal prompt β never intercepted |
| User Approval Gate | Selfie capture requires explicit user confirmation before submission |
| Final Submit Gate | Booking is never submitted without user typing CONFIRM in the terminal |
| No Credential Storage | Credentials live only in a local untracked .env file β never in source code |
| Rate Limiting | Jittered polling intervals (25β55s) β no portal flooding |
This tool automates interactions with the official BLS Spain Algeria visa appointment portal to assist legitimate visa applicants. You are solely responsible for using it in compliance with BLS Spain's Terms of Service and applicable Algerian and Spanish regulations. The developer assumes no liability for accounts suspended, appointments lost, or any consequences arising from misuse.
Have questions, need a custom setup, or want to report an issue?
Response time: typically within a few hours Β· Arabic & English supported