Is there anyway to send WhatsApp message using node js? - node.js

Is anyone aware about api that can be used to send WhatsApp message using node.
Api like whatsmate have stopped their premium services and only provide trial account.

There is no official whatsapp API, whatever you can find on the internet is "illegal" and whatsapp will ban them eventually. Check this one API who was quite good at the start:
https://github.com/venomous0x/WhatsAPI

Related

How can I get instagram Direct Messages

I was working on Facebook Graph api and created a website on react that sends and receives messages from my business page which is connected it to my business account. Now I want to to the same for the Instagram Direct Messages but I couldn't find any resources and the developers.facebook docs was really confusing. I don't know what to use, if you know any tutorial video or documentation it would be really helpful.

Send a Google Chat message from a regular account (not a bot)?

I'm trying to send a notification out using Google Chats. But I have a few problems with the documentation I've been able to find:
It requires me to have a paid service account, which I do not have, and will not be getting
It requires using a chat bot, which (in my understanding) needs to be added to a room, and cannot just send out messages
Chat bots can't send out messages directly to personal accounts?
I'm already using Google OAuth2 authentication to access another Google API, so I'd like to use a Google API to send messages directly from the authenticated account. How would I do that?
So far:
All the documentation I can find is about making a chat bot.
I've considered some alternatives to sending out messages, but due to corporate device restrictions that will not be changing, google chats is my best option.
At the moment what you're trying to do is not possible, for multiple reasons.
You may know this already, but Google Chat is an upgrade to their old "Classic Hangouts" chat. In Google's own words, this is focused on enterprise (i.e. paid) accounts. While personal accounts are also able to upgrade and get some of the benefits, their documentation shows that Google Chat for personal accounts is very similar to the old Hangouts and most of the new features are meant for the paid accounts. This also includes the use of bots.
As you've observed, the Chat API currently only has methods to create and manage bots. There are no methods to send messages as your own account. This could be to prevent spam or because their Chat API is relatively new, since the Classic Hangouts did not have an API, and Chat hasn't fully replaced it yet. Even then, given that Chat is "enterprise-focused", it is uncertain whether or not personal accounts would get access to any new API features.
You could try to post feedback on their issue tracker or request the feature to see if you get a response, but for an immediate solution you may want to just use the Gmail API to send a regular email or reconsider the other alternatives that you had in mind.

Is twilio mandatory to access whatsapp api

My requirement is to send whatsapp message from the web page. So, it should be a single page which will have fields To Mobile number, message and send button.
I found the documentation from facebook that we need to get whatsapp business api for this.
I also see some other tools like twilio to achieve this.
It is just confusing that, If we can achieve it using whatsapp business api itself, why we require twilio
So, My question here is, Is twilio or other third party tools really require to access whatsapp api.
Note: i am planning to do this implementation with node js.
Please clarify.
If you read the Facebook documentation deeper, you would see that direct access to WhatsApp business API is not fully available to the public. However, Facebook has partnered with 3rd party business solution providers to provide an interface for you to integrate with whatsapp. Here's a list of their partners here.
In order for you to even stand a chance of directly accessing their APIs, you need to boast of a really high traffic and voluminous users attached to your product. So your best bet is via the 3rd party vendors.
Twilio developer evangelist here.
Olamide226 is correct that you can directly access the API, but that it is easier through a partner like Twilio.
I will note that you may want to consider your exact use-case against WhatsApp's requirements for API use. Most importantly, you must get explicit opt-in from users to receive WhatsApp messages from your business.
Also, there are two types of message:
Notifications: which you can send at any time, but must match a registered template and fit within the WhatsApp defined categories listed here
Conversations: if you have received a response from a user within the last 24 hours you can send messages in any format (they don't have to match a template)

configure Gmail accounts to send notifications for mailbox updates to a topic

I am new to gsuite application.
I am trying to push any new email that comes to Gmail I want to push to a topic.
Here is the link i am following:
https://developers.google.com/gmail/api/guides/push#protocol
To configure Gmail accounts to send notifications to your Cloud Pub/Sub topic, simply use your Gmail API client to call watch() on the Gmail user mailbox similar to any other Gmail API call.
I was not sure how it can be achieved? any sample running code will be great.do we need to write python scipt or do we need to write cloudfunction to configure, please advise?
This tutorial may be a good place to start: it walks you through the steps of enabling the Gmail API, authorizing access, and setting up Cloud Functions for watching for messages and processing incoming messages. The tutorial is in JavaScript, not Python, but it should give you a good idea of an architecture that can accomplish what you're interested in.
As for Python-specific resources: the Gmail API Python quickstart is a good place to get started making Gmail API calls. Once you have that working, you can try switching it to call watch().
Note that if you want to continue to get notifications on your Cloud Pub/Sub topic, you will need to call watch() at least every 7 days. One way to achieve this could be to use Cloud Scheduler to periodically trigger a Cloud Pub/Sub topic that in turn triggers a Cloud Function, which calls watch().

Azure Bot - communicate through REST APIs

I have to integrate 2 different azure bots into a single azure bot application. So thinking of integrating with the REST api. Will this approach work ?
From this links
https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-quickstart?view=azure-bot-service-4.0
https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-api-reference?view=azure-bot-service-4.0
I can get the access token from cloud bot. But there is no example on "sending message from client". It have examples on handling client messages from server as Activity object.
It would be better if any samples on "sending message from client to azure cloud throught REST"
what is different between REST and connectors.?
I believe it will be possible with DirectLine, but wanted to know how to do thorugh REST APIs.
Thanks in Advance !!
I can't tell you whether or not your idea will work for dealing with two separate bots without more information. If you are trying to start conversations with both bots and the sending messages to the different conversations based on some set of criteria than that should work.
The Bot Framework API can essentially split into two sections:
The Connector (primary) API that the bot uses to talk to users and the service.
The DirectLine API that you can use to talk to the bot instead of using one of the built-in connectors like Slack or Teams.
Based on your needs, the DirectLine is indeed what you are looking for. The directline.botframework.com/v3/directline/conversations/abc123/activities endpoint will allow a client app to send a message to the connected bot.

Resources