> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 排解 API 請求錯誤

> 診斷並修正呼叫 Ayrshare API 時常見的錯誤，包括身份驗證、參數與回應代碼相關問題，並提供實用步驟。

以下是一些檢查項目，可協助你確認是否具備成功發文或呼叫任何 API 端點所需的資訊。

1. 確認你已將 API\*KEY（位於 Ayrshare GUI 儀表板的 API Dashboard）作為 [Authorization Bearer](https://www.ayrshare.com/docs/apis/overview.md#authorization) token 放在 header 中傳送。同時也必須設定正確的 [Content Type](https://www.ayrshare.com/docs/apis/overview.md#content-type)。
2. 進行 POST 呼叫時，請確認 body 傳送的是格式正確的 JSON。線上工具可協助你檢查，例如 [https://jsonlint.com/](https://jsonlint.com/)。
3. 若透過外部 URL 傳送媒體，請確保圖片或影片設定了正確的 [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types)。
4. 檢查所使用端點所需的必要參數，確保它們已被包含且格式正確。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.