We send messages via Webhook to our google chat spaces. Example:
URL="https://chat.googleapis.com/v1/spaces/AAAAhSnYlQA/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=REMOVEDPLEASEASKIFREQUIRED&messageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD"
app_message='{
"text": "foobar",
"thread": {"threadKey": "mythreadkey123123"}
}'
xargs -I % -P 8 curl -s -X POST -H "Content-Type: application/json; charset=UTF-8" -d "${app_message}" $URL < <(printf '%s\n' {1..400})
Unfortunately, we often run into 429 errors
โฆ
{
"error": {
"code": 429,
"message": "Resource has been exhausted (e.g. check quota).",
"status": "RESOURCE_EXHAUSTED"
}
}
{
"name": "spaces/AAAAhSnYlQA/messages/pU9fmiHbl1E.0TgWQ5X1Y6s",
"text": "foobar",
"thread": {
"name": "spaces/AAAAhSnYlQA/threads/pU9fmiHbl1E",
"threadKey": "mythreadkey123123"
},
"space": {
"name": "spaces/AAAAhSnYlQA"
}
}
{
"error": {
"code": 429,
"message": "Resource has been exhausted (e.g. check quota).",
"status": "RESOURCE_EXHAUSTED"
}
}
โฆ
Which quota limit is affected here? Where can we see the overview? And where can we increase it?
Check out https://developers.google.com/workspace/chat/limits#per-project_quotas for information about the Chat quotas, using exponential backoff techniques if you do get 429 errors, and how to request an increase in the quota.
Hope that helps,
Ian
Can we increase that somehow?
I addressed that part of the question in my original replyโฆ.
User | Count |
---|---|
2 | |
2 | |
2 | |
1 | |
1 |