33800 Docs

← Retour

Browser Connector Service

Date: 14-01-2026 01:05 (MAJ 01:50) Status: TERMINE

Objectif

Creer un service d'automatisation browser pour acceder aux fonctionnalites bloquees par les APIs officielles (LinkedIn connections, messages, Gmail).

Services deployes

browser-connector (port 5401)

Endpoints LinkedIn

Endpoint Methode Description
/api/linkedin/login GET Connexion au compte
/api/linkedin/status GET Statut de connexion
/api/linkedin/profile GET Profil complet
/api/linkedin/connections?limit=N GET Liste des connexions
/api/linkedin/messages?limit=N GET Messages recents
/api/linkedin/notifications GET Notifications
/api/linkedin/message POST Envoyer un message
/api/linkedin/debug/screenshot GET Screenshot de la page
/api/linkedin/debug/html GET HTML de la page

Endpoints Gmail (non fonctionnel)

Gmail bloque les connexions automatisees (detection de bot stricte). Pour Gmail, utiliser l'API officielle OAuth via connectors-api.

Endpoint Methode Status
/api/gmail/login GET BLOQUE (2FA Google)
/api/gmail/inbox GET Non teste
/api/gmail/send POST Non teste

Credentials

Les identifiants sont stockes dans /stock_8to/33800-stack/docker/secrets/prod.env:

# LinkedIn (browser automation)
LINKEDIN_EMAIL=gouroubleu@gmail.com
LINKEDIN_PASSWORD=MyUlia75$$w

# Gmail (browser automation - non fonctionnel)
GMAIL_EMAIL=gouroubleu@gmail.com
GMAIL_PASSWORD=MyUlia75$$w

Note: Le $ doit etre echappe en $$ dans les fichiers .env pour Docker.

Tests effectues

LinkedIn

Gmail

Fichiers crees

/stock_8to/33800-stack/docker/stacks/browser-connector/
├── Dockerfile
├── docker-compose.yml
├── package.json
└── src/
    ├── index.ts          # API Elysia
    ├── sessions.ts       # Gestion sessions Redis
    └── browsers/
        ├── linkedin.ts   # Automatisation LinkedIn
        └── gmail.ts      # Automatisation Gmail (non fonctionnel)

Problemes rencontres et solutions

  1. Mot de passe tronque: Le $w dans MyUlia75$w etait interprete comme variable shell

    • Solution: Echapper avec $$ dans prod.env
  2. LinkedIn 2FA: Premier login bloque par checkpoint securite

    • Solution: Fonctionne apres correction du mot de passe
  3. Connexions vides: Les selecteurs CSS ont change sur LinkedIn

    • Solution: Utiliser des selecteurs multiples et fallback sur liens /in/
  4. Gmail bloque: Google detecte Playwright comme bot

    • Solution: Utiliser l'API Gmail officielle via OAuth

Ameliorations futures

Commandes utiles

# Test health
curl http://192.168.1.12:5401/health

# Login LinkedIn
curl http://192.168.1.12:5401/api/linkedin/login

# Profil LinkedIn
curl http://192.168.1.12:5401/api/linkedin/profile

# Connexions
curl "http://192.168.1.12:5401/api/linkedin/connections?limit=10"

# Messages
curl "http://192.168.1.12:5401/api/linkedin/messages?limit=5"

# Logs container
docker logs browser-connector --tail 50

Mise a jour 01:50 - Workflow complet

GitLab repos crees

Nginx configs

Pi-hole DNS

Domaines ajoutes a /etc/pihole/custom.list

Dashboard

CLAUDE.md