2

We have been creating shared contacts (external contacts) in Google Workspace using the google contact apis for years. The contact apis are going to be discontinued on June 15, 2021. What libraries can we now use in dotnet?

We tried the People api with code similar to this:

PeopleResource.CreateContactRequest request = new PeopleResource.CreateContactRequest(_peopleService,contact);
Person createdContact = request.Execute();

However, it's creating a contact in the user contact list, not a domain contact. By domain contact, I mean : Shared Contact, External contact, Directory contact, a contact stored in the global company directory.

I'm not finding anything existing in dotnet C#. What should I use?

CloudAnywhere
  • 669
  • 1
  • 11
  • 27
  • This doesn't feel like it's really a .NET libraries question - it's an API question. Does the documentation around the deprecation indicate a new API that should be used? (While I maintain the .NET client libraries for Google APIs, I don't know the details of every API, and this isn't one I have experience with.) – Jon Skeet Jun 03 '21 at 10:45
  • It is. We are developping Google products since 10 years in C# and we have never made a single native rest api call. We have always used dotnet libraries provided by Google. – CloudAnywhere Jun 03 '21 at 11:05
  • Google documents this: https://developers.google.com/admin-sdk/domain-shared-contacts?csw=1 But will it be deprecated/shutdown next week ? ( because it looks like a "contact" api" under scope of deprecation. – CloudAnywhere Jun 03 '21 at 11:07
  • I'm glad you've been able to use the libraries, but the point is that if you can work out the new API you're meant to use, there should be a library for it already - so the underlying question *isn't* about the .NET libraries, it's about which API replaces the one being deprecated. (Someone familiar with the APIs in question but never having used .NET would be able to provide that information without knowing the .NET libraries.) Unfortunately the page you referred to doesn't talk about the deprecation at all - I'd expect that deprecation documentation to talk about the alternatives. – Jon Skeet Jun 03 '21 at 11:11
  • Same question posted here: https://stackoverflow.com/questions/56436046/create-domain-shared-contact-in-gsuite-using-contacts-api-in-c-sharp And the solution was to use the Apis... that are deprecated next week. I'm unable to find how to create shared contacts now. And if this method works ( developers.google.com/admin-sdk/domain-shared-contacts?csw=1 ), it's brutal ! Have to convert the contact to atom, I believe it will take me days to manage to do that. I can't believe that we'll have to play with Atom structrues. There must be a productive solution somewhere – CloudAnywhere Jun 03 '21 at 11:20
  • I've now found [this migration guide](https://developers.google.com/people/contacts-api-migration). It does sound like the People API is the way forward, so you shouldn't need a different library - but you may well need API-specific help for how to create a Domain contact with the People API. [This announcement page](https://developers.google.com/contacts/v3/announcement) states: "Please note that the Domain Shared Contacts API is not affected by these changes." - so perhaps you *can* use the contacts API after all for your needs? – Jon Skeet Jun 03 '21 at 11:23
  • Again, none of this is specific to the C# library you're using. Anyone using a different language would face the same dilemma as far as I can see. I would suggest either asking a language-neutral question about this, or following one of the [other support routes](https://developers.google.com/people/support). Once you know the API (and specific calls) you need to use, if you still need help working out which .NET library and methods to use, *that* I'd be able to help you with. – Jon Skeet Jun 03 '21 at 11:25
  • Note that the "same question" was posted back in 2019, so it's not unreasonable that no-one knew then that the API would be deprecated two years later... – Jon Skeet Jun 03 '21 at 11:26
  • "Please note that the Domain Shared Contacts API is not affected by these changes."' Interesting thank you. We will urgently :-) rollback to the code we have been using in the past and cross our finger that it will still work in 2 weeks. – CloudAnywhere Jun 03 '21 at 11:28
  • If you have a Google Cloud Support Contract, I'd suggest getting in touch with a support expert that way, too, so you don't have to cross your fingers – Jon Skeet Jun 03 '21 at 11:29
  • @CloudAnywhere Can you share which library/method you're using to create Shared/External contacts in the directory? We're standing this up as part of a new project, and I already have user contact management sorted out using the .NET library for the People API, but I can't find the right library to manage external directory contacts. – Steve Oct 06 '21 at 18:39
  • 1
    still using the old google contact api. They are not deprecated for shared contacts. Their doc and deprecated statement was quite unclear – CloudAnywhere Oct 11 '21 at 08:53
  • This is the sample of implementation https://stackoverflow.com/questions/56436046/create-domain-shared-contact-in-gsuite-using-contacts-api-in-c-sharp – Alexander Trofimov Apr 19 '22 at 11:00

0 Answers0