Cannot update photos with Google People API - google-api

https://developers.google.com/people/api/rest/v1/people/updateContact
Here's the wiki on update contact using People API. The update works for fields like 'emailAddresses'. But 'coverPhotos' or 'photos' are not listed as valid value for 'updatePersonFields' and I get return code 400 if I try to update them.
Is changing photos of a contact supported by this API? Or is there any other API that does this job?

Currently you cannot update photos, there will be support for updating photos coming in the future. For now you'll need to use the old Contacts API to update photos.
The cover photo is only supported for profiles (it's the big background image in G+), so there isn't any way to set a cover photo on a contact.

Since Mid July 2019 it is FINALLY possible to update the contact photo with the people api: https://developers.google.com/people/api/rest/v1/people/updateContactPhoto

people/10244712xxxxx1564465" is not a valid contact person resource. -
maybe you already deleted this contact, and created new?

Related

Google people.searchDirectoryPeople doesn't return peoples photos

I'm trying to use people.searchDirectoryPeople API to get photos from people in my organization. According to the documentation, I should have the https://www.googleapis.com/auth/directory.readonly access token, which I have provided. But results are missing the photos array ( according to the documentation there should be a photos array for each one of the results). I've set the mask to photos. If I set it to emailAddresses,photos It will return the emailAddresses array but not the photos. I can't find what I'm missing here, is there any specific scope that I should add or some other parameter.
P.S: I've added the https://www.googleapis.com/auth/userinfo.profile scope too, but no luck. Any idea where I should continue looking/investigating?
Thanks!
I've managed to find the root of the problem.
When I added a new user to my account, I added their images from the Google Amin page, but that seems to be the issue. Those photos are not shown when using the People API. When I logged in to the newly created account and changed the profile photo from there, it started showing in the results from API. Maybe it's but if you go back to Google Admin and change it again, it will stop showing again.
Looks like it's a bug in the Google Admin page or it is intended behavior but not mentioned in the documentation.
I've reported an issue: https://issuetracker.google.com/issues/228791251

Creating contact folders with Outlook REST API?

Is it possible to create contact folders with Outlook REST API? I've looked into the docs for Outlook Contacts API and found only references to fetching existing contact folders (even in the beta version).
Other questions seem to focus on using C# and probably some specific SDK for that. I'm using Python, so that wouldn't work for me. I haven't found, both on StackOverflow and through Google in general, any definitive answers to this question. From the lack of any mentions in the docs, I'd assume it's not possible, but just wanted to get a definitive and/or official answer on that matter, if possible. Also please let me know if I missed something during my research.
Thanks!
There is a create folder operation, although it seems specific to Mail folders and doesn't take any parameters that can specify a folder type. It's possible it may take on the same item type as the parent folder, but I'm not certain.
Otherwise there is a create method specific for Contact folders in the Graph API; see https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/contactfolder_post_childfolders.
If you want a Python specific SDK, see: https://github.com/microsoftgraph/msgraph-sdk-python. Code samples: https://github.com/search?q=python+sample+user:microsoftgraph&type=Repositories
FYI, you can use any code platform to work with the Office 365 or Graph APIs, as long as they support REST.
After reading #Eric Legault's answer it gave me an insight to try something blindly. Even though the docs do not state it, you can create a folder by doing a POST to the contact folders endpoint with DisplayName property in the body.
So do
POST https://outlook.office.com/api/<version>/me/contactfolders with {"DisplayName": "folder_name"} in the request's body and it will work, returning the usual 201 Created response code.
This worked for me in both v2.0 and beta endpoints.
As of this writing, Outlook Contacts' UI (self-entitled Outlook People) is terrible and not user-friendly at all (either that or I just suck at understanding it), so I actually don't know how to create or delete contact folders through it, but I'm glad the REST API does the job :)

Is it possible to add "Other calendar by URL" in google calendar API?

I have been unable to find help on Google Calendar APIreference. I am looking for a resource which makes the same things like option in user interface "Add by URL"( see below).
Is it possible to add other calendars by URL through Google Calendar API?
I dont think this is supported yet. You can read below the "Add by URL" that this is for iCals.
With respect to DalmTo's suggestion, I tried placing an iCal URL as "id" in the POST request in
CalendarList.insert. It didn't work.
I got an error saying:
"code": 404,
"message": "Not Found"
But, when I added it manually using the Add by URL field, it was inserted.
This only means that CalendarList.insert doesn't accept iCal URLs. I also checked the CalendarList resource and no mention of iCal URLs were present.
Add by URL is not very good functionality.
We tried that and there are 2 main reasons why not to use it:
1. Users won't use it. They just don't understand it as it is too complicated. I understand you are looking solution for that - fine and good luck;
2. Google doesn't like it. For MANY years already Google is keeping artiicial time-lag between your ical source and Google Calendar. Approximately 6 hours. Meaning - if you update event in your application the update will be visible in Google Calendar after around 2-6 hours.
Maybe, just maybe, if you find Server-toServer solution for this, it is fixed but adding ical link is a waste.

How to add user-data in JOOMLA?

i wannt to build a website with user management. User should be able to loggin with different accounts, f.e. GMail, Facebook, .....
When the user is logged in he/she can upload pictures with geolocation data and some text.
All uploaded geolocations should be visualized on something like google-maps.
Unregisterd users can view the map, but can not change the data or upload anything.
To solve this requirement i decided to use JOOMLA 2.5. with the "plugin_googlemap_J25_J3x.v3.2" plugin.
Everything i know about JOOMLA is what i learned the last two days.So i am very new to it.
Currently i am stuck, because i do not know how to save the user-data (pictures with geolocation data and some text) in JOOMLA.
I asked google! For more than an hour now! Could not find anything, related to that topic!
So my concrete questions are:
I suppose it is not possible to extend the JOOMLA user data database with the user-data, or?
If this is not possible, than i need a second database which holds the user-data, or?
Does anyone knows a tutorial which solves this problem?
I found someting for wordpress "http://codecanyon.net/item/privatecontent-user-data-addon/2399731"
but i have to check if this solves my requirements.
Thanks
Try this,
First make a list of your requirement then go to JED(Joomla extension Directory). search for related extensions.
Here from your requirement ,
You need a Customized Joomla Registration form
Social Media logins
And so on, so check the details of requirement and extension available, In any way you may need some customization on the Application then you can create some plugins for Users events.
Hope it helps..

Is it possible to generate notifications when new docs are uploaded to Google Docs?

I have shared a Google Docs folder with our remote team and a few members of my team. Is it possible to send out emails to all collaborators/viewers when a document is uploaded or edited in the folder?
Otherwise it becomes difficult to keep track of whether anything was changed or not.
Thanks.
Yes! Check out the Google Documents List Data API. Basically, you post a signed request to the API requesting specific documents or a list of documents overall and Google responds with an Atom feed of the documents that you're looking for. Among the tags is <updated>, which contains the timestamp of the last modification. If you keep a local listing of files handy, you can compare to see if any revisions were made.
Also interesting in the feed is <published>, which describes when a doc was created. If you know the last time you checked for updates, any docs published after that time can be considered newly created.
I'm not going to get into code (doesn't sound like what you're asking for), but this should get you on the right track. Hope it helps!
Yes and no.
Google Docs is not a consistent set of tools, so notifications are supported but only partially.
Google Spreadsheet has a set notification rules in the Tools menu
Google Form is linked to spreadsheet so they're covered too
You would have to do something yourself for Document/Word and Presentation apps
I would suggest reading the document from web and checking if the checksum was changed

Resources