Skip to content

Tim-Schwalbe/python_mattermost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Python Mattermost File send CLI for API V4

This is a simple CLI to upload files to mattermost

Supported API Version: V4

Just do python send_file.py -h

Mattermost File send CLI for API V4

positional arguments:
  SERVER_URL            The Mattermost Server Url
  ACCESS_TOKEN          Personal Access Token to Authorize
  Channel_ID            The Channel ID you want to send the file to.
  FILE_PATH             The Path to the file you want to send.

optional arguments:
  -h, --help            show this help message and exit
  -m MESSAGE, --message MESSAGE
                        Message that is attached to the uploaded file.
  -am ATTACHMENT_MESSAGE, --attachment_message ATTACHMENT_MESSAGE
                        Message that is attached to the uploaded file.
  -c HEXCODE, --color HEXCODE
                        Attachment Box Color as HEX Code. Default: #00FF00

To use it you need a personal access token. https://docs.mattermost.com/developer/personal-access-tokens.html
The Channel ID can be found in the channel settings -> 'View Info'

You can choose with the optional arguments to send a normal message or a message with a specific color as attachment box.

About

Python, Mattermost, send File

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages