RelayAPI
Guides

Connecting Accounts

Learn how to connect social media accounts to your workspace.

Overview

Before you can post to a social media platform, you need to connect at least one account. RelayAPI supports OAuth-based connections for most platforms.

Connecting via Dashboard

  1. Navigate to Settings > Social Accounts in your dashboard
  2. Click Connect Account
  3. Select the platform you want to connect
  4. Authorize RelayAPI in the platform's OAuth flow
  5. Your account will appear in the connected accounts list

Connecting via API

You can also connect accounts programmatically using the Connect Account endpoint:

curl -X POST https://api.relayapi.dev/v1/accounts/connect \
  -H "Authorization: Bearer rlay_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "twitter",
    "access_token": "oauth_access_token",
    "refresh_token": "oauth_refresh_token",
    "platform_account_id": "12345",
    "username": "myhandle"
  }'

Managing Connected Accounts

  • List accounts: GET /v1/accounts
  • Disconnect: DELETE /v1/accounts/{id}

Token Refresh

RelayAPI automatically refreshes OAuth tokens before they expire. If a token becomes invalid, the account status will change to disconnected and you'll receive a webhook notification.

On this page