# Send Platform API Connector to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "platform-api-connector",
    "name": "Platform API Connector",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/brandonwadepackard-cell/platform-api-connector",
    "canonicalUrl": "https://clawhub.ai/brandonwadepackard-cell/platform-api-connector",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/platform-api-connector",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=platform-api-connector",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/oauth-flows.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "platform-api-connector",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T04:40:52.981Z",
      "expiresAt": "2026-05-14T04:40:52.981Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=platform-api-connector",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=platform-api-connector",
        "contentDisposition": "attachment; filename=\"platform-api-connector-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "platform-api-connector"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/platform-api-connector"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/platform-api-connector",
    "downloadUrl": "https://openagent3.xyz/downloads/platform-api-connector",
    "agentUrl": "https://openagent3.xyz/skills/platform-api-connector/agent",
    "manifestUrl": "https://openagent3.xyz/skills/platform-api-connector/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/platform-api-connector/agent.md"
  }
}
```
## Documentation

### Platform API Connector

Navigate developer portals and obtain API credentials for social/content platforms. Store credentials in Supabase (or any DB) for reuse.

### General Pattern

Create developer app on platform's developer portal
Configure OAuth redirect URIs and scopes
Complete OAuth flow (or generate API keys)
Store credentials in structured format
Test with a simple API call

### Facebook + Instagram

Facebook and Instagram share the same auth system. One Facebook Page Token unlocks both.

### Setup

Go to developers.facebook.com/apps → Create App → Business type
Add "Facebook Login" product
In Graph API Explorer (developers.facebook.com/tools/explorer/):

Select your app
Add permissions: pages_show_list, pages_read_engagement, pages_manage_posts, instagram_basic, instagram_content_publish
Generate User Access Token → authorize
Exchange for long-lived token: GET /oauth/access_token?grant_type=fb_exchange_token&client_id={app_id}&client_secret={secret}&fb_exchange_token={short_token}


Get Page Access Token: GET /me/accounts → find page → copy access_token
Get Instagram Business Account ID: GET /{page_id}?fields=instagram_business_account

### Store

{
  "platform": "facebook",
  "credentials": {
    "app_id": "...",
    "app_secret": "...",
    "page_id": "...",
    "page_access_token": "...",
    "ig_user_id": "..."
  }
}

### Key gotcha

Page Access Tokens from Graph API Explorer are short-lived unless you exchange the User Token for a long-lived one FIRST, then request Page tokens from the long-lived User Token. Page tokens derived from long-lived user tokens are permanent (no expiry).

### Setup

Go to console.cloud.google.com → APIs & Services → Credentials
Create OAuth 2.0 Client ID (Web application type)
Add redirect URI: http://localhost:8422/callback (or your callback URL)
Enable YouTube Data API v3
Run local OAuth flow:

from google_auth_oauthlib.flow import InstalledAppFlow

flow = InstalledAppFlow.from_client_secrets_file(
    'credentials.json',
    scopes=['https://www.googleapis.com/auth/youtube.upload',
            'https://www.googleapis.com/auth/youtube.readonly']
)
creds = flow.run_local_server(port=8422)
# creds.token, creds.refresh_token, creds.expiry

### Store

{
  "platform": "youtube",
  "credentials": {
    "client_id": "...",
    "client_secret": "...",
    "access_token": "...",
    "refresh_token": "...",
    "token_expiry": "..."
  }
}

### Key gotcha

If the user previously authorized with limited scopes, the refresh token may not cover youtube.upload. Must re-authorize with prompt='consent' to get a new refresh token with full scopes.

### Setup

Go to developer.x.com/en/portal/dashboard
Create Project + App (Free tier: 100 posts/month)
Under Keys and Tokens:

API Key + Secret (consumer credentials)
Bearer Token (app-only auth for reading)
Access Token + Secret (user auth for posting) — generate with Read & Write permissions


If permissions were Read Only when tokens were generated, regenerate Access Token after changing to Read & Write

### Store

{
  "platform": "twitter",
  "credentials": {
    "api_key": "...",
    "api_secret": "...",
    "bearer_token": "...",
    "access_token": "...",
    "access_token_secret": "..."
  }
}

### Key gotcha

Free tier caps at 100 posts/month (resets on billing date, not calendar month). No delete or analytics on free tier.

### Setup

Go to developers.tiktok.com → Create App
Add products: Login Kit + Content Posting API
Configure: app icon (1024x1024), category, ToS URL, Privacy Policy URL, redirect URI
Submit for review — TikTok requires demo video showing the app in action
Until approved, use Manual mode (generate content but post manually)

### Key gotcha

TikTok Content Posting API requires full app review with demo video. This takes days to weeks. Plan for Manual mode as interim solution. Login Kit can work in sandbox mode for development.

### Credential Storage Pattern

Use a single table with JSONB for flexibility:

CREATE TABLE platform_connections (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  platform TEXT NOT NULL,
  account_name TEXT,
  credentials JSONB NOT NULL,
  scopes TEXT[],
  status TEXT DEFAULT 'active',
  created_at TIMESTAMPTZ DEFAULT now(),
  updated_at TIMESTAMPTZ DEFAULT now()
);

JSONB accommodates different auth shapes per platform without schema changes.

### Token Refresh Pattern

async def get_valid_token(platform: str) -> dict:
    conn = await get_connection(platform)
    creds = conn['credentials']
    
    if platform == 'youtube' and is_expired(creds.get('token_expiry')):
        new_token = refresh_google_token(creds['refresh_token'], creds['client_id'], creds['client_secret'])
        creds['access_token'] = new_token
        await update_connection(conn['id'], creds)
    
    # Facebook page tokens don't expire (if derived from long-lived user token)
    # Twitter tokens don't expire
    # TikTok tokens expire in 24h — refresh with refresh_token
    
    return creds
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: brandonwadepackard-cell
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-07T04:40:52.981Z
- Expires at: 2026-05-14T04:40:52.981Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/platform-api-connector)
- [Send to Agent page](https://openagent3.xyz/skills/platform-api-connector/agent)
- [JSON manifest](https://openagent3.xyz/skills/platform-api-connector/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/platform-api-connector/agent.md)
- [Download page](https://openagent3.xyz/downloads/platform-api-connector)