YouTube Data API LiveChatId assistance - c#-4.0

I've looked online for quite some time now, and I have come up empty. I am working in C#, and I am trying to locate the code I can use to get the liveChatId so I can post to livestream chat. Even the "Try it now" section of Google's example resource https://developers.google.com/youtube/v3/live/docs/liveChatMessages/list#try-it asks for the liveChatId as well. I know I need to make a HTTP GET request, but I really need the actual code that will allow me to do this.
Assistance is GREATLY appreciated.

Here, from the very documentation you provided:
The liveChatId parameter specifies the ID of the chat whose messages will be returned. The live chat ID associated with a broadcast is returned in the liveBroadcast resource's snippet.liveChatId property.
That means you first need to get your liveBroadcast resource. You can obtain those at the liveBroadcasts.list endpoint. If you want to retrieve broadcasts that you (or a user of your application) is the owner of, you might consider authenticating with OAuth 2.0 and using the mine parameter.

Related

How to find KnowledgebaseId in Dialogflow?

// const knowledgeBaseId = `the ID of your KnowledgeBase`;
I can't seem to find the knowledgebase ID in Dialogflow nor in the Cloud Console. Please help.
It's weird I my self couldn't find the KnowledgeBaseId even though I skimmed through dialogflow docs several times. But after several hours of searching I found a way that we could get it.
You should go to the the Knowledge base you created and right side there is chat window where you can test your chatbot response.
Type anything and you'll get a response card and below that there is an option called Diagnostic info.
Click it and you'll see the RAW API response and there you can see the KnowledgeBaseId inside it (it may be referred as source there). It should be in the format Format: projects/<Project ID>/knowledgeBases/<Knowledge Base ID>

How do I check if a mobile number is on WhatsApp or not with programming?

I wanted to build a web-based system using which you will come to know whether the mobile number is registered with WhatsApp or not? It's just to check whether the number entered in textbox have WhatsApp account or not?
I tried finding resources regarding the same but unable to get any solution on it, please share some link for reference so, I can implement it and get to the final result.
You can use the Whatsapp API through Wassenger of Waboxap to send a text message and via webhook service like Loggly determine if the message was delivered. The person will however get a message, which might cause them to block you.

Is it allowed to use this link (https://www.instagram.com/[username]/?__a=1)

at the moment I am working on a Instagram implementation for the homepage of my school.
My problem was, that I didn’t got access to the account, so I couldn’t generate an access token (which all free joomla plugins need).
So I have decided to write my own plugin (I am not the best programmer, but it works), because of that I found this link (https://www.instagram.com/[username]/?__a=1) where I could get the JSON of the public page without the need of any token or ID.
My question is if I am allowed to use it or not (because I can’t find this link in the official api)?
We've built a small API that scrapes exactly that data and presents it to you via JSON:
https://apinsta.herokuapp.com/u/<username>
(In case you are still interested in this)
This URL closed by instagram on 14 April. You can get user's information json with this link:
https://i.instagram.com/api/v1/users/USER_ID/info/
Also you can find user ID like this:
Go to the https://www.instagram.com/USERNAME/
Look source code and find this code:
"id":"
You'll see the user ID between quotes.
Good luck.

how subscribing to instagram realtime api helps me to get user/media details

I have subscribed to instagram realtime api to receive POST updates for hashtag #sudhir
I am able to get updates to my server this way :
{"changed_aspect":"media", "subscription_id":2935881, "object":"tag", "object_id":"sudhir", "time":1362748903}
I don't find any user related or media related info in these updates. I found in SO that we have to hit their (instagram) endpoints explicitly to get photos/user info, inspite of subscribing to endpoints.
If we have to make request explicitly, then what is the use of subscribing to particular endpoint.?
What is the use of this json data ({"changed_aspect":"media","subscription_id":2935881,"object":"tag","object_id":"nofilter","time":1362748903}) we get in request body of our servlet. ?
Can we use this data in any way to get actual data of user/media ?
Any help or suggestions would be appreciated :)
Nothing useful I'm afraid. Once you have that information you know that something has changed on Instagram's end. You are then supposed to fire off the corresponding request. From your example it looks like you want to then do a tag/recent/ request and filter out anything earlier than the "time" variable.
Not the easiest way to do things unfortunately but they seem to have decided that the hard way of doing things is the way to go.

User authorization in google talk with nodejs and node-xmpp

I'm writing a bot in node.js using node-xmpp. So far it's pretty straight forward except I'm having an issue with figuring out how google Talk handles it's user authorization (when dealing with requesting to chat with someone NOT on your roster).
I'm catching all stanzas coming through and logging them to the console but there is no data coming from the user that is requesting authorization.
Any explanations of what I should be looking for or if this event even happens over the jabber protocol.
[appended] I know that technically when a subscription request is made a presence stanza is sent with the subscription request. I can't see these coming over the wire using node-xmpp for some reason. Also, I need to find out a way to determine what presence requests are "pending" when my bot logs in. I thought (innacurrately) that they would be listed in the roster with some sort of flag, but that's not correct.
Any help with finding out where to go from here would be useful.
Ok, I finally figured out how to get the subscription requests after they have been made. There isn't much info on it out there so I'll put together a blog post, but I feel that answering it here might be good as well.
I found that if I did a google roster query based on the below information:
http://code.google.com/apis/talk/jep_extensions/roster_attributes.html
example stanza:
<iq from="username#gmail.com/D2D4E5A8" type="get" id="google-roster-1"><query xmlns="jabber:iq:roster" xmlns:gr="google:roster" gr:ext="2"/></iq>
The server would respond first with your pending server subscription "presence" stanzas
ex:
<presence type="subscribe" from="pendinguser#gmail.com" to="namehere#gmail.com/D2D4E5A8" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client"/>
and then the rest of your roster's "presence" stanzas. It's important to note that your subscription "presence" stanzas don't get sent to you from the server unless you do a roster query. I'm not sure why this is and why it's not documented somewhere is beyond me. Anyways, at least I can get the list of people trying to get access to my bot now.
Note: This is not my area of knowledge just an interest of mine. I have not got practical experience just a bit of research. This would have been a comment however doing some more searching on the topic, I have come up with some more things that might help.
Here's a google chat chat room homepage http://partychapp.appspot.com/ you can get the source http://code.google.com/p/partychapp/
Those links came from http://xmpp.org/2010/02/xmpp-roundup-13-services/ which has quite a few other resources that might be helpful.
http://code.google.com/p/node-xmpp-bosh/ has some code about that, I've not done it but the topic is interesting.
I hope if you do find the answer your after you write up a blog post and or a project and share it. It would be of interest to me.

Resources