Skip to content

Rocket.chat

URL Format

rocketchat://[username@]rocketchat-host/token[/channel|@recipient]

URL Fields

  • UserName - Override webhook user
    Default: empty
    URL part: rocketchat://username@host:port/token/channel

  • Host - Rocket.chat server host (Required)
    URL part: rocketchat://username@host:port/token/channel

  • Port - Rocket.chat server port (Required)
    URL part: rocketchat://username@host:port/token/channel

  • TokenA - Rocket.chat server token (Required)
    URL part: rocketchat://username@host:port/tokenA/tokenB/channel

  • TokenB - Rocket.chat server token (Required)
    URL part: rocketchat://username@host:port/tokenA/tokenB/channel

  • Channel - Rocket.chat channel (Required)
    URL part: rocketchat://username@host:port/tokenA/tokenB/channel

Creating a Webhook in Rocket.chat

  1. Open up the chat Administration by clicking on Administration menu
Screenshot 1: Rocket.chat Administration
  1. Open Integrations and then click New
Screenshot 2: Rocket.chat Integrations
  1. Fill in the information for the webhook and click Save. Please don't forget to Enable your integration.
Screenshot 3: Rocket.chat Webhook
  1. If you did everything correctly, Rocket.chat will give you the URL and Token to your newly created webhook.
Screenshot 4: Rocket.chat Webhook
  1. Format the service URL
rocketchat://your-domain.com/8eGdRzc9r4YYNyvge/2XYQcX9NBwJBKfQnphpebPcnXZcPEi32Nt4NKJfrnbhsbRfX
                             └────────────────────────────────────────────────────────────────┘
                                                           token

Additional URL configuration

Rocket.chat provides functionality to post as another user or to another channel / user, compared to the webhook configuration.

To do this, you can add a sender and/or channel / receiver to the service URL.

rocketchat://[email protected]/8eGdRzc9r4YYNyvge/2XYQcX9NBwJBKfQnphpebPcnXZcPEi32Nt4NKJfrnbhsbRfX/shoutrrrChannel
             └──────────┘                 └────────────────────────────────────────────────────────────────┘ └─────────────┘
                sender                                                   token                                   channel

rocketchat://[email protected]/8eGdRzc9r4YYNyvge/2XYQcX9NBwJBKfQnphpebPcnXZcPEi32Nt4NKJfrnbhsbRfX/@shoutrrrReceiver
             └──────────┘                 └────────────────────────────────────────────────────────────────┘ └───────────────┘
                sender                                                   token                                    receiver

For more Rocket.chat webhooks options see official guide.

Released under the MIT License