Can't seem to find questions that address this directly but does anyone know why the endpoint https://developers.google.com/gmail/api/reference/rest/v1/users.settings.sendAs/list does not list the default displayName when an alias is NOT set up?
{
"sendAs": [
{
"sendAsEmail": "foo@gmail.com",
"displayName": "",
"replyToAddress": "",
"signature": "",
"isPrimary": true,
"isDefault": true
}
]
}
From my testing, it looks like if you create an alternate display name using the steps listed here https://support.google.com/mail/answer/8158?hl=en, the response will show up as
{
"sendAs": [
{
"sendAsEmail": "foo@gmail.com",
"displayName": "New Alternate Name",
"replyToAddress": "",
"signature": "",
"isPrimary": true,
"isDefault": true
}
]
}
And if you add another email address to alias, you get
{
"sendAs": [
{
"sendAsEmail": "foo@gmail.com",
"displayName": "New Alternate Name",
"replyToAddress": "",
"signature": "",
"isPrimary": true,
"isDefault": true
},
{
"sendAsEmail": "foo2@gmail.com",
"displayName": "Foo 2 Name",
"replyToAddress": "",
"signature": "",
"treatAsAlias": true,
"verificationStatus": "accepted",
"isDefault": false
}
]
}
But if you revert your main email's displayname to the original default, you get
{
"sendAs": [
{
"sendAsEmail": "foo@gmail.com",
"displayName": "",
"replyToAddress": "",
"signature": "",
"isPrimary": true,
"isDefault": true
},
{
"sendAsEmail": "foo2@gmail.com",
"displayName": "Foo 2 Name",
"replyToAddress": "",
"signature": "",
"treatAsAlias": true,
"verificationStatus": "accepted",
"isDefault": false
}
]
}
Was running into issues locally with Java but testing it on the "Try this API" features creates the same results so I am thinking this is WAD and I might need to be using something else.