Connect API
The Connect API provides endpoints for managing social media network connections and integrations.
App Endpoints
Get Networks
Retrieve user’s connected social networks.
- POST /api/get/networks/
Response:
{ "networks": [ { "id": 123, "network": "instagram", "network_id": "user123", "network_url": "https://instagram.com/user123", "status": "accepted", "followers": 5000, "verified": true, "connected_at": "2024-01-01T00:00:00Z" }, { "id": 124, "network": "facebook", "network_id": "page456", "network_url": "https://facebook.com/page456", "status": "pending", "followers": 2000, "verified": false, "connected_at": "2024-01-15T00:00:00Z" } ] }
Network Actions
Update Network Extra
Update additional information for a social network connection.
- POST /api/action/network-extra/update/
Request Body:
network_id=123 extra_data[bio]=Updated bio information extra_data[website]=https://example.com extra_data[category]=fashion extra_data[engagement_rate]=3.5
Response:
{ "status": "success", "message": "Network extra information updated successfully" }
Network Management
Network Approval
Submit network for approval.
- POST /api/action/network/approval/
Request Body:
{ "network_type": "instagram", "network_id": "user123", "network_url": "https://instagram.com/user123", "followers": 5000, "category": "fashion" }
Response:
{ "status": "success", "message": "Network submitted for approval", "approval_id": 789 }
Network Status
Get network connection status.
- POST /api/network/status/
Request Body:
network_id=123
Response:
{ "status": "accepted", "verified": true, "followers": 5000, "engagement_rate": 3.5, "last_updated": "2024-08-01T10:00:00Z" }
Network Disconnect
Disconnect a social network.
- POST /api/network/disconnect/
Request Body:
network_id=123
Response:
{ "status": "success", "message": "Network disconnected successfully" }
Data Models
Network Status Values
pending: Network is submitted but not yet reviewed
accepted: Network has been approved and is active
rejected: Network has been rejected
suspended: Network has been temporarily suspended
disconnected: Network has been disconnected by user
Supported Networks
Instagram: Instagram personal accounts and business accounts
Facebook: Facebook personal profiles and pages
Twitter: Twitter accounts
YouTube: YouTube channels
TikTok: TikTok accounts
LinkedIn: LinkedIn profiles and company pages
Pinterest: Pinterest accounts and boards
Error Responses
Authentication Errors
{
"error": "authentication_required",
"message": "Authentication is required for this endpoint"
}
{
"error": "invalid_access_token",
"message": "Invalid or expired access token"
}
Network Errors
{
"error": "network_already_connected",
"message": "This network is already connected to your account"
}
{
"error": "network_not_found",
"message": "Network not found"
}
{
"error": "network_verification_failed",
"message": "Failed to verify network credentials"
}
Validation Errors
{
"error": "validation_error",
"message": "Invalid network URL format",
"field": "network_url"
}
{
"error": "validation_error",
"message": "Network type not supported",
"field": "network"
}
Permission Errors
{
"error": "permission_denied",
"message": "You don't have permission to access this network"
}
{
"error": "network_limit_reached",
"message": "Maximum number of networks reached"
}
Social Authentication
Facebook Authentication
Connect Facebook account.
Request Body:
Response:
Google Authentication
Connect Google account.
Request Body:
Response:
Instagram Authentication
Connect Instagram account.
Request Body:
Response:
Twitter Authentication
Connect Twitter account.
Request Body:
Response: