Accounts: insert
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Wymaga autoryzacji
Wstawia nowe konto użytkownika
Żądanie
Żądanie HTTP
POST https://www.googleapis.com/mirror/v1/accounts/userToken/accountType/accountName
Parametry
Nazwa parametru |
Wartość |
Opis |
Parametry ścieżki |
accountName |
string |
Nazwa konta, które ma zostać przekazane Menedżerowi konta na Androida.
|
accountType |
string |
Rodzaj konta przekazany do Menedżera konta na Androidzie.
|
userToken |
string |
Identyfikator użytkownika.
|
Autoryzacja
To żądanie wymaga autoryzacji w ramach tego zakresu (więcej informacji o uwierzytelnianiu i autoryzacji).
Treść żądania
W treści żądania podaj zasób kont.
Odpowiedź
Jeśli operacja się uda, metoda zwróci zasób kont w treści odpowiedzi.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-25 UTC."],[[["\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."]]