登入開始免費試用
easyCoexistence 官方 API

Instagram 登入錯誤「Invalid platform app」:檢查要點

「Invalid platform app」出現時,表示 Instagram 登入視窗(https://www.instagram.com/oauth/authorize)不接受 client_id 所指定的應用程式。請先檢查該值:Business Login for Instagram 採用應用程式控制台中「搭配 Instagram 登入的 API 設定」下顯示的 Instagram 應用程式 ID,而非控制台頂部的 Meta 應用程式 ID(後者供 Facebook Login 與 Unified Login 使用)。

easyCoexistence 的 Meta 應用程式為您執行 Business Login for Instagram:選擇「新增連接」,再選 Instagram,以商業或創作者帳戶登入並批准權限,Claude、ChatGPT 或您自己的平台即可透過 Meta 官方 API 發布內容、回覆留言與私訊,並讀取洞察數據。

client_id

Business Login for Instagram 採用應用程式的 Instagram 應用程式 ID,可在商業登入設定中找到。

2 app IDs

Facebook Login for Business 使用 Meta 應用程式 ID;Business Login for Instagram 則使用 Instagram 應用程式 ID。

Exact match

redirect_uri 必須與已儲存的 OAuth 重新導向 URI 相符;控制台可能會加上結尾的斜線。

Business

應用程式要加入 Instagram 產品前所需的應用程式類型。

Meta app ID

Unified Login 的代碼交換改用 Meta 應用程式密鑰,而非 Instagram 應用程式 ID 與密鑰。

「Invalid platform app」是什麼意思?

Instagram 的授權視窗不認得請求中的應用程式,即不接受它為可供登入的應用程式。Meta 的文件未列出該錯誤訊息本身,但說明了該視窗(https://www.instagram.com/oauth/authorize)的運作方式:應用程式須已加入搭配 Instagram 登入 API 設定的 Instagram 產品,並以其 Instagram 應用程式 ID 識別。請求中若指定其他應用程式 ID,即不符合此條件。

client_id 應填入哪個應用程式 ID?

應填入 Instagram 應用程式 ID。使用 Instagram 登入的 Meta 應用程式會顯示兩個 ID:應用程式控制台頂部的 Meta 應用程式 ID(Facebook Login for Business 使用),以及 Business Login for Instagram 作為 client_id 採用的 Instagram 應用程式 ID。其應用程式密鑰於存取權杖交換時與之配對。Meta 的登入指南列出了查找路徑:

1InstagramThe product in the App Dashboard
2API setup with Instagram loginThe Instagram Login setup page
33. Set up Instagram business loginThe step that holds the login settings
4Business login settingsRedirect URIs and the app's credentials
5Instagram App IDThe value client_id takes

如何建立授權 URL?

使用四個必填參數及一個可選的 state,格式依 Meta 參考文件所列。應用程式控制台在同一「設定 Instagram 商業登入」步驟中提供的 Embed URL,是已預先填入 Instagram 應用程式 ID 與權限範圍的現成版本。

An authorization URL for Business Login for Instagram
https://www.instagram.com/oauth/authorize
  ?client_id=<INSTAGRAM_APP_ID>
  &redirect_uri=https://app.example.com/instagram/callback
  &response_type=code
  &scope=instagram_business_basic,instagram_business_content_publish
  &state=<CSRF_TOKEN>

請求還須與什麼相符?

另有三個參數須正確無誤,各項說明見 Meta 登入指南:

  • redirect_uri:須與「商業登入設定」下 OAuth redirect URIs 已儲存的 URI 完全相符。控制台可能會加上結尾斜線,故應對照已儲存的清單核對。
  • response_type:code。
  • scope:instagram_business_basic,加上應用程式所用的其他 instagram_business_* 權限;舊有的 business_* 值已於 2025 年 1 月 27 日棄用。

Instagram 登入需要什麼應用程式設定?

只適用於已設定搭配 Instagram 登入之 Instagram API 的應用程式。Meta 的遷移指南表示,新建立的應用程式無法以 Instagram 登入設定 Instagram API,因此新應用程式沒有可傳送的 Instagram 應用程式 ID,並會透過 Unified Login 讓使用者登入,其登入 URL 附帶 config_id。於現有應用程式上,商業登入於搭配 Instagram 登入的 API 設定第 3 步設定,並儲存重新導向 URL 與 OAuth redirect URIs。

登入成功後會發生什麼事?

Instagram 會將使用者重新導向至 redirect_uri 並附上 code,該代碼有效期為一小時,且只能使用一次;使用前須移除 Meta 附加在結尾的 #_。伺服器會向 https://api.instagram.com/oauth/access_token 發出請求,以 Instagram 應用程式 ID 與密鑰、相同的 redirect_uri 及 grant_type=authorization_code 交換存取權杖。同一 code 若送出兩次,會失敗並回傳 Matching code was not found or was already used。

使用 easyCoexistence 時需要這些設定嗎?

不需要。easyCoexistence 的 Meta 應用程式已包含 Business Login for Instagram,因此帳戶擁有者只需在控制台選擇「新增連接」,再選 Instagram,並在 Instagram 自身的視窗中批准權限;應用程式 ID、重新導向 URI 與存取權杖交換均由系統處理。代客戶連接的平台,則改為透過 Partner API 將客戶導向託管的連接連結。

常見錯誤

  • 複製應用程式控制台頂部的 ID。那是 Meta 應用程式 ID;Business Login for Instagram 須從其商業登入設定中取用 Instagram 應用程式 ID。
  • 刪去控制台為重新導向 URI 加上的結尾斜線。Meta 要求與已儲存的 OAuth redirect URIs 完全相符。
  • 沿用舊範例中的 scope 值。business_basic 及其他 business_* 名稱已於 2025 年 1 月 27 日棄用。
  • 在存取權杖交換中將 Instagram 應用程式 ID 與 Meta 應用程式密鑰配對。Instagram 登入須一併使用 Instagram 應用程式 ID 與密鑰。
使用 EasyCoexistence 完成這項設定

每個連接每月 US$ 9 起,連接越多越便宜,最低降至 US$ 0.75,前 3 天免費試用。

常見問題

Instagram 應用程式 ID 與 Meta 應用程式 ID 相同嗎?

不相同。Facebook Login for Business 與 Unified Login 使用 Meta 應用程式 ID,而 Business Login for Instagram 使用其自身設定中顯示的 Instagram 應用程式 ID。

Unified Login 如何讓使用者登入?

透過附帶 config_id 的登入 URL,該 config_id 來自應用程式控制台的設定;代碼交換則使用 Meta 應用程式 ID 與密鑰,而非 Instagram 的 ID 與密鑰。

error_reason=user_denied 是什麼意思?

使用者已取消登入。Instagram 會以 error=access_denied、error_reason=user_denied 與 error_description=The user denied your request 重新導向,應用程式應妥善處理。

連接 Instagram 至 easyCoexistence 是否需要自有的 Meta 應用程式?

不需要。easyCoexistence 的 Meta 應用程式持有 Instagram 權限,因此帳戶擁有者只需使用 Instagram 登入並批准權限即可。

繼續閱讀

兩分鐘內連接您的第一個頻道。

無需等待平台審核。連接 WhatsApp、Instagram、TikTok 或其他頻道,然後請您的 AI 發佈貼文、回覆訊息或匯報數據,並看着它運作。

  • 免費試用 3 天
  • 隨時取消
  • 只用官方 API
  • 24/7 監察

驗證日期