Status code 412 using member.insert endpoint of Directory API

Hello,

I'm using the member.insert endpoint without any specific headers and receiving status code 412 with the following response

{
    "error": {
        "code": 412,
        "message": "Condition not met",
        "errors": [
            {
                "message": "Condition not met",
                "domain": "global",
                "reason": "conditionNotMet",
                "location": "If-Match",
                "locationType": "header"
            }
        ]
    }
}

The request URL is the following https://admin.googleapis.com/admin/directory/v1/groups/{groupKey}/members

And my request payload is

{
    "kind": "admin#directory#member",
    "email": "local-part@domain.com.br",
    "role": "MEMBER",
    "type": "USER"
}

I already tried suspend and reactivate the user account, include the "If-Match" header with values "*" and the group's current ETag, without "If-Match" header, but not seems to work.

Can anyone help me?

0 0 271
0 REPLIES 0
Top Solution Authors