Forum Discussion

GeoffreyHarmuth's avatar
GeoffreyHarmuth
Qrew Captain
8 years ago

Send a POST request with a button or webhook?

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?
  • 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.
    • GeoffreyHarmuth's avatar
      GeoffreyHarmuth
      Qrew Captain
      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
  • 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
  • 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.