WebHook.GetPort
---------------

Queries listening port for a web hook.

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

MBS( "WebHook.GetPort"; WebHook ) 

**MBS**( **"WebHook.GetPort";** /\* Queries listening port for a web hook. \*/  
**$WebHook**) /\* The reference number of the web hook. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| WebHook | The reference number of the web hook. | $webhook |

### Result

Returns number or error.

### Description

Queries listening port for a web hook.  
Port is set when calling [WebHook.Listen](WebHookListen.md) function.  
### See also

- [WebHook.GetMode](WebHookGetMode.md)
- [WebHook.GetSSL](WebHookGetSSL.md)
- [WebHook.GetTag](WebHookGetTag.md)
- [WebHook.List](WebHookList.md)
- [WebHook.Listen](WebHookListen.md)
- [WebHook.SetMode](WebHookSetMode.md)

### Release notes

- **Version 12.5**
    - Changed [WebHook.Listen](https://www.mbsplugins.eu/WebHookListen.shtml) to allow passing zero as port number to pick a random port, which you then query via [WebHook.GetPort](https://www.mbsplugins.eu/WebHookGetPort.shtml).

### Example Databases

- [WebHook/Trigger script with Webhook/WebHook Listener](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WebHook/Trigger%20script%20with%20Webhook/WebHook%20Listener.shtml#1ScriptAnchor_)
- [WebHook/WebHook Chat/WebHook Chat](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WebHook/WebHook%20Chat/WebHook%20Chat.shtml#1ScriptAnchor_)

### Blog Entries

- [Trigger Scripts via WebHook](https://www.mbsplugins.de/archive/2022-12-08/Trigger_Scripts_via_WebHook/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.5pr2](https://www.mbsplugins.de/archive/2022-10-06/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 13th October 2021 , last changed 25th October 2021

  
[WebHook.GetMode](WebHookGetMode.md) - [WebHook.GetPrivateKeyFile](WebHookGetPrivateKeyFile.md)

[HTML Version](WebHookGetPort.shtml)