Accounts: insert
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
需要授權
為使用者插入新帳戶
要求
HTTP 要求
POST https://www.googleapis.com/mirror/v1/accounts/userToken/accountType/accountName
參數
參數名稱 |
值 |
說明 |
路徑參數 |
accountName |
string |
要傳送給 Android 客戶經理的帳戶名稱。
|
accountType |
string |
要傳遞至 Android 客戶經理的帳戶類型。
|
userToken |
string |
使用者的 ID。
|
授權
此要求需要獲得下列範圍的授權 (進一步瞭解驗證和授權)。
要求主體
在要求主體中,提供「Accounts」資源。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eInserts a new user account, requiring authorization with specified scope.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes a POST request to a designated endpoint with account name, type, and user ID.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires an Accounts resource and a successful response returns the same.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization is necessary and details regarding authentication and authorization can be found in the provided documentation link.\u003c/p\u003e\n"]]],[],null,["# Accounts: insert\n\n**Requires [authorization](#auth)**\n\nInserts a new account for a user\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://www.googleapis.com/mirror/v1/accounts/userToken/accountType/accountName\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|----------|----------------------------------------------------------------------|\n| **Path parameters** |||\n| `accountName` | `string` | The name of the account to be passed to the Android Account Manager. |\n| `accountType` | `string` | Account type to be passed to Android Account Manager. |\n| `userToken` | `string` | The ID for the user. |\n\n### Authorization\n\nThis request requires authorization with the following scope ([read more about authentication and authorization](/glass/authorization)).\n\n| Scope |\n|-------|\n\n### Request body\n\nIn the request body, supply an [Accounts resource](/glass/v1/reference/accounts#resource).\n\nResponse\n--------\n\nIf successful, this method returns an [Accounts resource](/glass/v1/reference/accounts#resource) in the response body."]]