ruby - Fetching employee signatures using Oauth2 without asking the user -
i administer google apps account. need retrieve email signatures employees in our domain in order display them in application we're working on. need programmatically on our servers, without interaction our employees.
our codebase in ruby. i've gotten working using clientlogin ("google.com/accounts/clientlogin") our google apps administrator email address , password , parsing out token response , using make call "https://apps-apis.google.com/a/feeds/emailsettings/2.0/#{domain}/#{username}/signature".
however, modern, non-deprecated way, read means using oauth2. problem i'm having can't find guide states how this. i've read python examples , code, have manual step enter url in browser , click button. also, aren't using python, it's not entirely straight forward port these examples on in first place because assume you're using other python libraries.
is there clear explanation somewhere of how obtain authentication token google apps administrator using new authentication mechanism , using token submit request "https://apps-apis.google.com/a/feeds/emailsettings/2.0/#{domain}/#{username}/signature" retrieve user's signature?
it helpful if explanation language agnostic (using straight http calls), if absolutely port of code language that.
michael,
the email settings api deprecated hence suggest move gmail api. there method can retrieve user signature , can check reference here https://developers.google.com/gmail/api/v1/reference/users/settings/sendas/get
in regards getting user's signature without interaction employees, need use service account impersonate user , information. can refer document information on how proceed https://developers.google.com/api-client-library/ruby/auth/service-accounts.
hope helps!
Comments
Post a Comment