pfm_create_social_account
Create or update a social media account by platform and user ID using OAuth tokens from your own auth flow, preventing duplicates with upsert logic.
Instructions
Create a social account directly (upsert by platform + user_id). If an account with the same platform and user_id already exists, it is updated. Use this when you have OAuth tokens from your own auth flow.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"platform": "<platform>",
"user_id": "<user_id>",
"access_token": "<access_token>",
"access_token_expires_at": "<access_token_expires_at>"
},
"name": "pfm_create_social_account"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes | The platform's user ID for this account | |
| metadata | No | Custom metadata for the account | |
| platform | Yes | Social media platform | |
| username | No | Platform username | |
| external_id | No | Your unique identifier for this account | |
| access_token | Yes | OAuth access token | |
| refresh_token | No | OAuth refresh token | |
| access_token_expires_at | Yes | ISO 8601 datetime when access token expires | |
| refresh_token_expires_at | No | ISO 8601 datetime when refresh token expires |