方法 PickerBuilder.setAppId
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
設定需要透過 Drive API 存取使用者檔案的應用程式 ID。
這是 https://www.googleapis.com/auth/drive.file
範圍的必要條件。
範例
基本用法
const builder = new google.pickerPickerBuilder()
.setAppId('1234567890');
簽名
setAppId(appId: string): PickerBuilder;
詳細資料
參數
名稱 |
類型 |
選用 |
說明 |
appId |
string |
否 |
Cloud 專案編號。 |
傳回
PickerBuilder
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],null,["# Method PickerBuilder.setAppId\n\nSets the Id of the application needing to access the user's files via the\n[Drive API](/workspace/drive/api).\n\nThis is required for the `https://www.googleapis.com/auth/drive.file` scope.\n\nExamples\n--------\n\nBasic usage \n\n const builder = new google.pickerPickerBuilder()\n .setAppId('1234567890');\n\nSignature\n---------\n\n setAppId(appId: string): PickerBuilder;\n\nDetails\n-------\n\n| Optional | No |\n| Final | No |\n| Protected | No |\n| Static | No |\n|-----------|----|\n\nParameters\n----------\n\n| Name | Type | Optional | Description |\n|---------|----------|----------|---------------------------|\n| `appId` | `string` | No | The Cloud project number. |\n\nReturns\n-------\n\n[PickerBuilder](./picker.pickerbuilder)"]]