GET
/
api
/
v2
/
get-account
Get Account
curl --request GET \
  --url https://onlyautomator.com/api/v2/get-account \
  --header 'Authorization: Bearer <token>'
{
  "status": "success",
  "data": {
    "id": "acc_f7a12b39-1234-5678-abcd-0123456789ab",
    "userId": "user_53fd91a2-4321-5678-efgh-0123456789cd",
    "onlyFansId": "4798234",
    "username": "creator_username",
    "status": "connected",
    "lastSyncTimestamp": "2023-03-15T14:23:45Z",
    "profileData": {
      "avatarUrl": "https://example.com/avatar.jpg",
      "header": "Creator's header text",
      "about": "About me text",
      "subscribersCount": 1250,
      "postsCount": 321
    }
  }
}
Retrieves account information and connection status for the authenticated user’s connected OnlyFans account.

Endpoint

GET /api/v2/get-account

Authentication

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:
  1. Call this endpoint from your web application after logging in.
  2. 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.
  1. Log in to your application normally in your browser.
  2. Open Developer Tools (usually F12).
  3. Go to the Application tab (it might be called Storage in Firefox).
  4. Under the Storage section, find Cookies and select your application’s domain (e.g., http://localhost:3000 or https://onlyautomator.com).
  5. Look for a cookie named similar to sb-access-token (the exact name might vary slightly based on Supabase configuration).
  6. Copy the entire value of this cookie. This is your Bearer token.
  7. 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.

Request Headers

Authorization
string
required
Bearer token for authentication. Format: Bearer YOUR_JWT_TOKEN
Content-Type
string
required
Must be set to application/json

Response

status
string
Status of the request (success or error)
data
object
Account information object
data.id
string
Unique identifier for the account
data.userId
string
Unique identifier for the user who owns this account
data.onlyFansId
string
OnlyFans account identifier
data.username
string
OnlyFans username
data.status
string
Connection status (connected, pending, or disconnected)
data.lastSyncTimestamp
string
ISO timestamp of when the data was last synchronized
data.profileData
object
Basic profile information from OnlyFans

200 Success

{
  "status": "success",
  "data": {
    "id": "acc_f7a12b39-1234-5678-abcd-0123456789ab",
    "userId": "user_53fd91a2-4321-5678-efgh-0123456789cd",
    "onlyFansId": "4798234",
    "username": "creator_username",
    "status": "connected",
    "lastSyncTimestamp": "2023-03-15T14:23:45Z",
    "profileData": {
      "avatarUrl": "https://example.com/avatar.jpg",
      "header": "Creator's header text",
      "about": "About me text",
      "subscribersCount": 1250,
      "postsCount": 321
    }
  }
}

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"
  }
}

404 Not Found

{
  "status": "error",
  "error": {
    "code": "resource_not_found",
    "message": "No connected account found for this user"
  }
}

Error Codes

Error CodeDescription
authentication_requiredNo valid authentication token provided
permission_deniedToken lacks required permissions
resource_not_foundNo connected account found for this user
service_unavailableThe account service is temporarily unavailable

Notes

  1. This endpoint is typically used by the Chrome extension to verify account connection status
  2. It returns null if no account is connected
  3. The extension uses this information to determine whether to display connected or disconnected UI states

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required

Bearer token for authentication (JWT)

Response

Account information retrieved successfully

status
string
Example:

"success"

data
object