> For the complete documentation index, see [llms.txt](https://docs.pancakeswap.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pancakeswap.finance/chinese/huan-ying-lai-dao-pancakeswap/contact-us/faq/what-is-an-approval-transaction.md).

# 什么是授权交易？

**当你第一次兑换或添加流动性时，你必须授权你正在兑换的代币。这将赋予 PancakeSwap 智能合约从你的钱包中兑换该代币的权限。**

授权交易允许 PancakeSwap 拥有从你的钱包中兑换该代币的权限。对于你想要使用 PancakeSwap 兑换的每一种代币，你都必须完成一笔授权交易。

以下是如何完成授权交易的指南：

1. 输入你的兑换详情。

   <figure><img src="https://raw.githubusercontent.com/pancakeswap/pancake-document/en/.gitbook/assets/step1%20%281%29%20%281%29.png" alt=""><figcaption></figcaption></figure>
2. 在查看兑换详情后，选择“Confirm swap”。

   <figure><img src="https://raw.githubusercontent.com/pancakeswap/pancake-document/en/.gitbook/assets/4536.png" alt=""><figcaption></figcaption></figure>
3. 在你的钱包应用程序或钱包扩展程序中，授权你正在兑换的代币的花费。

允许该代币在你的钱包中用于兑换。

*你的钱包可能会要求你输入你想要授权的代币数量。请输入一个大于或等于你正在兑换的代币数量的数字。*

<figure><img src="https://raw.githubusercontent.com/pancakeswap/pancake-document/en/.gitbook/assets/1%20%281%29.png" alt=""><figcaption></figcaption></figure>

4. 授权之后，将出现另一笔交易，要求你确认兑换。

   <figure><img src="https://raw.githubusercontent.com/pancakeswap/pancake-document/en/.gitbook/assets/3.png" alt=""><figcaption></figcaption></figure>
5. 一旦兑换被确认，该交易就会被提交到区块链（待处理）。

   <figure><img src="https://raw.githubusercontent.com/pancakeswap/pancake-document/en/.gitbook/assets/step%2004.png" alt=""><figcaption></figcaption></figure>
6. 当交易成功完成时，你将在屏幕上看到“Success”和一个绿色的对勾。

<figure><img src="https://raw.githubusercontent.com/pancakeswap/pancake-document/en/.gitbook/assets/5.png" alt=""><figcaption></figcaption></figure>

代币授权会持续一段时间，之后该代币将需要通过签名请求再次进行授权。授权签名不需要网络费用。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pancakeswap.finance/chinese/huan-ying-lai-dao-pancakeswap/contact-us/faq/what-is-an-approval-transaction.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
