Reputation: 9
So I am new to using Google API's. My need is to read a user's account status in the company's domain via a Service Account. Am using the Admin SDK i.e .Directory API's for this. Due to organization's network and security policies, the call has to be made via a proxy server. I cannot find any help on calling a Google API while using a Service account and via a proxy server. I did find help on Calendar service, or Youtube etc via proxy, but none on the DirectoryService. Could someone please help?
Upvotes: 0
Views: 788
Reputation: 9
Okay so I got this resolve. I was probably not very clear in my question above, what I was looking for was google .NET client libraries like the GDataFactory(but for Directory Service) that has options to feed a proxy. But apparently I could not find anything. So I used the regular HTTP Client and JWT to access the libraries.
The article here was very helpful. https://zavitax.wordpress.com/2012/12/17/logging-in-with-google-service-account-in-c-jwt/
And one more thing, my organization has an admin account for the managed domain, had to set "sub" to the admin account email address in the JWT claim set to access the Directory API's.
Upvotes: 0
Reputation: 253
Of course that you are not viewing such options. That kind of options are not related to the APIs but to the HTTP client.
For example, in Python:
apiclient.discovery.build(serviceName, version, http)
That http object is built with the proxy info and makes the requests accordingly.
Upvotes: 1