0

I cannot figure out how to create (make it visible for all) External Contact in Google Workspace Directory using Domain Shared Contacts API. The idea is to create an external contact (directory-wide) and make contacts visible to everyone. So, it means do not put a contact for each user but create it instead in the Google Directory.

I found documentation: https://developers.google.com/admin-sdk/domain-shared-contacts/overview#Creating

Trying to use it to create a contact. The result is:

  1. I can get token
  2. I can push XML to the endpoint: https://www.google.com/m8/feeds/contacts/my.domain/full
post_url = 'https://www.google.com/m8/feeds/contacts/my.domain/full'
post_headers = {
    'Content-Type': 'application/atom+xml',
    'Authorization': 'Bearer ' + token,
    'GData-Version': '3.0'
    }
post_response = requests.post(url=post_url,headers=post_headers,data=post_contact_card_v2)
print(post_response)
print(post_response.text)

No issues with all of the above. I can also use the 'GET' request to get created contacts and see them there.

When I log in to gmail.com with the organization user (any user), I can't see created contact anywhere. Actually, when I type the contact name in the search box, Google gives me such a result (and I can open the contact card), but I cannot see those created external contacts in the contact manager (in the Directory list). So it means autocomplete works and sees external contacts, but the contact manager does not display it anywhere.

Perhaps I'm missing anything and anyone can lead me to the correct way of doing this?

1
  • How did you get a token? Commented Sep 14, 2023 at 12:08

1 Answer 1

1

You most likely just need to enable showing domain-shared contacts under Google Workspace Directory settings.

https://support.google.com/a/answer/60218?hl=en

Google Workspace Directory Seetings

Not the answer you're looking for? Browse other questions tagged or ask your own question.