Skip to main content

Extension API Overview

The Extension API provides endpoints specifically designed for interaction between the OnlyAutomator Chrome Extension and the backend services. These APIs facilitate account connection, real-time data synchronization, CRM features within the OnlyFans interface, and access control based on user plans.

Base URL

Most Extension API v2 endpoints use the /api/v2 prefix relative to the main base URL:
  • Production: https://onlyautomator.com/api/v2
  • Local Development: http://localhost:3000/api/v2
Note: Some related endpoints used by the extension (like Fan, Emoji, Script management) reside under the /api/ prefix.

Authentication

All Extension API endpoints require authentication using a JWT Bearer Token. This token is obtained upon user login to OnlyAutomator and must be included in the Authorization header for every request:
Authorization: Bearer YOUR_JWT_TOKEN

API Endpoints

Core Extension API (v2 Prefix)

MethodEndpoint Path (relative to Base URL)Description
POST/account-connectConnects an OnlyFans account using session data from extension.
GET/get-accountRetrieves connected OnlyFans account info and status.
GET/get-profileGets detailed OnlyFans profile metrics for the connected account.
GET/account/allowed-featuresDetermines features available based on the user’s subscription plan.
POST/update-noteCreates or updates a CRM note for a subscriber (fan).
POST/update-of-noteSynchronizes a note captured directly from OnlyFans to the CRM.
POST/update-preferenceUpdates or creates specific preference data for a subscriber.
POST/sync-notesSynchronizes all notes for a subscriber between extension/backend.
POST/update-countryUpdates the detected or manually set country for a subscriber.
GET/get-ppv-statisticsRetrieves performance statistics for sent PPV messages.
GET/get-preferencesGets all stored preferences for a specific subscriber.
GET/get-transactionsRetrieves the transaction history for a specific subscriber.
These endpoints are also used by the extension but reside under the main /api/ path.
MethodEndpoint Path (relative to https://onlyautomator.com)Description
GET/api/fan/getGets details for a specific fan by OnlyFans ID.
GET/api/get-emojisGets the user’s custom emoji configuration.
POST/api/create-emojiCreates or updates the user’s custom emoji config.
GET/api/get-scriptsGets all automation scripts belonging to the user.
POST/api/create-scriptCreates a new automation script for the user.

Response Format

API responses are JSON and follow the standard format outlined in the main API Overview.
  • Success: Typically returns 2xx status with "success": true or "status": "success" and a data object.
  • Error: Returns 4xx or 5xx status with "success": false or "status": "error" and an error object containing code and message, conforming to the ErrorResponse schema.

Error Codes

Common error codes include:
CodeDescription
authentication_requiredMissing or invalid JWT token.
permission_deniedToken valid, but lacks permissions for the action.
resource_not_foundThe requested resource (e.g., account, fan) was not found.
validation_errorInput data failed validation checks.
rate_limit_exceededToo many requests from the user/token.
service_unavailableA downstream service or the server is unavailable.

CORS

The API endpoints support Cross-Origin Resource Sharing (CORS) required for the extension to function:
  • chrome-extension://[YOUR_EXTENSION_ID] (Replace with your actual extension ID)
  • https://onlyfans.com
  • https://onlyautomator.com
  • http://localhost:3000 (For local development)