Google Apps Email Settings API - Signature Settings - google-api

I am somewhat new to code, and even more so to the Google Apps API. In the organization I work with, I have so far managed to write a couple of console apps that we run to apply signatures, and manage mailbox delegates as needed.
In regards to the Email Settings API, specifically the signatures portion, is there a way to check this box:
"Insert this signature before quoted text in replies and remove the "--" line that precedes it."
via the Email Settings API? I've looked through the API documentation, and even the .NET api reference docs, with no avail. Any advice will be helpful.

This feature was available while it was a lab (through the admin console, not API), but not anymore now that it has 'graduated'.
It has now been submitted as an official feature request. Hopefully more people request it.
I was told that setting the footer through the API does show up before quoted text, so if that is true, and all you need is a footer for everyone in organization, you might be in luck.

Related

How can I let others read and edit a google sheet (not shared with them) using googleapi, without them having to download credential?

I am a beginner trying out api for fun.
The problem is, lets say, I want to write a simple windows program with golang to let my friends read and edit one of the sheets saved on my google drive. How can I do this without having them download a credential file?
What I want it to do is simply redirect them to the Oauth Page right away, and if their email address is one recognized by the app it will grant them access to that google sheet.
What i think you need is to integrate your go app with Oauth protocol.
More specifically, with the Google provider.
This is mainly 3 steps:
add the oauth client to your application
something like this: https://github.com/golang/oauth2
See their docs on how to do it.
go to google dev documentation and see how to integrate google auth flow into the client: https://developers.google.com/identity/protocols/OAuth2
I'm not sure if google has something more specific for google drive integration and/or go-lang client in particular. Please do some searching.
make the glue code on your go app so that the user can interact with this (the login button (or command, if it is terminal based), error messages, logout, etc)
More questions will appear when you start to do this, however it is a great example to learn Oauth as well.
General guidelines:
https all the queries or oauth is basically useless
oatuh has many auth-flows and you must choose which one(s) you support. use whatever google documentation recommends for m2m scenario (machine 2 machine)
log errors so that your friends can send you a log file for you to debug issues
maybe set some feature flag so that you can simply disable this feature to run/test localhost ? maybe useful? you decide.

Google Dialogflow API v2 Explorer access_token field

Please forgive me, I am fairly new to the Dialogflow Api (v2.)
I am starting off with testing these API calls using the Google API Explorer utility on the right side of the page.
My question is specifically about the "access_token" field:
Is this supposed to be the JSON authentication file that I downloaded from the Google Cloud Console when I created a new service account?
If not, then where do I find the specific resource I am actually supposed to pass into this field?
Side note: I read in the support section: "Google engineers monitor and answer questions about the Google API Explorer on Stack Overflow using the tag google-apis-explorer." Thank you all in advance for your service/help in this topic!
The access_token field is a higher-level field used across the API by some tooling. In some manual client libraries, you might need to use it, but for the API Explorer utility and for most use-cases, you can ignore it. This is true of most (maybe all) fields under the "Show standard parameters" zippy.
The documentation on the left side should explain the relevant fields you need to fill in to successfully complete a request. Keep in mind that even some of these fields are optional; you can leave them blank if they are not relevant to your goal.

How can I access Gmail's native API?

I would like to access Gmail's native API. Eg,
create a search folder
tag messages
other gmail-specific actions.
There's this similar question, however the question asker seems happy with developing contextual gadgets rather than actually accessing a user's email.
In before anyone mentions: IMAP and POP are generic, non search based protocols and do not provide full access to gmail. Neither gmail.com, nor any of the official Gmail native apps, use IMAP and POP.
Most webmail services have private, non-IMAP/POP APIs and protocols, eg, hotmail (back when it existed used HTTPMail which was reverse engineered and implemented by hotwayd).
I could run Android gmail with a proxy and attempt to reverse engineer the Gmail protocol itself, but I suspect others have had the same need in the past and may already have a solution.
I did find a list of client of Gmail clients on Gmail Agent API but they don't seem maintained past 2004.
Android's Gmail app is using Google Cloud Messaging (GCM) to push email messages/notifications and sync with the phone. I think that’s “the API” you are looking for. The bad news is that it is obviously very well protected.
You can get started for free with GCM's JSON REST API and use it for your push messaging projects, but forget about using it for your Gmail in the same fashion Google does. The only option for getting a similar efficiency would be using IMAP's IDLE extension, which uses also push.
Focusing on what you need, I think there are decent solutions for the use cases you have listed in your question… You could use a [**Google App Script**][4] or libs like [**GMail for Python**][5], which seems a valid option to me... from the [**GMail for Python GitHub**][6]:
Features
Search emails
Read emails
Emails: label, archive, delete, mark as read/unread/spam, star
Manage labels
If you are developing an Android mobile app Gmail Public Labels API could also be of your interest...
Hope it helps...
EDIT: Google just introduced its GMAIL API
Update June 2014: Google have announced access to the native gmail API.
The Gmail API gives you flexible, RESTful access to the user's inbox,
with a natural interface to Threads, Messages, Labels, Drafts, and
History. From the modern language of your choice, your app can use the
API to add Gmail features like:
Read messages from Gmail
Send email messages
Modify the labels applied to messages and threads
Search for specific messages and threads
https://developers.google.com/gmail/api/

How can i get list of domain users from Google Apps account without administrative access?

This is a similar question to How can i get list of Domain user's from Google Apps account?
However, I'd like to use a normal account (not an administrative account) to retrieve the user list. It seems like this should be possible as the gmail autocomplete returns domain contacts not listed in the user's contact store. I've looked at the autocomplete Ajax call, but it requires something in the beginning of the string (and no, I don't really want to loop through a-z one by one - that is just way to hacky). For example:
https://mail.google.com/mail/c/u/0/data/contactstore?ac=true&ct=true&gp=true&hl=en&id=domain&max=15&out=js&tok=beginningOfUsersName&type=4
Both versions of the Google contacts API seem to omit domain users unless you have them imported into your own contacts list. I've also looked at querying users in the "Coworkers" system group, all to no avail. I also find it interesting that "add a coworker's calendar" on Google calendar does not provide autocomplete - they use a popup instead.
I'm working on a C# project, but this is a general Google API question, so any pointers in any language would help.
Update
It looks like this is feasible now with admin/directory google api endpoints
see: https://developers.google.com/admin-sdk/directory/v1/guides/manage-users?authuser=0#retrieve_users_non_admin
Original answer
I was able to work around this issue, so I'll document the workaround, even if it doesn't involve Google. I wrote a program (in C#) to query the internal Active Directory (LDAP) store and pick up all the users from there instead. At that point I could get their email addresses and query Google with it. Not the best method, but it worked for my needs.
The C# was roughly patterned from this powershell script, although I pulled out the computers query and added in the capture of the user's email address: http://www.visualbasicscript.com/List-all-users-or-computers-in-the-default-domain-m35650.aspx
The LDAP property I included to get the proper email address for Google was 'proxyAddresses', although this will not be correct for all environments.

gData API - "This feed is read-only" error when adding to Google Calendar

I'm using Google Apps for my domain, and trying to enable access to the calendar on my website.
The problem is that I get This feed is read-only error every time I try to add an event to the calendar. Here's where I post to: Link (dead link)
You're using the basic feed, which according to the documentation is always read-only. Use a feed URL ending in private/full or private/full-noattendees instead.
(Disclaimer: I work for Google, and as part of implementing the calendar side of Google Sync I've had some experience of working with the GData APIs, but anything I write here must be taken to be the views of a private individual rather than as official Google policy etc :)

Resources