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

# Integrating Coze API

> Integrate Coze with LangBot. Connect your Coze bots and agents to Discord, Telegram, WeChat and other messaging platforms.

This document explains how to obtain the Token and Bot ID from the Coze platform and enter them into the LangBot pipeline configuration.

## 1. Obtaining the Token and Bot ID

1. Log in to the Coze platform and enter your developer console.
   <img src="https://mintcdn.com/langbot/OB26CZsqXqbSrW_A/images/zh/deploy/pipelines/coze/coze07.png?fit=max&auto=format&n=OB26CZsqXqbSrW_A&q=85&s=783d8b03bc12258aa6d80c4cb799d757" alt="Coze Application API Key" width="1908" height="899" data-path="images/zh/deploy/pipelines/coze/coze07.png" />

2. In "API Management", create and copy the token.
   <img src="https://mintcdn.com/langbot/OB26CZsqXqbSrW_A/images/zh/deploy/pipelines/coze/coze06.png?fit=max&auto=format&n=OB26CZsqXqbSrW_A&q=85&s=8f88f48ed677714c4d3f2b40be0c8863" alt="Coze Application API Key" width="1920" height="898" data-path="images/zh/deploy/pipelines/coze/coze06.png" />

<Info>
  In Coze authorization, coze.cn supports long-term authorization through "Service Identities and Credentials", while coze.com only provides Personal Access Tokens.
</Info>

3. Select your own agent (or create a new one) from the project development section. The obtained ID is the `bot_id`.
   <img src="https://mintcdn.com/langbot/OB26CZsqXqbSrW_A/images/zh/deploy/pipelines/coze/coze05.png?fit=max&auto=format&n=OB26CZsqXqbSrW_A&q=85&s=c7524f00232de11f24dd4f2a679a0c53" alt="Coze bot_id" width="1920" height="980" data-path="images/zh/deploy/pipelines/coze/coze05.png" />

* Make sure to select the API option when publishing the agent
  <img src="https://mintcdn.com/langbot/OB26CZsqXqbSrW_A/images/zh/deploy/pipelines/coze/coze04.png?fit=max&auto=format&n=OB26CZsqXqbSrW_A&q=85&s=aba3a9c097b156ba5d078c4ccdad0bf1" alt="Coze Application API Key" width="1920" height="855" data-path="images/zh/deploy/pipelines/coze/coze04.png" />

Please securely store the following two pieces of information:

* **token**: The token generated by the Coze platform
* **bot\_id**: The Bot ID

## 2. Entering the Configuration in LangBot

1. Open the LangBot WebUI and navigate to the configuration page of a pipeline (or create a new pipeline and enter its configuration page)

2. Under "AI Capabilities", select the runner as `Coze API`

3. In the runner's configuration items, enter:

   * **token**: Paste the API Token you copied from the Coze platform
   * **bot\_id**: Paste the corresponding Bot ID
   * Please select the `API Base URL` according to the Coze site you are using: coze.cn please fill in `https://api.coze.cn`; coze.com please fill in `https://api.coze.com`

   <img src="https://mintcdn.com/langbot/OB26CZsqXqbSrW_A/images/zh/deploy/pipelines/coze/coze08.png?fit=max&auto=format&n=OB26CZsqXqbSrW_A&q=85&s=4a9b19b80a7ebb85e61f58b5319b00cb" alt="Pipeline Configuration" width="1097" height="751" data-path="images/zh/deploy/pipelines/coze/coze08.png" />

4. Click "Save" to complete the configuration

Once completed, you can invoke the Coze agent within this pipeline for dialogue processing

## Frequently Asked Questions (FAQ)

* **Save fails or invocation returns an error**: Please verify that the token and bot\_id are correct and do not contain extra spaces
* **Unable to select `Coze API`**: Please confirm whether the current version supports this runner. If not yet supported, please upgrade to a version that includes the Coze runner

For more general pipeline configuration instructions, please refer to [Modifying Dialogue Pipeline Configuration](/en/usage/pipelines/readme)
