किसी मैसेज को अपडेट करता है. patch और update के तरीकों में अंतर है. patch तरीके में, patch अनुरोध का इस्तेमाल किया जाता है, जबकि update तरीके में, put अनुरोध का इस्तेमाल किया जाता है. हमारा सुझाव है कि आप patch तरीके का इस्तेमाल करें. उदाहरण के लिए, मैसेज अपडेट करें देखें.
पुष्टि करने के लिए, इन तरीकों का इस्तेमाल किया जा सकता है:
ऐप्लिकेशन की पुष्टि करने की सुविधा का इस्तेमाल करने पर, अनुरोध सिर्फ़ उन मैसेज को अपडेट कर सकते हैं जिन्हें कॉल करने वाले Chat ऐप्लिकेशन से बनाया गया है.
एचटीटीपी अनुरोध
PUT https://chat.googleapis.com/v1/{message.name=spaces/*/messages/*}
जहां {space}, मैसेज पोस्ट किए जाने वाले स्पेस का आईडी होता है और {message} मैसेज के लिए, सिस्टम से असाइन किया गया आईडी होता है. उदाहरण के लिए, spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB.
अगर मैसेज बनाते समय कोई कस्टम आईडी सेट किया जाता है, तो अनुरोध में मैसेज की जानकारी देने के लिए इस आईडी का इस्तेमाल किया जा सकता है. इसके लिए, {message} को clientAssignedMessageId फ़ील्ड की वैल्यू से बदलें. उदाहरण के लिए, spaces/AAAAAAAAAAA/messages/client-custom-name. ज़्यादा जानकारी के लिए, मैसेज को नाम देना देखें.
ज़रूरी नहीं. अगर true और मैसेज नहीं मिलता है, तो नया मैसेज बनाया जाता है और updateMask को अनदेखा कर दिया जाता है. दिया गया मैसेज आईडी, क्लाइंट से असाइन किया गया होना चाहिए. ऐसा न होने पर, अनुरोध पूरा नहीं होगा.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2024-11-04 (UTC) को अपडेट किया गया."],[[["Updates a Google Chat message using the `PUT` method, preferably with the `patch` approach for partial modifications."],["Requires providing the message's resource name in the URL path for identification."],["Allows specifying fields to update using `updateMask` and supports creating a new message if the original is missing with `allowMissing` set to `true`."],["Authentication can be done using app authentication or user authentication, with app authentication restricting updates to messages created by the calling Chat app."],["Needs authorization with specific OAuth scopes like `chat.bot`, `chat.import`, or `chat.messages`."]]],["This describes updating messages in Google Chat using either `patch` or `put` requests, recommending `patch`. The `PUT` request uses the format `https://chat.googleapis.com/v1/{message.name=spaces/*/messages/*}`. Updating requires specifying the `message.name` path parameter and the `updateMask` query parameter to identify fields to modify. Optional `allowMissing` creates a new message if one is not found. The request and response body are `Message` instances. Authorization requires specific OAuth scopes. App authentication can update messages from the calling app only.\n"]]