Getting 'missing Required Field: Member' When Trying To Add A Member To A Google Group Via Api
Trying to use Google admin directory API in order to read members of a google group (organization) - it works fine. When I try to add a member I get: { errors: [ { domain: 'glo
Solution 1:
Since google APIs use (only?) JSON encoding, your post data is not being parsed into the needed member object. You are already loading json for the response, so you should just need to change the encoding, and optionally indicate it explicitly:
if payload:
(resp, content) = http.request(uri=url, method=method, body=urlencode(payload))
# becomes: if payload:
(resp, content) = http.request(uri=url, method=method, body=json.dumps(payload), headers={'Content-type':'application/json'})
Post a Comment for "Getting 'missing Required Field: Member' When Trying To Add A Member To A Google Group Via Api"