Method: users.labels.create
Crea una nuova etichetta.
Richiesta HTTP
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/labels
L'URL utilizza la sintassi di transcodifica gRPC.
Parametri del percorso
Parametri |
userId |
string
L'indirizzo email dell'utente. È possibile utilizzare il valore speciale me per indicare l'utente autenticato.
|
Corpo della richiesta
Il corpo della richiesta contiene un'istanza di Label
.
Corpo della risposta
In caso di esito positivo, il corpo della risposta contiene un'istanza di Label
appena creata.
Ambiti di autorizzazione
Richiede uno dei seguenti ambiti OAuth:
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.labels
Per ulteriori informazioni, consulta la Guida alle autorizzazioni.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2024-09-05 UTC.
[null,null,["Ultimo aggiornamento 2024-09-05 UTC."],[[["Creates a new label for a user's Gmail account using an HTTP POST request."],["Requires providing the user's email address (or `me` for the authenticated user) as a path parameter."],["The request body should contain details of the new label, and a successful response will return the created label details."],["Requires specific authorization scopes, such as `https://mail.google.com/` or `https://www.googleapis.com/auth/gmail.labels`, for access."]]],["This documentation details the process for creating a new label via the Gmail API. A `POST` request is sent to `https://gmail.googleapis.com/gmail/v1/users/{userId}/labels`, with the `userId` path parameter specifying the user. The request body must include a `Label` instance. Successful requests return the newly created `Label` in the response body. Authorization requires specific OAuth scopes, including `https://mail.google.com/` and others. The operation can be tested using the `Try it!` function.\n"]]