संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
इस गाइड में, Google Chat API के Reaction संसाधन पर delete() तरीके का इस्तेमाल करके, किसी मैसेज से 👍, 🚲, और 🌞 जैसे रिएक्शन मिटाने का तरीका बताया गया है. रिएक्शन मिटाने से मैसेज नहीं मिटता.
Reaction रिसॉर्स, एक इमोजी को दिखाता है. लोग इस इमोजी का इस्तेमाल करके, किसी मैसेज पर प्रतिक्रिया दे सकते हैं. जैसे, 👍, 🚲, और 🌞.
ज़रूरी शर्तें
Node.js
आपके पास Business या Enterprise वर्शन वाला Google Workspace खाता होना चाहिए. साथ ही, आपके पास Google Chat को ऐक्सेस करने की अनुमति होनी चाहिए.
import{createClientWithUserCredentials}from'./authentication-utils.js';constUSER_AUTH_OAUTH_SCOPES=['https://www.googleapis.com/auth/chat.messages.reactions'];// This sample shows how to delete a reaction to a message with user credentialasyncfunctionmain(){// Create a clientconstchatClient=awaitcreateClientWithUserCredentials(USER_AUTH_OAUTH_SCOPES);// Initialize request argument(s)constrequest={// Replace SPACE_NAME, MESSAGE_NAME, and REACTION_NAME herename:'spaces/SPACE_NAME/messages/MESSAGE_NAME/reactions/REACTION_NAME',};// Make the requestconstresponse=awaitchatClient.deleteReaction(request);// Handle the responseconsole.log(response);}main().catch(console.error);
इस सैंपल को चलाने के लिए, इन्हें बदलें:
SPACE_NAME: स्पेस के name का आईडी.
आईडी पाने के लिए, ListSpaces() तरीके का इस्तेमाल करें या स्पेस के यूआरएल से आईडी पाएं.
MESSAGE_NAME: मैसेज के name से मिला आईडी.
Chat API की मदद से एसिंक्रोनस तरीके से मैसेज बनाने के बाद, आपको जवाब के मुख्य हिस्से से आईडी मिल सकता है. इसके अलावा, मैसेज बनाते समय असाइन किए गए कस्टम नाम से भी आईडी मिल सकता है.
REACTION_NAME: रिएक्शन के name से मिला आईडी.
आईडी पाने के लिए, ListReactions() तरीके का इस्तेमाल करें. इसके अलावा, Chat API की मदद से एसिंक्रोनस तरीके से प्रतिक्रिया बनाने के बाद मिले रिस्पॉन्स के मुख्य हिस्से से भी आईडी पाया जा सकता है.
अगर अनुरोध पूरा हो जाता है, तो जवाब का मुख्य हिस्सा खाली होता है. इससे पता चलता है कि प्रतिक्रिया मिटा दी गई है.
[[["समझने में आसान है","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"]],["आखिरी बार 2025-09-10 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThis guide explains how to delete reactions (emojis like 👍, 🚲, 🌞) from Google Chat messages using the \u003ccode\u003edelete()\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eDeleting a reaction does not delete the original message itself.\u003c/p\u003e\n"],["\u003cp\u003eYou'll need a Google Workspace account and Node.js to use the Google Chat API for deleting reactions.\u003c/p\u003e\n"],["\u003cp\u003eThe guide provides a code sample and instructions to set up your environment and authenticate for using the API.\u003c/p\u003e\n"],["\u003cp\u003eTo successfully delete a reaction, you need to provide the specific name of the reaction resource in your API request.\u003c/p\u003e\n"]]],["This guide details deleting reactions from Google Chat messages using the `delete()` method on the `Reaction` resource. Key steps include setting up a Google Workspace account, enabling the Google Chat API, and installing the Node.js Cloud Client Library. To delete a reaction, specify the `chat.messages.reactions` or `chat.messages` scope, and call `DeleteReaction()`, providing the reaction's `name`. The guide includes a Node.js code sample that demonstrates the deletion, requiring the space, message, and reaction IDs. A successful deletion results in an empty response.\n"],null,[]]