google-apigdatagoogle-admin-sdkgoogle-api-dotnet-clientgoogle-email-settings-api

The Google Admin SDK Email Settings API is not listed in the APIs Discovery Service


In working with the .NET client library we found that the Email Settings API was not available in it or any of the other client libraries. After communicating with the developers of the .NET library on how the library is generated we noticed that the Email Settings API is not listed in the API discovery service as part of the Admin SDK. The .NET client library relies on the discovery document as does the PHP client. Both the Directory API and the Reports API are.

I noticed that in the documentation for the Email Settings API that calls are still made to apps-apis.google.com:

https://apps-apis.google.com/a/feeds/emailsettings/2.0/

rather than to www.googleapis.com like the other Admin SDK APIs do:

https://www.googleapis.com/admin/directory/v1/
https://www.googleapis.com/groups/v1/groups/
https://www.googleapis.com/admin/reports/

I'm guessing that this is the underlying reason for why this particular API is not included. Is there a timetable for getting the Email Settings API moved to the googleapis service?


Solution

  • There are two types of Google APIs. Gdata APIs and discovery APIs.

    The Gdata APIs are old APIs a lot of them have actually been shut down. The client libraries for them to my knowledge where not auto generated.

    if you check the documentation for the email settings api there is some sample code for .net.

    using Google.GData.Apps.GoogleMailSettings;

    The key here is that its a Gdata, its a Gdata api. Which means that like you said its not supported by the current Google .net client library which only supports discovery APIs.

    After doing some searching in the code for the Gdata client library. Yes it exists but it hasn't been developed on in ages. There is some code in there for Google email settings There should be a nuget package for it but I have not been able to find it.

    The only thing that i have cound that might lead us to the corect nuget package is this

    Install-Package Google.GData.Apps

    I don't have an admin account so I cant help you test it. However I can probably give you some hints on getting it working. You should be able to track me down from my stack profile if you need help or just post another question on stack. I should spot it.