門市建立連線連結

門市

建立連線連結

回傳託管連結,用戶在 Sofia 上授權網絡,因此網絡權杖不會到達你的應用。連結有效期 30 分鐘,僅限正式應用使用。

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

此請求將作用於你的真實帳號。

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

授權

  • Authorizationstring必填

    你的個人金鑰或 OAuth 存取權杖,以 Bearer <token> 傳送。

路徑參數

  • idstring必填

    門市的識別碼。

請求本文

application/json

  • platformstring必填

    要連結的網絡

    允許的值: instagramfacebooktiktoklinkedinx

  • redirectUrlstring

    最後把用戶送到的地址,僅當 Sofia 認可該來源;否則由 Sofia 頁面告知已完成

回應

201application/json

託管連線連結及其過期時間。

  • platformstring必填

    要連結的網絡

  • urlstring必填

    用戶打開以連結網絡的 Sofia 頁面

  • expiresAtstring必填

    連結等待點擊的截止時間(ISO 8601)

401

權杖缺失、未知、已過期或已被撤銷。

402

subscription_required。

403

測試應用回傳 live_mode_required,或缺少 accounts:write scope。

404

不在權杖所屬 Workspace 內的門市。

409

account_already_connected:該網絡已連結。

422

platform_not_offered:未提供該網絡。

4XXapplication/json

其他任何錯誤,以錯誤結構回傳。