Activities API call not returning correct results - youtube-data-api

The below api call used to return a feed of results that would have been on my homepage.
https://content.googleapis.com/youtube/v3/activities?home=true&maxResults=50&part=id%2Csnippet%2CcontentDetails&key=AIzaSyC0wL6aecu2rxiTNtW8uvtnb1kx9Kdlb4s
In the past day or so the feed I get has changed to be only videos from some channel called "Popular on YouTube".
Does anyone know why this API call changed? Is it a bug? Is there a different way to get an authenticated user's activity feed?

It turns out the home parameter for the activities api endpoint has been deprecated.
https://developers.google.com/youtube/v3/docs/activities/list

Sounds like you must have been using a shared API key.
Either case, "Popular on Youtube" is a Youtube channel by Youtube. Something has broken functionality and I believe it is referrer issue. With that, I suggest getting a new API Key.
You can learn more about and getting a free personal API Key, if you haven't done so. https://developers.google.com/youtube/v3/docs/errors

Related

How to find messages in google spaces using chat.api

I want to be able to pull all text messages from a google chat space.
I'm looking at the spaces.messages.getbut it assumes you have the ID of a message. In similar programs (MS Teams), you can call an endpoint to list all message ID and then call the message API to extract the contents of an ID. However, google chat has no such API.
Has anyone come across a way to do this?
This is currently not possible
There is already a respective feature request on Google Issue's Tracker.
I recomment you to star it to increase visibility and hope that it will be implemented soon.

Youtube private access management via API or library

I have a situation where I need to invite users to to be able to watch a private playlist on videos on Youtube.
I have found information about this at: Add or remove access to your YouTube channel
However that uses the user interface (Youtube page) and I'm looking for doing it in a programmatic way.
The best I found about managing channels is this: Implementation: Channels however there is nothing about invites and access removing.
Is there a way to invite users and and remove a user's permission using the YouTube API or a library?
Thanks.
No there is no way to add or remove permissions on channels though the YouTube Data api.
You might want to check though the issue log and see if anyone has already submitted a feature request for this. YouTube Issue forum.

Why does Google+ API method people.me still work?

My web-app is using Google+ API method called people.me. I was notified via E-Mail that this Api is going to shutdown on March 7. I was given a list of methods used by me in that Api and this was the only method in the list.
Today it's March 11 and the method keeps working correctly. Why? Maybe I understood something wrongly?
If you check the top of a lot of the methods in the Google+ documentation you will see this
The Google+ People API list endpoint is deprecated. Consider using the Google People API instead.
On some of the methods that does not appear. IMO that is because some of these endpoints never actual read from the Google+ api rather they were reading from the google people api all along and just got a plus in the name. They may at some point have read from it and were moved when they redid google contacts. The people.me endpoint is part of the google people api and not the google plus api
People.get
GET https://www.googleapis.com/plus/v1/people/userId
is the same as
people.get
GET https://people.googleapis.com/v1/{resourceName=people/*}
The data for both of those end points comes from google contacts.
Now again this is just my opinion i have emailed google several times and the only answer i got back is we will look into it. I would wait until April if they are still live i guess we are good.

Trying to get Google Plus comments for an activity

I've been trying to use the Google Plus API (how they managed to make this difficult is beyond me), and I'm trying to get all of a user's comments (or at least the most recent ones).
Unfortunately, Google has decided to make this inaccessible through one call, so I've been trying to access all of a user's activities, and the list of comments for each. To do this, I've been using the google_plus gem.
I can pull up a user, no problem. However, for each user I pull up, their activities seem to be nil. Moreover, if I try to fetch an activity by id, that also returns nil. For example, I've tried to hit this activity using an id of 107200121064812799857, but I get nothing.
I've even tried using Google's API testing tool to try to hit this activity (using the aforementioned ID), and it can't even seem to find it.
Can someone explain what's going on here? Maybe I'm not using the right ID, or something.
I've even tried using Google's API testing tool to try to hit this activity (using the aforementioned ID)
The comments.list API requires an activity id, but you're passing the Google+ profile id.
You will need to pass a valid activity id when using the comments.list api.
For this post on Google+: https://plus.google.com/107200121064812799857/posts/GkyGQPLi6KD
The user id is: 107200121064812799857
The activity id (used by the API) is: z13qd5zouuebcpauy23tuftwdsylxflvs
Here's how you can list comments for that activity id:
https://developers.google.com/apis-explorer/#p/plus/v1/plus.comments.list?activityId=z13qd5zouuebcpauy23tuftwdsylxflvs&alt=json

How can I log into gmail in a script/program using HTTPS?

My teacher has given me as an assignment to log into gmail and then send one e-mail or read the list of unread e-mails, but I can't use IMAP/POP3/SMTP or anything that isn't HTTP or HTTPS. I've tried looking for libraries in Ruby/Java to do it but nothing really worked for me.
I tried looking at the gmail source code page but I couldn't really understand what was going on. The page seems to call a post method on a link, but sniffing the packets what I saw was a GET apparently using a session generated using the info I send. So sending it "raw" didn't work either.
I've no idea what to do now.
After you authenticate with OAuth, you can get unread emails via an atom feed.
URL to hit: https://mail.google.com/mail/feed/atom/[<label>]
You can toy around with this at the Google oauth playground. Get an access token by continually clicking buttons and authenticating, and then hit discover feeds.
If you want a Java OAuth library, signpost is really good. You'll need to read the google documentation on its open authentication scheme. Specifically, you need to pass a scope query parameter when you attempt to authenticate. This is nonstandard, and it will trick you up if you're not looking for it.
If you're confused about OAuth or why its necessary, you may want to check out this resource.
Check out httplib2—it has (among other things) Google Account Authentication.

Resources