Setting the SendAs via python gmail api returns "Custom display name disallowed"
<p>I can't find any results when searching Google for this response. </p>

<p>I'm using the current Google Python API Client to make requests against the Gmail API. I can successfully insert a label, I can successfully retrieve a user's SendAs settings, but I cannot update, patch, or create a SendAS without receiving this error.</p>

<p>Here's a brief snippit of my code:
<code>
    sendAsResource = {"sendAsEmail": "existingalias@test.com",
        "isDefault": True,
        "replyToAddress": "existingalias@test.com",
        "displayName": "Test Sendas",
        "isPrimary": False,
        "treatAsAlias": False
        }
    self.service.users().settings().sendAs().create(userId = "me", body=sendAsResource).execute()
</code></p>

<p>The response I get is:</p>

<p><code>&lt;HttpError 400 when requesting https://www.googleapis.com/gmail/v1/users/me/settings/sendAs?alt=json returned "Custom display name disallowed"&gt;</code></p>

<p>I've tried <code>userId="me"</code> as well as the user i'm authenticated with, both result in this error. I am using a service account with domain wide delegation. Since adding a label works fine, I'm confused why this doesn't.</p>

<p>All pip modules are up to date as of this morning (google-api-python-client==1.5.3)</p>

<p>Edit: After hours of testing I decided to try on another user and this worked fine. There is something unique about my initial test account.</p>

<p>This was a bug in the Gmail API.  It is fixed now.</p>

python gmail-api google-api-python-client