Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
WebHook.Listen
Starts listening for incoming requests on this port.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
WebHook | 11.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "WebHook.Listen"; WebHook; Port { ; Queue Length } ) More
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
WebHook | The reference number of the web hook. | $webhook | |
Port | The port number to use. Between 1024 and 65535. Can be zero to pick random port (since v12.5) |
9999 | |
Queue Length | Available in MBS FileMaker Plugin 13.1 or newer. How many entries the queue should have for waiting connections to process. Default is 10. Range is from 2 to 100. |
10 | Optional |
Result
Returns OK or error.
Description
Starts listening for incoming requests on this port.You may need to allow incoming connections for FileMaker application in your firewall application.
The queue for incoming connections waiting to be accepted by the plugin is currently 10.
Examples
Listen on port 9999:
Set Variable [ $r ; Value: MBS("WebHook.Listen"; $$WebHooks; 9999) ]
Listen on new port:
Set Variable [ $$WebHooks ; Value: MBS("WebHook.Create") ]
Set Field [ WebHook::Server Webhook ; $$WebHooks ]
# ask for new random port
Set Variable [ $r ; Value: MBS("WebHook.Listen"; $$WebHooks; 0) ]
# set trigger script
Set Variable [ $r ; Value: MBS("WebHook.SetScript"; $$WebHooks; Get(FileName); "WebHookReceived") ]
# query port
Set Field [ WebHook::Server Port ; MBS( "WebHook.GetPort"; $$WebHooks ) ]
See also
Release notes
- Version 13.1
- Added Queue Length parameter for WebHook.Listen function.
- Version 12.5
- Changed WebHook.Listen to allow passing zero as port number to pick a random port, which you then query via WebHook.GetPort.
- Version 12.1
- Fixed an issue in WebHook.Listen not working on Windows.
Example Databases
- CURL/Email/Office 365 oAuth SMTP
- WebHook/Trigger script with Webhook/WebHook Listener
- WebHook/WebHook Chat/WebHook Chat
- WebHook/WebHook to serve html
- WebHook/WebHook
Blog Entries
- MBS FileMaker Plugin, version 13.1pr1
- Trigger Scripts via WebHook
- SMTP with OAuth for Office 365 in FileMaker
- MBS FileMaker Plugin, version 12.5pr2
- MBS FileMaker Plugin, version 12.1pr7
- WebHook Introduction
This function checks for a license.
Created 13th October 2021, last changed 24th January 2023