EstablishmentsCreate a connection link

Establishments

Create a connection link

Returns a hosted link where the person authorizes a network with Sofia, so no network token reaches your app. Valid 30 minutes; live app only.

POSThttps://api.sofia-post.com/api/v1/establishments/{id}/connection-links
POSThttps://api.sofia-post.com/api/v1/establishments/{id}/connection-links

Create a connection link

Returns a hosted link where the person authorizes a network with Sofia, so no network token reaches your app. Valid 30 minutes; live app only.

Authorizations

Authorizationstringrequired

Your personal key or OAuth access token, sent as Bearer <token>.

Kept in this tab only, and sent only to api.sofia-post.com. Get an API key

Path parameters

idstringrequired

Identifier of the establishment.

Body

This request acts on your real account.

Create a hosted connection link and send the owner to it. The link is valid for 30 minutes; at the end, Sofia sends them back to your redirectUrl when it recognizes its origin.

curl -X POST https://api.sofia-post.com/api/v1/establishments/$ESTABLISHMENT_ID/connection-links \
  -H "Authorization: Bearer $SOFIA_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"platform":"linkedin","redirectUrl":"https://app.example.com/sofia/connected"}'

A network that is already connected answers 409 account_already_connected; a network that Sofia does not offer answers 422 platform_not_offered.

Authorizations

  • Authorizationstringheaderrequired

    Your personal key or OAuth access token, sent as Bearer <token>.

Path parameters

  • idstringrequired

    Identifier of the establishment.

Body

application/json
  • platformstringrequired

    The network to connect

    Allowed values: instagramfacebooktiktoklinkedinx

  • redirectUrlstring

    Where to send the person at the end, if Sofia recognizes this origin; otherwise a Sofia page tells them it is done

Response

The hosted connection link and its expiry.

  • platformstringrequired

    The network to connect

  • urlstringrequired

    The Sofia page the person opens to connect the network

  • expiresAtstringrequired

    Until when the link waits for a click (ISO 8601)

Was this page helpful?