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

# 抖音小程式

> 連接抖音小程式，產生體驗 QR Code，再將測試過的開發版上傳至抖音送審。

## 連接抖音小程式

先在 superun [發布專案網站](https://docs.superun.ai/zh-Hant/superun/features/publish.md)，並準備支援網頁嵌入的非個人主體抖音小程式，以及具開發權限的帳號。

1. 在 [抖音開放平台](https://developer.open-douyin.com/console?type=1) 開啟小程式，複製以 `tt` 開頭的 **AppID**。在 **開發 → 開發配置** 啟用並複製該小程式的**程式碼上傳金鑰**。[金鑰取得說明](https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/dev-tools/developer-instrument/development-assistance/cli-token)

   ![抖音開發配置中，小程式 AppID 和程式碼上傳金鑰的位置](https://mintcdn.com/uxarts/_t6btFJs5JR9Ru6k/images/superun/mobile/douyin-credentials.png?fit=max\&auto=format\&n=_t6btFJs5JR9Ru6k\&q=85\&s=7414952f38078e9a2f5080f195415a06)

2. 使用專案擁有者帳號進入 **營運 → 在行動裝置上使用 → 抖音小程式**。首次點選 **產生**，在 **配置** 中連接抖音小程式，填入 AppID 和金鑰並儲存。

## 設定業務網域

1. 在 superun 開啟 **設定業務網域**。進入抖音後台的 **開發 → 開發配置 → 網域管理 → web-view 網域**，下載原始的 `.txt` 驗證檔案。

   ![抖音 web-view 網域設定中的「添加」與「下載校驗文件」](https://mintcdn.com/uxarts/_t6btFJs5JR9Ru6k/images/superun/mobile/douyin-webview.png?fit=max\&auto=format\&n=_t6btFJs5JR9Ru6k\&q=85\&s=52adcef43e4e1aab6e67ed4573f5c994)

2. 回到 superun，點選 **上傳驗證檔案並更新網站**。這次更新也會發布網站中尚未發布的修改。

3. 網站更新後，複製 superun 顯示的網域，回到抖音的 **web-view 網域** 新增並確認。請填寫網域，例如 `app.example.com`，省略 `https://` 和路徑。

## 新增測試裝置並掃碼

1. 在抖音後台的 **開發 → 開發配置 → 測試裝置管理** 選擇掃碼新增，用準備體驗小程式的抖音帳號掃碼加入。

   ![抖音測試裝置管理頁右側的「掃碼添加」按鈕](https://mintcdn.com/uxarts/_t6btFJs5JR9Ru6k/images/superun/mobile/douyin-test-devices.png?fit=max\&auto=format\&n=_t6btFJs5JR9Ru6k\&q=85\&s=a013e0ab80ddd8a9d5cc6d4b8bbd50ca)

2. 回到 superun，在掃碼體驗區點選 **產生體驗 QR Code**。superun 會為目前的專案準備原生首頁。完成後用剛加入的帳號在抖音 App 內掃碼，檢查首頁、頁面跳轉與主要操作。

## 上傳開發版並送審

在上傳與送審區點選 **上傳開發版**，核對版本號碼與說明後上傳。上傳成功後點選 **前往抖音送審**，在抖音後台的 **版本管理** 選擇對應版本，補齊資料並提交審核。審核進度與上線操作都在抖音後台查看。[抖音版本審核常見問題](https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/operation/version-review/faq)

![抖音審核版本範例，審核通過後可查看版本詳情或發布](https://mintcdn.com/uxarts/_t6btFJs5JR9Ru6k/images/superun/mobile/douyin-version-review.png?fit=max\&auto=format\&n=_t6btFJs5JR9Ru6k\&q=85\&s=7a09e35fa6a20dfb548b6cb06da0388f)


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