The AiteProfiles application provides a local HTTP API for integration with workflow automation tools like n8n. The API runs only on localhost for security reasons.
- Localhost Only: API only binds to 127.0.0.1 and ::1
- Token Authentication: All requests require X-Token header
- CORS Protection: Only allows specific origins
- Input Validation: Strict validation of all inputs
- Error Sanitization: No exception details leaked in responses
http://127.0.0.1:28282
Default port is 28282. The actual port may vary if this port is occupied.
All API requests require a token in the X-Token header:
X-Token: your-api-token-here
The token is generated on first startup and stored in Windows Credential Manager. If Credential Manager is unavailable, it falls back to a file at %APPDATA%\Codebdbdb\AiteProfiles\api_token.txt.
GET /health
Checks if the API server is running.
Response:
{
"status": "ok"
}GET /profiles
Returns a list of all detected Chrome profiles.
Response:
[
{
"folder": "Default",
"name": "John Doe",
"email": "john.doe@example.com",
"path": "C:\\Users\\John\\AppData\\Local\\Google\\Chrome\\User Data\\Default",
"passwords": 12,
"bookmarks": 45,
"disk_mb": 125.4,
"last_ts": 1712059200,
"favorite": true
},
{
"folder": "Profile 1",
"name": "Jane Smith",
"email": "jane.smith@example.com",
"path": "C:\\Users\\John\\AppData\\Local\\Google\\Chrome\\User Data\\Profile 1",
"passwords": 8,
"bookmarks": 22,
"disk_mb": 67.8,
"last_ts": 1712058900,
"favorite": false
}
]POST /open_profile
Opens a Chrome profile, optionally with URLs.
Request Body:
{
"folder": "Default",
"urls": ["https://example.com", "https://google.com"],
"incognito": false
}Parameters:
folder: Profile folder name (required if name/email not provided)name: Profile display name (alternative to folder)email: Profile email address (alternative to folder)urls: Array of URLs to open (optional)incognito: Boolean to open in incognito mode (optional, default: false)
Response (Success):
{
"status": "ok",
"folder": "Default"
}Response (Not Found):
{
"status": "not_found",
"message": "Profile not found"
}POST /compose_email
Opens Gmail compose window for a specific profile.
Request Body:
{
"folder": "Default"
}Parameters:
folder: Profile folder name (required if name/email not provided)name: Profile display name (alternative to folder)email: Profile email address (alternative to folder)
Response (Success):
{
"status": "ok",
"folder": "Default"
}Response (Not Found):
{
"status": "not_found",
"message": "Profile not found"
}200 OK: Request successful400 Bad Request: Invalid request or payload401 Unauthorized: Missing or invalid token403 Forbidden: Request from non-localhost address404 Not Found: Endpoint or profile not found500 Internal Server Error: Unexpected server error
curl -X GET http://127.0.0.1:28282/health \
-H "X-Token: your-api-token-here"curl -X GET http://127.0.0.1:28282/profiles \
-H "X-Token: your-api-token-here"curl -X POST http://127.0.0.1:28282/open_profile \
-H "Content-Type: application/json" \
-H "X-Token: your-api-token-here" \
-d '{"folder": "Default", "urls": ["https://github.com"]}'curl -X POST http://127.0.0.1:28282/open_profile \
-H "Content-Type: application/json" \
-H "X-Token: your-api-token-here" \
-d '{"folder": "Default", "incognito": true}'curl -X POST http://127.0.0.1:28282/compose_email \
-H "Content-Type: application/json" \
-H "X-Token: your-api-token-here" \
-d '{"folder": "Default"}'There is no built-in rate limiting. The API is intended for local use with trusted applications.
The API allows CORS requests from:
http://127.0.0.1http://127.0.0.1:28282http://localhosthttp://localhost:28282
Other origins will receive a restricted CORS policy.
- src/Api/LocalHttpServer.cs