What does YouTube API V3 I.1 policy restriction mean? - node.js

YouTube API v3 has reduced our key from 640,000 queries per day to 0 (!!! and actually blocked us). This happened after submitting a request to enlarge our quota. They did this without any warning. We received an email 2 days later saying we are are out of compliance with
Policy I.1 (Additional Prohibitions): https://developers.google.com/youtube/terms/developer-policies#i-additional-prohibitions
Our system allow users to organize and view YouTube videos in order to plan their event timeline, rather than copying the URL on a google doc the old way. Thus driving quality traffic to YouTube and providing value to YouTube users who can be monetized.
We are a harmless small startup that has been using YouTube API for the past 4 years. After using the API in our product for that long, and finally growing our user base, we requested a higher quota and were revoked completely without any notice.
We need help shedding light on what exactly YouTube Developer team think we are doing wrong that doesn't comply.
The reason was complying with policy I.1. Can anyone give examples of things that they did that have been revoked due to policy I.1 so we can understand why YouTube thinks we are not in compliance? How do we get more specific details so we can fix this? how can we fix something so vague?
Example of our API call (NODE.js):
const response = await axios.get('https://www.googleapis.com/youtube/v3/search', {
params: {
key: OUR_BLOCKED_KEY,
maxResults: 5,
q: searchStr,
part: 'snippet',
type: 'video',
fields: 'items(id/videoId,snippet(channelTitle,thumbnails/default/url,thumbnails/medium/url,title))'
}
});

Related

Instagram API - get like count on media

Good morning,
I'm writing my own library to improve skills for getting media from Instagram profile and showing it on my website.
I read a lot of articles, documentation, etc. but there are many old versions and endpoints. At the official API documentation, I'm unable to find, how to get like count or comment count on every single media.
So:
I can OAuth - OK
Get short-live token - OK
Get long-live token - OK
Refresh long-live token - OK
Get media list - OK
Get one media based on its ID - OK
But none of endpoints gives me like count or comment count. How can I achieve this?
https://graph.instagram.com/me/media?fields=id,caption,comments_count,like_count,media_type,media_url,thumbnail_url&access_token=
returns me:
{ data: [{ "id":"123456798", "caption":"My title", "media_type":"IMAGE", "media_url":"https://..." }, { ... }] }
I found in the documentation https://developers.facebook.com/docs/instagram-api/reference/ig-media/ that I can get the like_count field only for requests at media with their ID. So I tried EP:
https://graph.instagram.com/v15.0/123456789?fields=id,caption,media_type,media_url,thumbnail_url,like_count&access_token=
and return is: Tried accessing nonexisting field (like_count) on node type (Media).
On the instagram I've able to get likes and comments and the media has likes and comments. What I'm doing bad? Thank you for your time.

Azure Communication Service - pre create a video meeting for specified date and time and record the link

Azure Communication Service -
Is there a way we can pre create a video meeting for specified date and time and record the link so that it can be sent to the participants. and invoked at specified time
I have a solution, although it's not the best solution. It IS a solution.
MS has offered a JS option that wraps the react components.
https://github.com/Azure/communication-ui-library/tree/main/samples/StaticHtmlComposites
Directly from the sample,
const callAdapter = await callComposite.loadCallComposite({
containerId: 'video-call',
groupId: '', // Provide any GUID to join a group
displayName: displayName,
userId: user,
token: token
});
in my testing I was able to plug in any randomly generated GUID, and share a link with that guid to my co-workers who were able to join the video call.
Hope that helps lead to a better solution. I'm still trying to get this thing working friendly with MVC. I may update when I get that working.

Instagram changed policy to retrieve posts with hashtag

Instagram has changed policy since June 1st. Now my code which used to fetch posts with certain hashtag in a website stopped working.
According to this new policy, the app needs to submit for approval. But when i went through approval process, the privacy policy is a must and which should describes how this app would use data. and when i went through sample instagram policy this is huge and mostly deals with mobile app.
Now my qeustion is, do i need to write something like this when my app just needs to use client id's secret keys and general stuff just to fetch posts with certain(defined) hastag ?
I have used instafeed.js to retrieve posts by hashtag.
var feed = new Instafeed({
get: 'tagged',
tagName: "<?php echo $tagname;?>",
clientId: "<?php echo $client_id;?>",
limit: 14,
template: '<img data-attr="{{id}}" src="{{image}}" alt="{{caption}}" data-username="{{link}}" />',
});
UPDATE :
It looks like we won't be able to fetch particular hashtagged public content in our website.
Also, in the alert section As alternative solution, ..... find a company that offers this type of service (content discover, moderation, and display).
What are these company instagram talked about ?
We're in the same boat. The only one I've found so far that claims to be able to do this is called Dialog Feed. Here is their blog post about it: https://www.dialogfeed.com/instagram-api-not-working-solutions-for-hashtag-and-profile-search/
They are not cheap, however. Like 890 eur/year not cheap for just the basic.

