Recent

Author Topic: Listen Webhook in user machine  (Read 2633 times)

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Listen Webhook in user machine
« on: March 26, 2018, 11:49:19 pm »
Hi, I'm building an Open Source Paymo Widget with FPC, I need to listen to a webhook from this API

https://github.com/paymoapp/api/blob/master/sections/webhooks.md

But I don't want to use a server of the company for this task, since the idea is that can be used for anyone, not only for us, don't want to waste resources :).

Is possible to start a local server with FPC and receive the notifications on the user machine, like using a port or something?

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Listen Webhook in user machine
« Reply #1 on: March 27, 2018, 12:07:02 am »
Is possible to start a local server with FPC and receive the notifications on the user machine, like using a port or something?

Your sever would need to be reachable over the Internet, per the examples they give where you specify the https URL of your hook software.

I would do a proof-of-concept first using your own server or a free (1-year) server from AWS and make sure everything else works before I tried to get fancy with it. I would guess a simple CGI app would work fine for this.

And make sure you get an SSL certificate for your server (free from Let's Encrypt).

AWS server notes:

https://macpgmr.github.io/MacXPlatform/PascalDynLibs_4.html


lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Listen Webhook in user machine
« Reply #2 on: March 27, 2018, 12:32:52 am »
Thanks Phil.

I will check it. I will try AWS.

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Listen Webhook in user machine
« Reply #3 on: March 27, 2018, 01:46:36 am »
Thinking it better, it will not work, since I also need to connect my desktop application to the AWS.

Maybe I will do just a 'refresh' button in the app, and / or syncrhonize data between time interval.

 

TinyPortal © 2005-2018