Connects an OnlyFans account to the OnlyAutomator platform by sending authenticated session data from the Chrome extension.
Endpoint
POST /api/v2/account-connect
Authentication
This endpoint requires authentication with a valid JWT token in the Authorization header.
This endpoint requires authentication via bearer token representing a valid user session managed by Supabase Auth (cookies).Testing Note: Due to the requirement for a live user session, this endpoint cannot be successfully tested directly using the ‘Send’ button in this documentation with a static token.To test:
- Call this endpoint from your web application after logging in.
- Use
curl or a similar tool with a valid, current user JWT obtained from your browser’s session after logging in.
Retrieving JWT Token for Testing:
To test endpoints requiring a user session with tools like curl, you need the JWT access token stored by Supabase Auth in your browser.
- Log in to your application normally in your browser.
- Open Developer Tools (usually F12).
- Go to the Application tab (it might be called Storage in Firefox).
- Under the Storage section, find Cookies and select your application’s domain (e.g.,
http://localhost:3000 or https://onlyautomator.com).
- Look for a cookie named similar to
sb-access-token (the exact name might vary slightly based on Supabase configuration).
- Copy the entire value of this cookie. This is your Bearer token.
- Use this copied value in the
Authorization: Bearer <your_copied_token> header for your curl or other API tool requests.
Note: This token has a limited lifetime and you’ll need to copy a fresh one after it expires.
# Available URLs:
# - Local development: http://localhost:3000/api/v2/account-connect
# - Production: https://onlyautomator.com/api/v2/account-connect
# Example with curl:
curl -X POST "https://onlyautomator.com/api/v2/account-connect" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-H "sess: SESSION_VALUE" \
-H "bcTokenSha: BCTOKEN_SHA_VALUE" \
-H "userAgent: USER_AGENT_VALUE" \
-d '{
"localStorage": {...},
"sessionStorage": {...},
"cookies": {...},
"other_data": "value"
}'
Bearer token for authentication. Format: Bearer YOUR_JWT_TOKEN
Must be set to application/json
Session identifier from Chrome storage
Blockchain token SHA value for verification
Browser’s user agent string
Request Body
OnlyFans localStorage data captured from the browser
OnlyFans sessionStorage data captured from the browser
OnlyFans cookies data captured from the browser
Any additional data needed for account connection
Response
Status of the request (success or error)
Object containing account connection information
Unique identifier for the connected account
Status of the connection (connected, pending, or error)
ISO timestamp of when the data was last synchronized
200 Success
{
"status": "success",
"data": {
"accountId": "acc_f7a12b39-1234-5678-abcd-0123456789ab",
"status": "connected",
"syncTimestamp": "2023-03-15T14:23:45Z"
}
}
400 Bad Request
{
"status": "error",
"error": {
"code": "validation_error",
"message": "Required session data is missing"
}
}
401 Unauthorized
{
"status": "error",
"error": {
"code": "authentication_required",
"message": "Authentication is required to access this resource"
}
}
403 Forbidden
{
"status": "error",
"error": {
"code": "permission_denied",
"message": "Your token does not have permission to access this resource"
}
}
Error Codes
| Error Code | Description |
|---|
validation_error | A required parameter is missing or invalid |
authentication_required | No valid authentication token provided |
permission_denied | Token lacks required permissions |
Standard user JWT token for authentication.
Bearer token for authentication
Session identifier from Chrome storage
Blockchain token SHA value for verification
Browser's user agent string
OnlyFans localStorage data captured from the browser
OnlyFans sessionStorage data captured from the browser
OnlyFans cookies data captured from the browser
Any additional data needed for account connection
Account connected successfully