I´m using Zapier Webhooks for integration between a Web Portal and an API. Both, the web portal and the API was developed with php. I´m using curl to send a request to a catch hook in Zapier, sending the Post Data. Then in my zap, the second step toke the catched fields and send it as form data to and PUT webhook to my API URL.
The problem is that in my portal, when I print the response of this call it always show something like this:
{"status": "success", "attempt": "5a81c6d1-bb9b-4afe-9ece-0cba4a0a52b0", "id": "cec1978a-c98f-4521-89f3-83a4041c15a4", "request_id": "5a81c6d1-bb9b-4afe-9ece-0cba4a0a52b0"}
But I need the real response of the webhook in the second step, showed in my zapier task as Data Output.
Someone knows why this is happening and how can I get the real response?
Thanks
David here, from the Zapier Platform team.
What you're describing isn't currently possible. When Zapier receives a hook, it lets the sender know the hook was successful and they need not retry; this isn't customizable.
In this situation, it sounds like you need a simple webserver, so you can customize the in and out behavior of your data? Or skip Zapier entirely and send the webhook directly to the destination.
Related
I'm trying to work with the slack Event Subscription app_mention, but I'm having some issues.
My backend is PHP, and I'm using this class.
Basically, what's happening is, if I have my bot user in multiple channels and someone mentions the bot, it will only reply in a single channel.
For example;
I have the bot user in 2 channels
bot-testing
development
If I # mention the bot in the development channel, it will send it's reply in the bot-testing channel.
My code used to send the message:
$client->to('#' . $event['channel'])->send("Hi. I'm currently under development.");
and my $event variable looks like this:
{"type":"app_mention","text":"<#UFT4EG0Q7> test","user":"UAKTRFH41","ts":"1548783398.055200","channel":"GAMED4PK5","event_ts":"1548783398.055200"}
but decoded obviously.
Why is my bot not replying in the correct channel?
So based on my reading of the PHP client you're using, that's designed for use with Incoming Webhooks.
Incoming Webhooks have a 1:1 relationship with a conversation/channel, so you can't define the destination for your message in the payload you send to the API.
If you want to do that, you could try using one of the other PHP SDKs built by the community.
I'm developing a bot that receives a call from "conversations webhook" to know when a page receives a new message and answer it from my bot.
I've tried "messages" but I can not even make it activate when they send me a message.
I have my conversations webhook active. The "conversations" callback is something like this:
{"entry":[{"changes":[{"field":"conversations","value":{"thread_id":"t_100006208XXXXXX","page_id":309151156XXXXXX,"thread_key":"t_100006208XXXXXX"}}],"id":"309151156XXXXXX","time":1510581746}],"object":"page"}
The problem is that the webhook always sends the same thread_id and thread_key. The page_id does change, but I can not find the way to know which conversation is the one that varies.
Thank you!
I solved it! The problem was that I made the call to the api with an access_token from my app, and not from the site itself.
I'm trying to create a simple bot for Telegram, I have settled the webhook correctly.
My problem is that I'm not able to get updates using file_get_contents("php://input"). I obtain the JSON object only if I use file_get_contents($mywebsite."/getUpdates"); and in that way I'm able to obtain the info of the chat.
Anyway I can send messages only if I reload my web page and not directly from the Telegram app.
How can I fix this problem?
I have a new question. This is my context:
I want to make my own API REST, where I can call this method with information about my product as parameters. My backend method do the typical purchased process but it doesn't show the PayPal screen which show information about my product, just do the process directly and I receive an answer. Is it possible?
I'm using the PayPal SDK for PHP, and looking for at Google I just have gotten that the PayPal page shows, but I'm new in this. Your answer will be so good!
Yes, this is very possible. There are plenty of tutorials online for building your own REST service, and within your service methods you can hit other APIs or do anything you need to do.
Your service can parse the results from the 3rd party service you're hitting (you could hit 10 different services if you wanted to) and then you would generated your own basic response which includes a collection of all that data back to whatever client hits your service.
I am currently working on my project like Parental control. I am trying to find a way , that if there is any procedure or way to send a notification from an android phone to a website whenever the android phone sends/receives an SMS and dials/receives a call. On website , a database will be maintained for these notifications.
You could send a get request or post request to a website.
Sending POST data in Android
Android - Sending HTTPS Get Request
Just some examples. You will probably be looking for a restful api. I haven't read this, but it looks viable:
http://www.9lessons.info/2012/05/create-restful-services-api-in-php.html
I think you want to maintain database, based on mobile even. You can create API call, that will send data to database while any activity happened on mobile. That api will store notification on DB.
On web you can create AJAX call that will check in DB, if any new notification come or not, if new record found you can show it on website.
This is what I think the best way to do so...