Google 群组设置 API 500 错误
Google Groups Settings API 500 Error
我想通过网络 API 请求更新群组设置。提供了所有必要的授权范围并启用了组设置。我发送一个看跌请求:
body = {
"whoCanPostMessage": "ALL_MEMBERS_CAN_POST",
"whoCanViewMembership": "ALL_MEMBERS_CAN_VIEW"
}
response = requests.put(
"https://www.googleapis.com/groups/v1/groups/%s" % group_id,
data=json.dumps(body),
headers={
'Content-type': 'application/json; charset=UTF-8',
'Authorization': 'Bearer %s' % access_token
}
)
但服务器响应:
<Response [500]> Internal Server Error
headers:
Cache-Control: private, max-age=0
Content-Encoding: gzip
Content-Length: 122
Content-Type: application/json; charset=UTF-8
Date: Fri, 05 Feb 2016 18:36:53 GMT
Expires: Fri, 05 Feb 2016 18:36:53 GMT
Server: GSE
Vary: Origin, X-Origin
content:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendError",
"message": "Backend Error"
}
],
"code": 500,
"message": "Backend Error"
}
}
当我在组设置API参考中使用Try It!时出现同样的错误。
您的域中是否启用了 Google Groups for business?
我发现 UniqueGroupID
字段应该设置为群组电子邮件地址而不是群组 ID。现在可以使用了。
我想通过网络 API 请求更新群组设置。提供了所有必要的授权范围并启用了组设置。我发送一个看跌请求:
body = {
"whoCanPostMessage": "ALL_MEMBERS_CAN_POST",
"whoCanViewMembership": "ALL_MEMBERS_CAN_VIEW"
}
response = requests.put(
"https://www.googleapis.com/groups/v1/groups/%s" % group_id,
data=json.dumps(body),
headers={
'Content-type': 'application/json; charset=UTF-8',
'Authorization': 'Bearer %s' % access_token
}
)
但服务器响应:
<Response [500]> Internal Server Error
headers:
Cache-Control: private, max-age=0
Content-Encoding: gzip
Content-Length: 122
Content-Type: application/json; charset=UTF-8
Date: Fri, 05 Feb 2016 18:36:53 GMT
Expires: Fri, 05 Feb 2016 18:36:53 GMT
Server: GSE
Vary: Origin, X-Origin
content:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendError",
"message": "Backend Error"
}
],
"code": 500,
"message": "Backend Error"
}
}
当我在组设置API参考中使用Try It!时出现同样的错误。
您的域中是否启用了 Google Groups for business?
我发现 UniqueGroupID
字段应该设置为群组电子邮件地址而不是群组 ID。现在可以使用了。