在 API 呼叫中指定 User Profile 的方式,是在標頭中加入 Profile Key。
Profile Key
許多端點(例如 /user、/analytics 或 /delete)都可以透過在標頭中加入「Profile-Key」參數來代表某個 Profile 帳號執行。 舉例來說,/delete 端點可搭配指定的 Profile Key,用來刪除該 Profile 帳號中指定 post id 的貼文。啟用或停用社群網路
你可以在全域層級或 User Profile 層級啟用與停用社群網路。- 在控制台中全域管理社群帳號存取權限。
- 在建立或更新 User Profile 時,管理該 Profile 的社群帳號存取權限。
取得已連結的社群帳號
使用 /profiles 端點或 /user 端點,取得 User Profile 已連結的社群帳號。對某個 User Profile 發文
使用 /post 端點,你可以在標頭中加入 Profile Key,對指定的 User Profile 發文。回應會是一個貼文結果或錯誤結果的陣列,並帶有整體狀態:若所有貼文都成功,狀態為「success」;若任何一則失敗,狀態為「error」。 你可以在使用 /create-profile 端點建立 Profile 時取得使用者的 Profile Key,或於 Ayrshare 網頁控制台 GUI 中切換到該 Profile,並前往 Profile Key 頁面取得。Demo User Profiles
Demo User Profile 讓你可以為潛在的終端使用者提供為期 30 天的試用,體驗你平台的社群功能,而不必立即將其轉為標準的 User Profile。 在建立 Profile 時設定demo: true 即可建立。Demo User Profile 的運作方式與標準 User Profile 完全相同 —— 你的使用者可以使用其 Profile Key 連結社群帳號、發文並取得分析資料。
30 天後,Demo User Profile 會自動轉換為標準的 User Profile。若你已註冊 demo webhook,則會在轉換發生前兩天收到 upgradeWarning 事件,並在轉換發生時收到 upgrade 事件,讓你可以事先提醒使用者(或移除該 Profile)。
Demo User Profile 僅在 Enterprise plan 下提供,且必須為你的帳號啟用。如需進一步了解,請聯絡我們。
