How to create Hangouts chat message via API with a link to Video meeting - hangouts-chat

I'm trying to create Google Hangouts Chat message with a link to new Video meeting.
So far I managed to send a regular message, but I cannot find how to create a video meeting and send a link there:
msg := chat.Message {
Text: "test msg",
}
_, err := chatService.Spaces.Messages.Create(spaceID, &msg).Do()
if err != nil {
log.Fatal(err)
}
In the chat itself it's easily doable:
Any help will be appreciated! Thanks!

You have several options:
Include the link in a simple message:
If you include a plain link URL in your message text, such as http://example.com/foo, Hangouts Chat uses this as the link text and automatically hyperlinks that text to the specified URL.
If you don't want the link URL to show up, you can provide an alternate link text for this link, using the following syntax:
<video-meeting-url|your link text>
You can also customize your message to a higher degree by sending a card message. You can for example, provide a custom image for the meeting link, as explained here.
UPDATE:
Before doing this, you have to create a video meeting and get its link. You cannot create a video meeting with Hangouts Chat API.
As you can see in the official documentation, Chat API can only be used to manage spaces (that is, chat rooms and direct messages), as well as its members and messages. Video meetings are not part of Hangouts Chat but of Hangouts Meet, and there is no open Hangouts Meet API.
Reference:
Including links in message text
Card Messages: Image widget

Related

twilio whats app bot select one option from list

i'm doing this whatsApp bot auto response using twilio apis,
i want user to select one option from list as shown in this pics, i check this link :
https://developers.facebook.com/docs/whatsapp/guides/interactive-messages/
it's called List Messages, so i want exactly what is shown in the pics using twilio apis,
as i check this document (Creating templates with buttons) from twilio link : https://www.twilio.com/docs/whatsapp/buttons#additional-information,
i want button shows popup select one option please help, i'm trying my best to ask this question the best i can i hope u understand after editing
click on it then this popup shows
thanks advanced
These messages are called Interactive Messages and according to Meta's docs "users cannot select more than one option at the same time from a list or button message, but they can go back and re-open a previous message."
Please have a look at the Twilio Doc to see which message types are currently supported.

How to make whatsapp perform actions on behalf of react-native application?

I am trying to integrate whatsapp in my react-native app. So far the resources that I have found only tell how to send a message or open whatsapp via Linkurl from react-native application. But I want to take a step further and perform action from whatsapp. Imagine like you trigger the notification and you select the Yes and No and that performs the respective actions I want to make similar functionality but on whatsapp. After a user perform certain activity from the react-native application I want to send notification on whatsapp and without opening the react-native application the user should be able to perform action. Is there a way I can achieve this functionality.
React Native/JS do not have support to 'whatsapp://' scheme.
The following Schemes Only:
mailto; //For Mailing
tel; //For Telephone
sms; //For SMS
http / https; //For Hyperlinks
You can use this method to send WhatsApp message direct to a number.
https://wa.me/<phone#>

In-app messenger api with prepopulated text

Many apps used an in-app Facebook messenger api to share referral link directly to messenger. They also use prepopulated text with a link.
My question is fairly simple : How do they do it ?
I could not find any documentation about it, the closest thing I found is the send dialog api which doesn’t allow any prepopulated text.
Example (Lime app):
You need a Link not share, try this package or find something similar
https://www.npmjs.com/package/react-native-facebook-messenger

How to send media files on whatsapp programmatically using click to chat feature?

I have to use whatsapp's click to chat feature for automating the process of sending messages to unsaved numbers. I am currently using selenium to automate the process. I am able to send text messages only for now. I was wondering that it might be possible to send other media files as well like images and videos.
There are 2 unused parameters in my url of click to chat feature, "source" and "data". I thought using these might enable me to send media files but I Haven't been able to do it yet.
Example URL for one of my click to chat messages:
https://web.whatsapp.com/send?phone=phoneNumHere&text=Hi&source=&data=
Can anyone confirm that either its possible or not. If its possible what would be the right way to do it?
Thanks
Similar question: Whatsapp Automated Bot not able to search in WhatsApp Contact List
Send images, videos and docs using Selenium:
//To send attachments
//click to add
driver.findElement(By.cssSelector("span[data-icon='clip']")).click();
//add file path
driver.findElement(By.cssSelector("input[type='file']")).sendKeys("FilePath");
//click to send
driver.findElement(By.cssSelector("span[data-icon='send-light']")).click();
I know it's too late, I just have to add that Whatsapp Web and Whatsapp Desktop accept paste inputs, thus if you can get your picture to the memory (I did it with VB.net took 5 mins to accomplish after a bit of googling) you can just send a paste order and it'll load it in and require and ENTER send key from you.
Part1: Sending messages to unsaved contacts
Sending media to unsaved numbers is quite a difficult task but not impossible. You can surely find XPath by text.
Part2: Yes media can be sent to contacts. I have done that in my project link : https://github.com/shauryauppal/PyWhatsapp. By using PyAutoIt you can send Pictures, PDF, Videos to the selected contacts.
Since uploading part is not the automation of web browser we auto windows using AutoIt and select the path of image/video/file to send to the user.
autoit.control_focus("Open","Edit1")
autoit.control_set_text("Open","Edit1",(PATH_OF_IMAGE_TO_SEND) )
autoit.control_click("Open","Button1")
This is just the crux of the implementation. Do refer my repo in case of more understanding.
PS: Don't forget to star repo or give credits.
Check answer Link for more info, where to download AutoIt from.
Coding Working Fine.
//To send attachments
//click to add
driver.findElement(By.cssSelector("span[data-icon='clip']")).click();
//add file to send by file path
driver.findElement(By.cssSelector("input[type='file']")).sendKeys("FilePath");
//click to send
driver.findElement(By.cssSelector("span[data-icon='send-light']")).click();
I was having the same issue but right after fixing it, I made a python wrapper so that it helps more people having the same issue.
In case you're interested to explore more about the wrapper, here is a link
https://github.com/Kalebu/alright
Here is how to send a message to media files and message to unsaved contacts
>>> from alright import WhatsApp
>>> messenger = WhatsApp()
>>> messenger.find_user('255-74848xxxx')
>>> messenger.send_message("I wish you a Merry X-mass and Happy new year ")
>>> messenger.send_picture('path-to-image',"Text to accompany image")
Sending to Multiple unsaved contacts
>>> numbers = ['2557xxxxxx', '2557xxxxxx', '....']
>>> for number in numbers:
messenger.find_user(number)
messenger.send_message("I wish you a Merry X-mass and Happy new year "

Android app displaying list of video from YouTube playlist using YouTube API

I want to make an app which shows video from my YouTube channel or from my playlist using using YouTube API..
the app should be like this..
app should display list of all video in playlist and when user click on any video it should be played...
how can i do this app ?
if you know solution please send both java and xml code for this.. or send a link from where i can download source code
Checkout PlaylistItems, it returns all the videos from your playlist.
"A playlistItem resource identifies another resource, such as a video,
that is included in a playlist. In addition, the playlistItem resource
contains details about the included resource that pertain specifically
to how that resource is used in that playlist."
For Java code samples, checkout the Official Youtube api-samples/java for code reference.