Instagram-Node calls keep returning "access code invalid"

I recently opened a new Instagram account and registered a new client. The information I received back from Instagram included the client_id and the client_secret.
I will only run the script on my machine, and be the sole user of the project, so I don't need any user to "log in". But for some reason, whenever I try to make any calls to the Instagram-Node API, it returns the following error:
{ [Error: OAuthAccessTokenException: The access_token provided is invalid.]
code: 400,
error_type: 'OAuthAccessTokenException',
error_message: 'The access_token provided is invalid.',
retry: [Function] }
That's weird to me, because I have an identical setup with an older Instagram account and different credentials, that seem to be working just fine. Then again, that was before November, when Instagram changed some of their API policies.
I use the Instagram-Node like so:
ig.use({
client_id: "dxxxxxxxxxxxxxxxxxxxxxxx2",
client_secret: "4b0xaxaxaxaxaxaxaxaxaxaxa53c03100e4"
});
and make my first call like this:
ig.user_media_recent(user.toString(), options,...
I tried handling the authentication by rerouting my request through the redirect_uri as shown in the Instagram-Node documentation, but even then, all of my requests are unsigned, so it's not clear to me what I would do with the access_token any way.
Any help would be much appreciated!
Okay, the problem is a misunderstanding of the limits of the Sandbox Mode, they essentially make it impossible to look up media from users who are not in your sandbox.
The documentation here says:
The first point is important and it means that the API behaves as if
the only users on Instagram were your sandbox users, and the only
media ever posted were the last 20 for each of these users.
I was trying to find media from users who are not in my sandbox, and so I received an error. The reason that my previous credentials weren't affected is because they are still grandfathered into the grace period, June 2016, at which time they will expire as well. Thanks!
I ran into this same issue. If your app is using oauth, you will cause Instagram to spaz out if you pass the client_secret and client_id stuff again. I had to take these out of my code. So I just pass the access_token now.
ig.use({ access_token: token });
ig.user_media_recent(config.userid, { count: 20 }, function(err, medias, pagination, remaining, limit) {
Were my equivalant statements.
EDIT: I forget to mention. This is after a cycle of these for those confused:
api.authorize_user
api.get_authorization_url

Instagram api V1 suddenly all limits dropped

I am a new user and we have Api V1. We've been using it since 2 months.
From yesterday we started having an issue with our limits. They suddenly dropped to the limits of unsigned calls.
Today we added SIG, changed this in our Code and also checked the Enforce Signed Requests button (we did not have this update before)
We are able to send the requests now and they look like signed but limits are still 20 relations per hour (like for unsigned calls)
I emailed Instagram team but there is no answer yet.
I am just not sure what to do. Whether we can use it or if we should wait or do something else.
I would really appreciate any advice on this issue. Here's our code.
/** * Sign header by using the app's IP and its API secret.
* * #return string The signed header
*/
private function _getSignature($endpoint, $params)
{
$secret = $this->_apisecret;
$params['access_token'] = $this->getAccessToken();
$sig = $endpoint; ksort($params);
foreach ($params as $key => $val)
{
$sig .= "|$key=$val";
}
return hash_hmac('sha256', $sig, $secret, false); }
Instagram no longer supports signed "header", you have to implement secure API calls to get the higher limits
You must have missed this email from Instagram:
When we announced our publishing guidelines for likes/relationship
actions, we also introduced a new technique to sign API requests. As
part of this announcement we set a deprecation date for the previous
signed-headers functionality to Sept 1, 2015.
This email is to let you know that support for signed-headers has now
been deprecated. We know that a number of developers (including your
company) are still relying on this option, and have whitelisted your
client_id for an extended period. Please plan the migration to
securing your application with signed-requests as soon as possible.
You can learn more about this feature here:
https://instagram.com/developer/secure-api-requests/.
The extended support will end on Nov 1 2015. You will see your
rate-limits for publishing likes/follows/comments reduced if you
haven’t migrated after this date.

Resources