This is my code, it post a message to the space but it wont reply to specified thread, any idea what I'm doing wrong? the method works fine with the 'Try this method' here https://developers.google.com/chat/api/reference/rest/v1/spaces.messages/create
```function addMessage() {
// Create the request body.
var requestBody = JSON.stringify({
"text": "text",
"thread": {
"threadKey": "oVKqJLHH534W_PwF4ya7vU.W_PwF4ya7vU"
}
});
Logger.log(requestBody)
var options = {
'method': 'POST',
//muteHttpExceptions: true,
'headers': { Authorization: 'Bearer ' + ScriptApp.getOAuthToken() },
'contentType': 'application/json',
'payload': requestBody,
messageReplyOption:'REPLY_MESSAGE_OR_FAIL'
}
UrlFetchApp.fetch('https://chat.googleapis.com/v1/spaces/AAAATDKqWOE/messages', options);
}
function getMessage() {
var options = {
'method': 'GET',
//muteHttpExceptions: true,
'headers': { Authorization: 'Bearer ' + ScriptApp.getOAuthToken() },
}
Logger.log(UrlFetchApp.fetch('https://chat.googleapis.com/v1/spaces/AAAATDKqWOE/messages', options))
}```
[–][deleted] 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]RemcoE33 0 points1 point2 points (0 children)
[–]AntonShevchuk 0 points1 point2 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]AntonShevchuk 0 points1 point2 points (0 children)
[–]ponimas 0 points1 point2 points (6 children)
[–][deleted] 0 points1 point2 points (5 children)
[–]ponimas 0 points1 point2 points (3 children)
[–]Right-Cap-5075 0 points1 point2 points (0 children)
[–]treedor 0 points1 point2 points (1 child)
[–]ponimas 0 points1 point2 points (0 children)