Goal
Get social account details to verify platform, handle, and token validity before posting or engaging.
Which Agents Use This
- content_creator — Verify which platform they're posting to
- engagement — Check token status before replying
- analytics — Validate accounts before fetching metrics
- All agent types that interact with social accounts
Hard Rules
- MUST validate account belongs to workspace
- MUST return current token_status (valid/expired/revoked)
- SHOULD cache account details for performance
Steps
1. Validate account access
- Verify account_id belongs to workspace
2. Fetch account details
- Query Account model for metadata
- Check OAuth token status
3. Return account info
- Platform, username, handle, display_name
- Token status and is_active flag
Output
{
"success": true,
"account_id": "uuid",
"platform": "linkedin",
"username": "acmecorp",
"handle": "@acmecorp",
"display_name": "Acme Corp",
"token_status": "valid",
"is_active": true
}
Failure Handling
- If account_id not found: return error "Account not found"
- If account not in workspace: return error "Access denied"
Example Usage
Scenario: Content creator verifying account before posting
{
"account_id": "uuid"
}
Result: Receive account details including platform and token status