laravel notification on slack channel webkook - slack-api

An app that sends HTTP request to any URL and records the response in the database, if in case there is a response that website is dawn, it should automatical save the response and send a message into a slack channel. the first question is which library to use to integrate slack with laravel>

There numerous slack-api wrappers in PHP. But these two are some of the most expressive:
https://github.com/vluzrmos/laravel-slack-api
https://github.com/maknz/slack
Follow through the README and see which fits best your needs.

Related

Twilio not sending webhooks in Progammable Chat

I would like to ask a question or maybe report a bug after solving my doubts. I started working with Programmable Chat and Twilio do not want to send a webhook to specific url but only when I'm sending message from my PHP code. I downloaded example node app and sending message from that, everything is working really nice, I'm getting post request from Twilio but if only I will send message from PHP, nothing at all. And strange is, after sending message from PHP, it will appear immediately in chat which means that it's working.
How does it possible? Could it mean that Twilio on theirs backend has an a bug when they receive message from PHP and becuase of that they are not fire webhook event?
I eliminated all differences, everything is that same beside that one message is sending from PHP and another from node. Same situation from API Explorer.
Gif presentation
Twilio developer evangelist here.
When you send messages to Programmable Chat from the REST API then webhooks aren't triggered. I think the reasoning is because you are making the call from your server, then your server is already aware that you are sending a message and you don't need to receive a webhook to do so. It also saves from the potential of infinite loops (if your webhook sends a message via the REST API, the requests would just go in circles).
So, it's not a bug, but a design choice. If you need to trigger your webhooks when you send a message from the REST API, you will need to make the webhook from your own server.

Need an Api or webhook for youtube streaming notification

I need to find an Api/webhook, source code for youtube. Specifically, that Api/webhook will send me a notification only when a specific youtuber makes a direct live streaming transmission.
Thanks for your help.
You may refer with this link: Is there a way to get notifications from YouTube API when broadcaster is live. It stated that it requires a websocket connection with your API endpoint by using ws:// protocole at some point. Websocket listen to a server, and enable your browser to handle it's changes like events. So it's exacly what u need for notifications.
Also, you may use the GET https://www.googleapis.com/youtube/v3/liveBroadcasts endpoint which returns a list of YouTube broadcasts that match the API request parameters.
However, getting a notification will require some work. It will probably require polling the endpoint for changes to determine if a new broadcast has been started. I'm not aware of a PUSH API from YouTube to send a request to an endpoint of your choice to create a notification.
More info in the YouTube docs.

How do I receive a Twilio SMS into a Logic App?

How do I create a Logic App to receive an SMS?
I made some progress in my question here
I have been studying the information I found here
and have configured the Twilio Webhook to Call the Http endpoint when a message comes in.
following instructions similar to this
I copied the Request Body JSON from the instructions.
If I the Add A Twilo -Get Message Action it asks for the Unique SID of the message. I can't know this at Logic App Design Time, so how do I get it?
Instead letting Logic App to "retrieve" the message from Twilio, as mentioned in the comments, you should set up a webhook in Twilio's settings page to invoke Logic App ('s request trigger).

Receiving notifications of new posts on Twitter via a specific URL

I would like to access the messages in the Twitter via the API in real time. A cursory search showed that it is possible to periodically send API-request to Twitter. In general, this is possible. 15 requests in 15 minutes is enough.
But I'm wondering, are there other ways to get information faster?
For example, is it possible to subscribe to notifications and receive a request from Twitter at a certain address?
Are you asking if Twitter has webhooks? The answer is yes
Review Securing Webhooks documention taking special note of the
Challenge Response Check (CRC) requirements.
Create a web app with an endpoint to use as your webhook to receive
events (e.g. https://example.com/webhook/twitter).
Make sure your webhook supports POST requests for incoming events and
GET requests for the CRC.
Register your webhook URL with your app using POST
account_activity/webhooks.
Use the returned webhook_id to add user subscriptions with POST
account_activity/webhooks/:webhook_id/subscriptions.

Sending direct message to a bot in slack and get the response

I am trying to figure out how to send a direct message to a bot in slack using the Slack API and get the response by the bot. For example, I use chat.postMessage:
curl -X POST -d
'token=xoxp-xxxx-xxxxxxxxx-xxxx&channel=BOT_ID&text=where?&as_user=true'
https://slack.com/api/chat.postMessage
The bot respond with:
I'm at hubot-server1.localI'm at hubot-server2.local
I want to capture the response. What Slack API I can use to capture? chat.postMessage doesn't return it.
Thanks for any reply.
Regards...
There are no API methods that will directly return a response from a bot. To capture responses of bots (and users) you need to read the messages from a channel.
With the Web API you can do that by calling channels.history for public channels (or groups.history private channels and similar names methods for other conversation types. you can also use the new conversations.history method to access all types of channels).
Those methods will give you all messages of a channel and you will need to filter out the right message within your app.
You can also get all new messages for a channel with the RTM API and the Events API.

Resources