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

# 设置 GitHub Webhook

> 将 Square Cloud 与 GitHub webhooks 集成。

<ParamField header="Authorization" type="string" placeholder="API Key" required>
  你账户的 API 密钥。你可以在[账户设置](https://squarecloud.app/zh/account/security)中找到它。
</ParamField>

### 参数

<ParamField path="app_id" type="string" placeholder="Application ID" required>
  应用程序的 ID。你可以在应用程序仪表盘的 URL 中找到它。
</ParamField>

<ParamField body="access_token" type="string" placeholder="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" required>
  你的 GitHub 仓库的访问令牌。你可以在 [GitHub Tokens Classic](https://github.com/settings/tokens/new) 中找到它。
</ParamField>

### 响应

<ResponseField name="status" type="string">
  指示调用是否成功。成功时为 `success`，否则为 `error`。
</ResponseField>

<ResponseField name="response" type="object">
  响应的内容。

  <Expandable title="切换对象">
    <ResponseField name="webhook" type="string">
      webhook 的 URL。
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
      "status": "success",
      "response": {
          "webhook": "https://api.squarecloud.app/v2/git/webhook/<webhook-code>"
      }
  }
  ```
</ResponseExample>
