Description Usage Arguments Details Value Examples
View source: R/send_rocket_attachment.R
send_rocket_attachment
Sends an attachment to a user or channel or group
1 | send_rocket_attachment(url, user_id, auth_token, receiver, filename)
|
url |
The url of the rocket.chat server (has to be complete, with http or https). |
user_id |
The users ID retrieved from 'get_rocket_credentials'. |
auth_token |
The users authentication Token retrieved from 'get_rocket_credentials'. |
receiver |
The id of the user/channel/group that will receive the attachment (with '@' for users and '#' for channels and users) |
filename |
The path of the file to be uploaded. |
This function only returns the status code of the POST request to upload an attachment for any user or channel or group in a Rocket.chat server.
This function only returns the answer of the POST request
1 2 3 4 5 6 7 8 | ## Not run:
send_rocket_attachment(url = 'http://localhost:8000/',
user_id = '<ROCKET_USER_ID>',
auth_token = '<ROCKET_USER_AUTH_TOKEN>',
receiver = '#general',
filename = 'path_to_file')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.