Mattermost Peer-to-Peer Forum

Mattermost Command - Custom Headers?


#1

Is there a way to customize the http header for a Mattermost custom command? Here is a curl command that works from a bash console:
curl -v -H “Content-Type: application/json” -X GET -H “X-Redmine-API-Key: xxxxxxxxxxxxxxxxxxxx” http://localhost/redmine/users.json.

This is a GET to a redmine instance via the redmine API. The redmine API requires an API-key as above.

Given the similarity to Slash commands I pursued this with Slack support. They got right back to me and indicated that they cannot do this and that I would need to use a translator service like Waylay. This is not doable for me as I am working in a private network, and I am not able to open anything up to internet incoming.

So I am asking if it is the same situation with Mattermost.

I am running a Mattermost instance with Gitlab on a private server.

Mattermost version 4.10.1
Database schema 4.10.0
Postgres

I also have success with a GET by using Huginn. Huginn is able to explicitly customize http headers, etc. It is arduous to set up but it works. I guess I could relay commands from Mattermost thru Huginn, but that’s a bunch of work for an app that is supposed to be easy to set up (Mattermost) :).


#3

Hi @bigmtnbikey,

We have a feature request ticket open that seems to be related to the question you have: https://mattermost.uservoice.com/forums/306457-general/suggestions/35191429-add-optional-custom-headers-to-slash-command-reque.

Here is also more information on custom commands: