ListDirectoryPeople not showing names for most contacts? - google-apis-explorer

When I navigate over to contacts.google.com then to 'Directory' tab. I see all emails and fullnames of people from my Gsuite organization. However, when I used this api: https://developers.google.com/people/api/rest/v1/people/listDirectoryPeople It can only show things like email addresses, but not name. Is this a bug or did I miss something? Let me know if the question is vague or I need to provide more details.

Related

google hangout chat can bots message bots?

I have a use scenario where I'm testing a bot in google hangout. To facilitate testing of multiple users, I'd like to create a series of other bots that replicate the functions of users. But this is all dependent on the bots in the room listening to one another. It also requires that I get the userid of the bots so they can name each other. In Google Scripts I can find no way to retrieve that (the rest API is not an option).
Any suggestions?
The information is documented, but I understand GCP docs aren't the easiest to navigate. According to the Event Format reference: "Only messages from "real", non-bot users are delivered to bots. A bot will never receive messages posted by itself or by a different bot."
So the answer to the question appears to be no. Bots do not appear to be able to talk to each other. When you put the userid in the text property of the bot it does not replace it to an #botname as it does with human users. If anyone can figure out another way to do it I would appreciate it.
But the second question of where to get the bots userid I can now answer and I leave here in case anyone else is curious. This appears only in a message event, when a bot is mentioned as the property event.message.annotations[0].userMention.user.name

Google Places ownership verification

I'm trying to verify the user's ownership of a Google place, restaurant and bars for now.
I checked this similar question, but it's unanswered.
Basically, the app I'm creating needs the place owners to post on behalf of the place. I want to verify the association of the person posting and the place so that regular users can't post junk. Is there a Google way of doing it ? If not, what other methods do you think is possible? Thanks in advance.

geteditors not returning emails the ui decides is a group

So you create a document in drive, then share it. You share it to someone inside google's network, the email address gets an icon of a single dude. But if you share it with someone outside of googles network, you get an icon of multiple dudes. At least you do when you share it with security set to anyone with the link can get in. Im not sure if this works in the other modes.
but anyways, you now write an app script that wants to send an email to everyone the file is shared with. so you use DocsList to get the file, then call the getEditors method to get the list of people that the file is shared with. The problem is it looks like that method only returns the email addresses with the icon of the single dude. How do I get the other email addresses?
If that can't happen, how do I tell Drive that the external email address I'm adding is in fact a person and not a group?
I think that happened because you shared to someone that do not have a google account.
In order to see the document with an identified ID they must have a google account (that do not mean a google email adress) You can create an account associated to your email adress here
for the second part of the question you can refer to that previous question here

Name field not being returned for a contact

When I go to pull the full name on a certain contact (getFullName()) my script doesn't return any thing. However, when I make a change to the name from within the Gmail Contacts interface, it then returns the name. If I undo the change, I don't get the name.
Any reasons to this? The contact is another account of mine that's tied to my G+ account.
This is a very interesting find. I was able to reproduce this with some of my contacts as well. It must have something to do with the where these contacts were imported from or how they were manually created.
However, I dug a bit deeper and I do not believe this is an Apps Script issue, but a Google Apps Contact API issue. I found this same issue directly interaction with the Google Contacts API documented here -
https://developers.google.com/google-apps/contacts/v3/
This might be the same issue tracked in their issue tracker as #3171.
Bit more of the technical details of what I tried to confirm this -
a. Go to the oAuth playground at - https://developers.google.com/oauthplayground
and authorize manually for the scope of https://www.google.com/m8/feeds.
Once you click authorize, the tool will make your login and then authorize the playground tool to read your contacts.
b. Now, click the "Exchange Authorization Tokens" button to grab the final token for further REST calls.
c. Set the Request URI to https://www.google.com/m8/feeds/contacts/default/full and hit "Send the Request". You should get the XML dump on the right. Copy and view it in your favorite XML editor and you should see the same behavior you are describing above where Fullname only returns after an edit. You can narrow this down to invididual contacts (and stare at smaller XML files) by passing in a contact ID in the URL format of https://www.google.com/m8/feeds/contacts/default/full/{contactId}

How to automatically respond to an e-mail

I would like to automatically respond to an e-mail with some information. The idea is to provide a self-service way for students to get grades and passwords. I see sample scripts that work on e-mails, but I need to:
look for a keyword in the subject to understand what type of information to provide (i.e., grade, password, etc.)
look at the e-mail of the inbound e-mail to identify the student (optionally locate a password)
look up the information (possibly in a spreadsheet)
create an e-mail and send it to the student
I am more familiar with using scripts with e-mail and spreadsheets, but I would prefer to create this on a Google Sites page or embed it in a wiki.
Thanks in advance for the help,
JDF
I am not sure how much detail you were looking for, or if you where looking for example code, but here are some high level things to think about.
First, if you are going to embed the code into a webpage that you want be able to access all your other Google things easaly. eg if i stored all the student names passwords and student numbers in an spreadsheet or database you have to set up permission to do so. Your website does not count as you "persay" because if you had it shared out then someone could potentally steal all your google stuff.
Take a good look through the Google appi google apps script. You can search your email by thread (subeject) and then go through the emails like that. I think all the function that you want are there.