Facebook messenger chat bot - watson-conversation

For this I tried two ways.
1.Using stamplay I integrated everything with stamplay (messenger & watson conversation) while deploying in npm (cli)-"stamplay init".
It is throwing an error --ssl certificate chain error.
2.Using ngrok I try to run the ngrok http 3000. It is throwing reconnecting && reconnecting
Can any one help me to reslove.

This middleware plugin allows developers to easily integrate a Watson Conversation workspace with multiple social channels like Slack, Facebook, and Twilio. https://github.com/watson-developer-cloud/botkit-middleware

#RiyaMRoy allows to you one solution.
But you can do this with 2 more options too:
Use Node-red to Integrate Watson Conversation with facebook easily.
Use NGROK, Tanmay Bakshi teaches how to do that. Check this tutorial.
I'm currently using node-red and works perfectly. You can create functions inside Node-red, and have a lot options for Business rules.

Related

Is there a Slack connector for Botium?

From the documentation of "Container mode", it seems like Slack is supported: "...while the Chatbot operates as if it is connected to the Facebook Messenger Platform, to the Microsoft Bot Framework, or to the Slack API." However, I've been unable to find any specific reference to a Slack connector. Our product is a bot accessible through Slack. We're experimenting with Botium for direct API testing through the Simplerest connector, but would like to test end-to-end through the Slack interface if it exists. If not, are there plans for developing one?
There is one sample available (https://github.com/codeforequity-at/botium-core/tree/master/samples/connectors/docker/slack), and the Botium capabilities are described in the Wiki (https://github.com/codeforequity-at/botium-core/wiki/Operation-Mode-docker). It is not E2E-Testing, it's more a system test - when using Botium like this, your Slack bot is never connected to the Slack servers, everything is intercepted by Botium. If you alread have an API Test with the HTTP/JSON connector in place, then it possibly won't add much to your test strategy.
For E2E-Testing, Botium has a connector providing a framework for running Selenium and Appium tests on websites hosting a chatbot: https://github.com/codeforequity-at/botium-connector-webdriverio - never tried myself, but I guess it could be used for testing a Slack bot in the Slack ui as well.

Can a telegram bot running on node.js be hacked

Lets say we have a telegram bot running on node.js using node library: node-telegram-bot-api
Do we need to worry about any security problems, like can someone hack my server and access the source code or data through the API connection?
Don't worry about it, every API connection is through HTTPS, which is regarded as safe.

How Do You Call A REST API From Within Watson Conversation?

I am testing out this android chat application using Bluemix https://github.com/IBM-Bluemix/chatbot-watson-android
At some point in the conversation I will need to call a REST API/webservice to retrieve info about data that has been gathered and send it back to the user as a chat.
I don't want to do it from within the android application as the application wont work when I deploy it to another platform (e.g. slack).
Is there a way to call REST APIs from within watson?
I don't think the conversation service can do it directly, but can it link to another Bluemix service and use the result of that?
If you are already using some form of middleware this can be achieved by setting an action tag in the .JSON editor of the node that should fire the action. This then gets picked up by your middleware listener.
Alternatively try the new cloud actions feature that has just been released here https://console.bluemix.net/docs/services/conversation/dialog-actions.html#dialog-actions which is really simple and easy
I would create a server to intermediate the communication between your app (android) and the conversation service. This server could call/retrieve the required data before sending the conversation response to your app.
As you're using Bluemix, you could use Node-Red to easily do this.
Here is an example of an app that I made exactly this.
If you are starting with Watson and Bluemix, I strongly advice trying to use the Node-red starting pack. It's really easy to integrate Watson services and call REST API/web-services, even integrate with a database.
Here is a starting point to this:
https://nodered.org/docs/platforms/bluemix
Happy coding!

SNS push notification service only success on dedicated device

I've been trying to use AWS SNS service to send notifications to Apple Sandbox environment . I think I setup everything ok and my dev iPhone can get notification without trouble.
But when I start to send notifications to others who install the test app , I keep seeing error message state that
Platform token associated with the endpoint is not valid
With a messageId :147975e0-8a09-5223-8537-256320ab3733
From what I understand , if one device can success, others can success too.
Could anyone tell me how to debug this probelm.
Thanks.
I believe that the apps that the other people are installing were not built with a dev cert (probably built with an adhoc or production provisioning profile), so you probably should use the production certificate.
You could try adding another application on SNS using the production certificate (or the same one, but not using Sandbox, depending on how you generated it), if it works, that this is it.
Also make sure you are using the correct bundle id associated with the certificate.

Application insights slack integration

I've recently started using application insights with a web api.
It will be really helpful to configure app insights to post error messages in a slack channel.
I've seen there is a slack connector but I am not sure how to use it, my guess is that this can be solved with the slack connector and a azure logic app, any tips? tutorials?
You may have a look at this link: https://github.com/Azure/azure-quickstart-templates/tree/master/demos/alert-to-slack-with-logic-app. I followed the instruction and it worked for me.
The tricky part is you need to click the "Deploy to Azure" button on this link page. It would redirect you to Azure Portal, and you will need to specify which channel you want the alert message to be sent e.g. #somechannel. Don't use direct message like #yourname, it has some problem with that and the logic app couldn't deploy for me.
Then you just follow the instruction to find the deployed logic app and authenticate it by logging into slack. And you also need get the logic app URI from the deployment output as in the instruction. Once you put the URI into the alert webhook, you are ready to go!
It's relatively easy to set up a slack webhook.
There's a pretty good C# nuget package for this at https://github.com/nerdfury/Slack.Webhooks
Although you'd need to set up a seperate service to poll and route the app insights data.
There's also commercial options.
getcloudbot.com allows you to hook your Azure Application Insights bundle directly into your slack channel. It's good at staying on top of your services.
Disclaimer : I run it.
You can configure an alert for your error messages https://azure.microsoft.com/en-us/documentation/articles/app-insights-alerts
And then configure sending to Slack using web hooks: https://code.msdn.microsoft.com/Create-Azure-Alerts-with-b938077a
Another quick solution to this, which doesn't involve additional code or a logic app, is to set up a Slack email integration, which provides you an inbound email address for a given channel. You can use that in Application Insights in the "Additional administrator email(s)" field.
This isn't perfect, as you don't really get a lot of details in the post to slack, but it will notify you and provide the name of the alert.
The most easiest path that I found to integrate was using an app named Slack Email which sends email alerts to slack. Once you subscribe this email id to alerts in Application Insights it will start sending the messages on the specific channel you have linked the email to.
https://teamesub.slack.com/apps/A0F81496D-email

Resources