# 什么是授权操作？

**第一次进行兑换或添加流动性时，您必须要先对支出代币进行授权（approve）操作。通过此步骤， 您授权给了 PancakeSwap 的智能合约让合约能从您的钱包中使用该代币进行兑换操作。**

授权操作（approval transaction），即您授权给 PancakeSwap 来使用您钱包中某一特定代币用于兑换操作。您钱包中的每一种代币，若要使用 PancakeSwap 进行兑换，都必须先进行授权。

下面是如何完成授权操作的指南：

1\. 输入好您的兑换内容。

<figure><img src="/files/iqMZHxo5Y1PXdVjxqNs2" alt=""><figcaption></figcaption></figure>

2\. 核对完兑换内容后，选择 "确认兑换（Confirm swap）"。

<figure><img src="/files/LvisbYFmJfQrGic6gHsA" alt=""><figcaption></figcaption></figure>

3\. 在钱包应用程序或钱包扩展程序中，授权您在此次兑换中将花费的代币。

让钱包中的代币能于兑换中使用。

*您的钱包可能会要求您输入欲授权代币的数量。请输入一个大于或等于您要支出的代币数量的数额。*

<figure><img src="/files/9Our3EV5zfOmnvb57lio" alt=""><figcaption></figcaption></figure>

4.授权完成后，钱包会弹出另一个上链确认，要求您确认兑换（confirm swap）。

<figure><img src="/files/4pXwwOwALtyFLIgunzcI" alt=""><figcaption></figcaption></figure>

5\. 一旦兑换得到确认，交易就会提交到区块链（未确认）。&#x20;

<figure><img src="/files/DXCn2I3M2ia7Q2rAcy7x" alt=""><figcaption></figcaption></figure>

6\. 当交易成功完成时，您将看到屏幕上显示 "成功（Success）" 和一个绿色的勾号。

<figure><img src="/files/FQnjVNlTTqi35cIJenFh" alt=""><figcaption></figcaption></figure>

代币的授权有效期会持续一段时间，之后必须通过签名请求再次授权代币。授权签名无需支付矿工费。


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pancakeswap.finance/chinese/master/click-here-for-help/shen-me-shi-shou-quan-cao-zuo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
