Configuration
The extension uses TYPO3 extension configuration under the actual key
notifications_. Configure the values in your TYPO3 installation's
config/. The extension repository also contains
Configuration/ as a reference; it is not loaded
by TYPO3 automatically.
Example configuration
<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['notifications_slack'] = [
'botToken' => getenv('SLACK_BOT_TOKEN') ?: '',
'webhooks' => [
'monitoring' => getenv('SLACK_WEBHOOK_MONITORING') ?: '',
'security' => getenv('SLACK_WEBHOOK_SECURITY') ?: '',
],
'apiEndpoint' => 'https://slack.com/api',
'timeout' => 10,
'connectTimeout' => 5,
];
Configuration options
| Key | Type / default | Purpose |
|---|---|---|
bot | string | Slack Bot Token, read when an API message is sent but the token is not explicitly specified. |
webhooks | array / empty | Map of safe alias names to complete HTTPS webhook URLs. |
api | string / https:// | Slack API root; GovSlack: https://. |
timeout | integer / 10 | Overall HTTP request timeout (seconds). |
connect | integer / 5 | HTTP connection timeout (seconds). |
Both timeout values must be integers from 1 to 120. The endpoint
setting is restricted to the two documented hosts. The client appends
/chat. automatically; do not append it in your configuration.
Named webhooks
The webhooks map may contain multiple destinations. An alias such
as monitoring can then be selected in application code:
use Lex\Notifications\Slack\Configuration\SlackRoute;
$route = SlackRoute::webhookNamed('monitoring');
// Equivalent route string: 'webhook:monitoring'
Aliases must start with a letter and can contain letters, numbers, underscores, and hyphens (maximum 64 characters). A named webhook URL is resolved from the configuration when the transport sends the message.
Using environment variables
The configuration can load its secrets from environment variables or another protected provider. Configure both the HTTP PHP process and the CLI/queue workers to receive the same secrets.
Do not commit tokens or webhook URLs, disclose configuration dumps, or
make additional. publicly readable. See Security.
GovSlack
For GovSlack deployments, configure:
'apiEndpoint' => 'https://slack-gov.com/api',
Use the official GovSlack Incoming Webhook host
https:// for webhook routes. The extension validates
approved Slack/GovSlack hosts and requires HTTPS.
Note
These values are accepted by the source code. Availability of GovSlack methods, workspace access, and permission grants depends on your Slack organization and application configuration.