Verifying botkit against the slack events api - slack

I'm having a pretty basic problem - trying to upgrade my botkit app from 0.7.x -> 4.x.
I've used yo botkit to generate a new v4 bot, according to these instructions. Now that I try to configure the bot with slack I can't verify the events api the same way I did with the v0.7 bot.
When I go to slacks events api url and try to verify a request url, my node app is responding with a 404 not found error.
Looking at the code, it seems that the endpoint for /slack/receive which slack is trying to access is indeed removed from the code.
This prevents my bot from listening to messages and responding to them.
When I was configuring the bot in v0.7.x, I just cloned this repo and followed these instructions, but when I try to follow these instructions with the starter provided for v4.x the guide fails and I can't find a more relevant one.
Any idea what I'm missing here?

The url has changed in v4 - it is now /api/messages

Related

Whatsapp webhook won't connect with ngrok

I made a controller in laravel for WhatsApp webhook authentication, run it locally and use ngrok to connect it with WhatsApp webhook, it won't connect, it said "The Callback url or verify token could not be validated", but when I deploy it on heroku it working normally.
Is there any special config so I can connect it locally using ngrok ? or is there any alternative solution?
Went through the same issue and it seems that WhatsApp Cloud API considers NgRok malicious, and won't accept it as a callback webhook endpoint.
You need to follow the steps provided in ngrok documentation,
https://ngrok.com/docs/integrations/whatsapp/webhooks,
I am not sure which step you are missing or have a problem with, but as per the error "The Callback url or verify token could not be validated", your deployed code for webhook is not valid as per the provided guideline in WhatsApp webhook docs.
Make sure you have set the same verification code in the code and webhook verification when you configure!
According to the ngrok docs, you need to have a pro or enterprise license for validation to work. A free alternate solution for anyone that may need it (at least at the time of writing) is Cloudflare tunnel. Just read the docs or you can watch this video(CLI version) or video(dashboard version) to help you set it up. You will need to have a domain though.

Is it possible to trigger TravisCI build by Slack message w/o spinning up my own server?

When I did research online, most of the solutions are about triggering Slack notification from TravisCI. Now I want to do the reverse direction - type some message in slack, and trigger a build task in TravisCI.
I'm looking at Slack's Outgoing WebHooks - under their "Custom Integrations" in Slack app directory. However, their webhook POST data spec is fixed, not seem to be programmable through just their webpage UI. They have a column in the UI that lets you fill in URL(s) to POST to. But I don't see any ways that I can customize the data field of the POST request.
Same as TravisCI's Triggering Builds API v3, the data fields they expect in the POST are fixed and unchangeable.
I know I can sign up a cloud service, write some code and spin up a server to re-package the parameters to do the work, like a middleware between these 2 APIs. But just want to see if anyone manages to achieve triggering TravisCI by Slack in such way that doesn't involve spinning up a server myself?
I ended up hosting a server and writing the porting logic myself. I guess there's no simple way to do this, after all they are different APIs. Here is the code where I request against travisCI API, and here is the code where I unpack the slack webhook POST request.

I am Not able to do authentication in bot using Azure bot service

I followed the link -
https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-authentication?view=azure-bot-service-4.0&tabs=csharp%2Cbot-oauth
to use authentication in bot, but the article is not clear, at one place its mentioning to use echo bot, at the same time its asking to use code from github. After trying all the steps still it's not working
After trying all the steps in below link still it's not working
https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-authentication?view=azure-bot-service-4.0&tabs=csharp%2Cbot-oauth
There is a error in emulator can not post activity, unauthorised

Endpoint URL has an invalid value

I am trying to register my Bot at https://dev.botframework.com
However, when I put https://localhost:44338/api/messages in the
Messaging endpoint field I get an error - Endpoint URL has an invalid
value. My bot is running locally on https://localhost:44338.
Also is there any way I can create my own web client which can
communicate with my Bot.
Is Bot Registration mandatory for it to be deployed in production.
It looks like you're trying to register your bot with your local instance whereas you need to use a deployed (production) instance.
Publish your bot to Azure and use the URL you get from that. In Visual Studio you can right click your project and select "Publish"- just follow the instructions from there.
You can make your own client, yes. You can use your browser or anything else to make HTTP requests to your production bot.
You need to register your bot if you're using the bot connector.
Hope that helps.

AppHarbor Slack Integration

I've been trying to set up appharbor to work with slackbot on Slack or Incomming webhooks but tough luck.
How to integrate AppHarbor with Slack?
https://support.appharbor.com/discussions/problems/77288-webhooks-for-posting-notifications?unresolve=true
This is what i've found so far on the subject and i've created a discussion on their support but still nothing...
Any assistance on the matter is appreciated!
I have managed to get this to work using Zapier as an intermediary...
Add a Web Hook from the Zapier side to their built in Slack integration.
Then they will give you a webhook URL. Add this as a Service Hook in Appharbor. I needed to then push a build so that Zapier had a sample hook to work off of and then I did some simple filtering (only show fails for example) and configure the Slack channel and it was up and running in < 10 mins.

Resources