Panoramica dell'API Google Chat
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questa pagina fornisce una panoramica su come utilizzare l'API Google Chat e la relativa documentazione di riferimento.
L'API Google Chat ha interfacce gRPC e
REST e
librerie client che supportano entrambe. Se le librerie client fornite non soddisfano le tue esigenze, puoi scrivere le tue librerie client che utilizzano l'interfaccia gRPC o REST.
Librerie client
Il modo consigliato per la maggior parte degli sviluppatori di chiamare l'API Google Chat
è con le nostre librerie client di Cloud
supportate ufficialmente per il linguaggio che preferisci, come Python, Java o Node.js.
Se codifichi con Google Apps Script, utilizza il
servizio Chat avanzato
anziché installare una libreria client.
Tipo, metodo e nomi dei campi
A seconda che utilizzi librerie client, gRPC o REST, il tipo, il metodo e i nomi dei campi per l'API Google Chat variano leggermente:
- Le librerie client Cloud sono organizzate in base ai servizi gRPC e ai relativi metodi.
Le librerie client delle API di Google sono organizzate come servizi che contengono oggetti o classi corrispondenti alle risorse REST, che contengono anche metodi corrispondenti.
- gRPC è organizzato in base ai servizi e ai relativi metodi.
- REST è organizzato in base alle gerarchie delle risorse e ai relativi metodi.
- I nomi dei campi gRPC utilizzano la notazione snake case.
- I nomi dei campi REST utilizzano la notazione camel case, anche se il servizio API accetterà
la notazione camel case o snake case.
- I nomi dei campi della libreria client utilizzano la notazione title case, camel case o snake case,
a seconda del nome idiomatico per la lingua.
Buffer di protocollo
Che tu utilizzi librerie client, REST o gRPC, il servizio sottostante è
definito utilizzando buffer di protocollo. In particolare, il servizio
utilizza proto3.
Quando chiami l'API, alcuni campi di richiesta o risposta possono richiedere una conoscenza di base dei
tipi noti di protocol buffer.
Inoltre, quando chiami l'API REST, il comportamento del valore predefinito per i buffer di protocollo potrebbe comportare la mancanza di campi in una risposta JSON. Questi campi sono
impostati sul valore predefinito, pertanto non sono inclusi nella risposta.
Versioni API
Sono disponibili le seguenti versioni dell'API:
Anteprima per gli sviluppatori
Nella documentazione potresti vedere metodi o campi API disponibili solo tramite il programma di anteprima per gli sviluppatori. Per testare, visualizzare in anteprima e fornire feedback sulle funzionalità in anteprima più recenti, partecipa al programma Anteprima per sviluppatori.
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 2025-08-29 UTC.
[null,null,["Ultimo aggiornamento 2025-08-29 UTC."],[[["\u003cp\u003eThis page offers guidance on utilizing the Google Chat API and navigating its reference documentation, including gRPC and REST interfaces.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers are encouraged to use the provided client libraries for Python, Java, Node.js, or the Advanced Chat service for Google Apps Script.\u003c/p\u003e\n"],["\u003cp\u003eType, method, and field names may vary slightly depending on whether you are using client libraries, gRPC, or REST, with details provided on their respective conventions.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Chat API is built upon protocol buffers, specifically proto3, which may require a basic understanding for certain request and response fields.\u003c/p\u003e\n"],["\u003cp\u003eStable API version v1 is currently available, with access to developer preview features obtainable through the Developer Preview Program.\u003c/p\u003e\n"]]],["The Google Chat API offers gRPC and REST interfaces, with corresponding client libraries or the option to create custom ones. Developers can use Cloud Client Libraries, or the Advanced Chat service with Google Apps Script. Type, method, and field names vary across libraries, gRPC, and REST. The API relies on protocol buffers (proto3), which can impact JSON responses due to default value behavior. The current stable version is v1, with a Developer Preview program for testing new features.\n"],null,["# Google Chat API overview\n\nThis page provides an overview of how to use Google Chat API and its reference\ndocumentation.\n\nGoogle Chat API has both [gRPC](/workspace/chat/api/reference/rpc) and\n[REST](/workspace/chat/api/reference/rest) interfaces, and\n[client libraries](/workspace/chat/libraries) that support both. Optionally, if\nthe provided client libraries don't meet your needs, you can write your own\nclient libraries that use the gRPC or REST interface.\n\nClient libraries\n----------------\n\nThe recommended way for most developers to call the Google Chat API\nis with our officially supported\n[Cloud Client Libraries](/workspace/chat/libraries)\nfor your preferred language, like Python, Java, or Node.js.\n\nIf you're coding with Google Apps Script, use the\n[Advanced Chat service](/apps-script/advanced/chat)\ninstead of installing a client library.\n\nType, method, and field names\n-----------------------------\n\nDepending on whether you're using client libraries, gRPC, or REST, the type,\nmethod, and field names for the Google Chat API vary somewhat:\n\n- Cloud Client Libraries are arranged by gRPC services and their methods. Google API Client Libraries are arranged as services that contain objects or classes that correspond with REST resources, which also contain corresponding methods.\n- gRPC is arranged by services and their methods.\n- REST is arranged by resource hierarchies and their methods.\n- gRPC field names use snake case.\n- REST field names use camel case, though the API service will accept either camel case or snake case.\n- Client library field names use either title case, camel case or snake case, depending on which name is idiomatic for the language.\n\nProtocol buffers\n----------------\n\nWhether you are using client libraries, REST, or gRPC, the underlying service is\ndefined using [protocol buffers](/protocol-buffers). In particular, the service\nuses [proto3](/protocol-buffers/docs/proto3).\n\nWhen calling the API, some request or response fields can require a basic\nunderstanding of\n[protocol buffer well-known types](/protocol-buffers/docs/reference/google.protobuf).\n\nIn addition, when calling the REST API, the\n[default value](/protocol-buffers/docs/proto3#default) behavior for protocol\nbuffers may result in missing fields in a JSON response. These fields are\nset to the default value, so they are not included in the response.\n\nAPI versions\n------------\n\nThe following API versions are available:\n\n- **v1**: Stable.\n\nDeveloper Preview\n-----------------\n\nIn the documentation, you might see API methods or fields that are only\navailable through the Developer Preview Program. To test and preview and offer\nfeedback on the latest preview features, join the\n[Developer Preview Program](/workspace/preview).\n\nRelated topics\n--------------\n\n- [Call the Google Chat API](/workspace/chat/api-overview)"]]