Send a POST request with a button or webhook?

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • In Progress
So I need to post this when a button is clicked:

http://weburlgoeshere/push.php?id=[DEVICE_ID]&title=New job&msg=You have a new job

I already have a button that does some edit record functions, all I want to do is add this to the end. Important here is to have the [Device_ID] field inserted into that url before it is sent.

Hope this is possible.  If not, how will this be done with a webhook?
Photo of Geoffrey

Geoffrey

  • 1,730 Points 1k badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Geoffrey

Geoffrey

  • 1,730 Points 1k badge 2x thumb
anyone?
Photo of sckaram

sckaram

  • 10 Points
Hi Geoffrey,

You can do this easily with QB webhook capability.  The only catch is that your http request becomes an https request.  Since you already have a button that allows you to update or edit the record, then with a webhook function you can send the above url to your php proxy and include any fields, i.e Device_ID.  If you do not have an https server then you might want to execute the url in a popup window to the back-end.
Photo of Geoffrey

Geoffrey

  • 1,730 Points 1k badge 2x thumb
I dont have https server, can you elaborate a little bit more on... "executing the url in a popup window to the backend?"  I would like to try this
Photo of Geoffrey

Geoffrey

  • 1,730 Points 1k badge 2x thumb
I dont have https server, can you elaborate a little bit more on... "executing the url in a popup window to the backend?"  I would like to try this
Photo of Harrison

Harrison

  • 462 Points 250 badge 2x thumb
This is very quick in webhooks but yea you need SSL. You should consider enabling SSL everywhere (can be free with LetsEncrypt). Every site should have SSL regardless of content (even if the user doesn't submit any content). Both browsers and search engines are starting to punish sites without SSL using modern standards. You could in theory go from Quick Base button to a JavaScript page which invokes your PHP. The JavaScript page middle piece is so that you can get a Quick Base one time ticket and then either use that as the authentication server-side (so there are no stored creds) or validate it server-side if you do need to have elevated credentials performing credentials from the server. If you need that, the credentials ideally should be encrypted server-side. Your browsers might throw a mixed content warning (I don't know offhand in that situation) as well if the PHP server is insecure.

Hope this helps.