Social Accounts

Create a connect link

Changed on

Returns a link that connects one social account under your Post Bridge account without the account owner logging in to Post Bridge. Give the link to the person (or open it inside your own app): they approve on the platform's own consent screen and are sent to your return_url with the new account ids. Use external_ref to tag the accounts with your own customer id, then filter GET /social-accounts by it. Every connected account counts against your plan's account cap; when the cap is reached this answers 402 with a link to raise it. Platforms: instagram, facebook, tiktok, youtube, twitter, linkedin, threads, pinterest, bluesky (google_business is dashboard-only). Instagram uses Instagram's own login (one professional account, no Facebook Page needed); Facebook connects every Page the login manages; LinkedIn connects the profile plus every company page it administers, so one link can return several account ids; Bluesky shows a short form for the handle and an app password.

post/v1/social-accounts/connect-link

Request

  • Base URL
    https://api.post-bridge.com (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Request body

platform'instagram' | 'facebook' | 'tiktok' | 'youtube' | 'twitter' | 'linkedin' | 'threads' | 'pinterest' | 'bluesky' required

Platform the link connects. One link connects one platform.

return_urlstring required

Where the person is sent after the platform consent screen. https only (http allowed for localhost). Query parameters are appended: status=connected with platform, account_ids (comma separated) and external_ref, or status=error with reason.

external_refstring

Your own reference for the person or client this link is for (a customer id, for example). Stored on every account the link connects and returned as external_ref on GET /social-accounts, so you can filter accounts by it.

expires_innumber

How long the link stays valid, in seconds. Default 86400 (24 hours), minimum 60, maximum 604800 (7 days). Mint a fresh link whenever you need one; minting is free.

Example request

{
  "platform": "instagram",
  "return_url": "https://app.example.com/social/callback?salon=42",
  "external_ref": "salon_42",
  "expires_in": 86400
}

Response

Link created.

urlstring required

Link to give to the person who owns the social account. They open it, approve on the platform, and are sent to your return_url.

expires_atstring required

ISO timestamp when the link stops working

platformstring required

Platform this link connects

connectednumber required

Accounts connected under this API key right now

includedobject nullable required

Accounts included in the plan. When connected reaches this, minting answers 402 until the cap is raised on the billing page.

Changes

    • info

      added the new bluesky enum value to the request property

    • info

      added the new linkedin enum value to the request property

    • info

      added the new pinterest enum value to the request property

    • info

      added the new threads enum value to the request property

    • info

      added the new twitter enum value to the request property

    • info

      added the new youtube enum value to the request property

    • info

      endpoint added