To post a YouTube comment using a third-party application can the Oauth access be limited to just comments? - oauth-2.0

For a CRM tool I need to use Comments: insert method of YouTube data v3 api.
The oAuth scope defined is
https://www.googleapis.com/auth/youtube.force-ssl
This is wide scope allowing the app to also manipulate video and delete data.
Is there a way to limit the scope to just comments?

if you check the documentation page for comments insert method you will find it states
This is the only acceptable scope to gain access to insert comments. Your only option to limit the use of this scope, would be to not insert comments then you wouldn't need this scope.

Related

List all Airtable tables via API request

Given that user provided his API key, is there a way to retrieve a list of tables in user's AirTable account?
I do know there is a URL for API queries, with base and table encoded there. Also API docs include only info on how to work with a particular table.
My use case is to allow user to choose a table they want to work with.
Airtable now offers a Metadata Api, however access is limited and must be individually requested, at this time.
As part of our ongoing effort to make Airtable more and more extensible, we’re beginning to expand access to the Metadata API 360.
The metadata API gives you read-only access to a list of a user’s bases, as well as the specific schema of each base - things like what tables exist, what fields exist on those tables, etc.
https://community.airtable.com/t/accessing-the-metadata-api/37080
Metadata Api Documentation
Enterprise API also offers endpoints capable of fetching Metadata.
This would be part of the metadata API which does not exist.
See this community post for some non-api workarounds.

Does everyone need their own YouTube API v3 Key?

I'm working on an HTML file that allows people to find unanswered comments for their channel's videos. I'd like to make this available to the general public, or at least those willing to do a little work on their own. I don't plan on hosting it on a web site - just making the HTML page available, probably on GitHub. At least that's my thoughts right now.
(By the way, to avoid a discussion on authentication/authorization, it currently doesn't require authorization since I'm only accessing public comments, so it does indeed run in a browser, without being hosted.)
Since the web page uses the YouTube API v3, it requires an API key. Am I correct in assuming I don't want everyone using my API key? Does this mean that anyone who wants to use this HTML file needs their own API key?
Or am I thinking about this all wrong, and there's a better way to release this code? Thanks.
When you request for comments, it costs one unit (docs). Daily limit is 1,000,000 units. So if you exceed that, you might want to use multiple YouTube API keys. So technically no, your users don't need their own YouTube API keys, but personally I would make every user use their own API keys.
Creating Multiple Google/YouTube Data API Keys

Is there any form of youtube-startup partnership?

Is there any youtube-startup partnership that may offer a customized youtube API to startups?
Youtube API is open to all. There is currently no customized Youtube API for certain group of people. If certain features are not existing, you can either file a feature request or create your own implementation.

Where to find USER_ID/OWNER_NAME for ids parameter of YouTube Analytics API

The YouTube Analytics API docs (https://developers.google.com/youtube/analytics/v1/index#Parameters) specify either:
channel==USER_ID
or
contentOwner==OWNER_NAME
Should be set as the ids parameter for requesting reports.
My questions is, is there an API method I can call to retrieve the value for USER_ID or OWNER_ID values as I am currently struggling to find what these are?
Or if not, where else can I locate these?
In most cases, you're going to want to run channel-level reports, not content owner reports (unless you specifically know that you have access to content owner reports).
The value to use in the channel== parameter is the channel id of the currently authorized channel. There's some information in the docs about how to obtain the currently authorized channel's id using youtube.channels.list(part="id", mine=true). This is also illustrated in the sample code.

How do I know if a specific twitter user is online or not?

How do I know if a specific twitter user is currently online by writing programs? Is there any API or data field in the web page showing this information? Both browsing Twitter webpage and using Twitter app are considered "online".
Although this information is not readily available, you can do a work around. Make use of Twitter's Streaming API: https://dev.twitter.com/docs/streaming-apis/streams/public (have a read through this document).
You'll most likely be using the POST Statuses/filter functionality (read the doc here: https://dev.twitter.com/docs/api/1/post/statuses/filter ), which will give you a JSON object with tweets based on your filters.
Make use of the parameters you'll need to specify in the URL to filter the stream (have a look through this document to learn more about it: https://dev.twitter.com/docs/streaming-apis/parameters ), in your case it'll be the follow parameter. You basically specify the twitter ID of the user you want to follow. Here's a sample JSON result of the streaming API in action https://stream.twitter.com/1/statuses/filter.json?follow=25365536 - this one in particular is following Kim Kardashian. Keep in mind that this will give you:
Tweets created by the user.
Tweets which are retweeted by the user.
Replies to any Tweet created by the user.
Retweets of any Tweet created by the user.
So in order to just stream the tweets of your desired user, you'll have to use a programming language of your choice to parse through the JSON object to find the user that actually sent the tweet (this is a little tricky, you'll have to look through the properties of the JSON object to figure it out). Once you narrow the streaming tweets to just the ones from the user though, you can then have an alert on when new tweets by this user stream and that will tell you if the user is online/using twitter at the moment.
It's not clear what you mean by "online" (browsing twitter.com? Using a Twitter app?), but in any case Twitter doesn't provide such information, thankfully.
I'm afraid such information is limited by Twitter and is not available. However you can put your question on https://dev.twitter.com/discussions and ask its developers. Good Luck
you need get user state first
then filter if around current time
then get ids
they are online
use twitter developer api
I do it for my website

Resources