WebHook.Check
-------------

Checks whether a web hook has been triggered.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WebHook](component_WebHook.md) | [11.5](newinversion115.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "WebHook.Check" { ; WebHook } ) 

**MBS**( **"WebHook.Check";** /\* Checks whether a web hook has been triggered. \*/  
**$WebHook**) /\* Optional; The reference number of the web hook.  
Pass a web hook reference if you like to check only for that web hook.  
If parameter is empty or missing, we return all pendign web requests. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| WebHook | The reference number of the web hook.   Pass a web hook reference if you like to check only for that web hook.   If parameter is empty or missing, we return all pendign web requests. | $webhook | Optional      Added in version **14.4**. |

### Result

Returns list or error.

### Description

Checks whether a web hook has been triggered.  
Returns list of web request reference numbers for new requests received.  
  
Please check them with WebRequest functions and then call later [WebRequest.Release](WebRequestRelease.md) to free object.  
This lets you open a network port for incoming HTTP Requests, e.g. from a web service like your phone system.  
### Examples

Looping script to process incoming requests:

 Loop  
 # check for pending requests  
 Set Variable \[ $list ; Value: MBS ( "WebHook.Check" ) \]   
 #   
 # loop over pending requests  
 Set Variable \[ $count ; Value: ValueCount($list ) \]   
 Set Variable \[ $index ; Value: 1 \]   
 If \[ $index ≤ $count \]   
 Loop  
 Set Variable \[ $ref ; Value: GetValue($list ; $index ) \]   
 Perform Script \[ Specified: From list ; “WebHookReceived on server” ; Parameter: $ref \]  
 #   
 # next  
 Set Variable \[ $index ; Value: $index + 1 \]   
 Exit Loop If \[ $index &gt; $count \]   
 End Loop  
 End If  
 #   
 Pause/Resume Script \[ Duration (seconds): ,1 \]   
End Loop  
### See also

- [WebHook.SetScript](WebHookSetScript.md)
- [WebRequest.GetState](WebRequestGetState.md)
- [WebRequest.Release](WebRequestRelease.md)

### Example Databases

- [WebHook/WebHook](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WebHook/WebHook.shtml#9ScriptAnchor_)

### Blog Entries

- [New in MBS FileMaker Plugin 12.0](https://www.mbsplugins.de/archive/2022-01-31/New_in_MBS_FileMaker_Plugin_12/monkeybreadsoftware_blog_filemaker)
- [WebHook Introduction](https://www.mbsplugins.de/archive/2021-10-28/WebHook_Introduction/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 13th October 2021 , last changed 2nd August 2024

  
[WebDownloadDelegate.textEncodingName](WebDownloadDelegatetextEncodingName.md) - [WebHook.Create](WebHookCreate.md)

[HTML Version](WebHookCheck.shtml)