Skip to main content

Social Controller

The Social Controller provides comprehensive social media integration capabilities including account connection, platform management, and social media automation for the VChata platform.

Base Path

Overview

This controller enables complete social media integration:
  • 🔗 Account Connection - Connect and manage social media accounts
  • 📱 Multi-Platform Support - Facebook, Instagram, TikTok, and more
  • 🔄 Token Management - Secure token storage and refresh
  • 📊 Account Analytics - Social media account performance tracking
  • 🛡️ Security - Secure authentication and data protection
  • 🔧 Webhook Integration - Real-time social media event handling

Authentication & Authorization

  • 🔐 All endpoints require valid JWT authentication token
  • 🏢 All operations are scoped to the user’s current organization
  • 👥 Organization membership required for all operations

Account Management

Connect Social Account

Description: Connects a social media account to the organization for automation and management.
object

Get Social Accounts

Description: Retrieves connected social media accounts with optional filtering.
object

Update Social Account

Description: Updates social media account information and permissions.

Disconnect Social Account

Description: Disconnects and removes a social media account from the organization.

Token Management

Refresh Access Token

Description: Refreshes an expired access token using the refresh token.

Validate Token

Description: Validates the current access token and checks its permissions.

Platform Integration

Get Platform Pages

Description: Retrieves pages associated with the connected social account.

Sync Account Data

Description: Synchronizes account data from the social media platform.

Webhook Integration

Setup Webhook

Description: Sets up webhook for real-time social media events.

Verify Webhook

Description: Verifies webhook setup with the social media platform.

Account Analytics

Get Account Stats

Description: Retrieves comprehensive analytics for a social media account.

Platform Types

Supported Platforms

  • FACEBOOK - Facebook Pages and personal profiles
  • INSTAGRAM - Instagram Business and Creator accounts
  • TIKTOK - TikTok Business accounts
  • TWITTER - Twitter/X Business accounts
  • LINKEDIN - LinkedIn Company pages
  • YOUTUBE - YouTube channels

Platform-Specific Features

Error Responses

Common Errors

Security Features

Token Security

  • Encrypted Storage - All tokens are encrypted at rest
  • Automatic Refresh - Tokens are automatically refreshed before expiration
  • Permission Validation - Regular permission checks and updates
  • Secure Transmission - All API calls use HTTPS encryption

Data Protection

  • Minimal Data Collection - Only necessary data is stored
  • Data Retention - Automatic cleanup of expired data
  • Access Control - Organization-scoped access control
  • Audit Logging - Complete audit trail for all operations

Integration Examples

Complete Account Setup Flow

Token Refresh Flow

Performance Optimization

Caching Strategy

Rate Limiting

Monitoring and Analytics

Integration Metrics

Error Monitoring