java chatbot does not work on facebook messenger webhook - facebook-messenger-bot

we followed this link(https://github.com/thekosmix/Java-FbChatBot) to build a java chatbot, when we try it on webhook of messenger , we hit the following error: The URL couldn't be validated. Response does not match challenge, expected value="1211923363", received=""
our webhook is: https://41ab4ddb.ngrok.io/bot/webhook?hub.verify_token=nhitoken&hub.challenge=123456

Related

Unable to integrate Rasa chatbot with Telegram

I have developed a chatbot in Rasa and I want to integrate it to Telegram. My chatbot works great locally, I have run test and I am ready to publish it. However when I tried to integrate it with Telegram it seems that it doesn't work.
In credentials.yml I have the following code:
telegram:
access_token: <Token provided by the Botfather>
verify: My_BOT
webhook_url: "https:/url.ngrok.io/webhooks/telegram/webhook"
As you can see I am using ngrok for the webhook url. When I paste the ngrok url in my browser with the Rasa server running, I get the message "Hello from Rasa 2.8.2", an indicator that it should work, but when I try to interact with my bot on Telegram it does nothing. What could be the problem?

Getting Firebase Bearer token by simple HttpCall (REST API)

I am currently facing the following situation.
Sending Firebase Messages via HttpCall via the google API endpoint:
https://fcm.googleapis.com/v1/projects/projectName/messages:send
Here we have to use OAuth2.0 with a valid Bearer Token like discussed in this question:
What Bearer token should I be using for Firebase Cloud Messaging testing?
After following these steps I was able to send Firebase Messages via the google API.
Now I would like to get the Bearer Token via a HttpCall without doing the manual step with the Playground https://developers.google.com/oauthplayground.
I cannot find any documentation on how to "Exchange authorization code for tokens" via simple HttpCall. I have no possibility to implement any code because I would like to send Firebase messages inside a "Dataverse Cloud Flow/PowerAutomate", therefore no possibility to load any external DLL (like the Firebase Admin Dll, which would implement this functionality).
I am not,looking for a solution which depends on external Dll like https://firebase.google.com/docs/database/rest/auth#authenticate_with_an_access_token or Pre-RequestScript
Any help is appreciated
What you are after is fundamentally not possible, since you can't hook the result of the bearer token into the same URL process to send messages. By the sounds of it you are unable to fetch one URL, process the results from that URL to pass onto the other which is what the REST API would do.
As such, you will need a secondary service that you can simply send messages to and it will invoke the Message and authentication for you, a bridge as you will. You can use Firebase Cloud Functions with an onRequest call or a simple express server on a Google Compute Engine instance (f1 free tier).
Then you can send your message request from your service to this bridge which will authenticate for you and send the message, it would be a fairly simple script to implement, specially with the admin-sdk.

How to retrieve inbox messages from linkedin Message API

I would like to retrieve all messages from Linkedin inbox via API V2.
I Have gone through Linkedin V2 API docs many times, but i still cant figure it out.
I can get profile info with following request through POSTMAN:
https://api.linkedin.com/v2/me?projection=(id,profilePicture(displayImage~:playableStreams))
How to forge the request to recieve Linkedin inbox messages in respond?

Getting invalid token in Firebase Cloud Messaging in cURL command and postman

guys, I'm trying to get information about app instance and I'm also trying to subscribe an app instance to a Google Cloud Messaging topic but the problem is whenever I try to use the server key it throws me the error of invalid token and when I try to use the web api key it gives me unauthorized
I've tried it using postman but the results are the same. Can somebody tell me what is it that I'm doing wrong
Here is the screenshot of the request that I'm sending using postman
and here is the screenshot of the request that I'm sending using curl

Amazon Simple Notification Service to http endpoint

I want to send message from Amazon Simple Notification Service(SNS) to the http endpoint. There is no proper solid documentation on how to do that. Though I had read Amazon SNS documentation still I could not get entire picture.
Can anyone give me simple example on how Amazon SNS and http endpoint work together?
There good documentation for what you asking: http://docs.aws.amazon.com/sns/latest/dg/sns-dg.pdf
Look at the page #147, it describes what steps you need to do for sending messages to HTTP(s) endpoint.
Also check this example which describes how to create topic, subscribe endpoint, confirm subscription and start to receive notification messages from SNS (uses Java SDK): https://github.com/mfine/AmazonSNSExample
General picture is:
On the publisher side:
create topic and subscribe some endpoint to receive messages. After subscribing endpoint to topic, the endpoint will receive SubscriptionConfirmation message.
start publish to topic so your endpoints will receive notification messages
On the subscriber side (your endpoint should be able to handle at least confirm subscription request and notification messages):
confirm subscription: make HTTP GET request to the "SubscribeURL" URL which comes inside the body of the confirm subscription request. Before you confirm subscription your endpoint will not receive any messages from SNS
receive notification messages and do what you want

Resources