Skip to content

Commit f976263

Browse files
author
Bernhard B
committed
Merge branch 'master' of github.com:bbernhard/signal-cli-rest-api
2 parents bede4bc + 092fb1a commit f976263

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/EXAMPLES.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ e.g:
4949

5050
`curl -X POST -H "Content-Type: application/json" -d '{"message": "<message>", "base64_attachments": ["<base64 encoded attachment>"], "number": "<number>", "recipients": ["<recipient1>", "<recipient2>"]}' 'http://127.0.0.1:8080/v2/send'`
5151

52+
- Send a message with a base64 encoded attachment
53+
54+
e.g:
55+
`TMPFILE="$(base64 image_9.jpg)"`
56+
`curl -X POST -H "Content-Type: application/json" -d '{"message": "Test image", "base64_attachments": ["'"${TMPFILE}"'"], "number": "+431212131491291", "recipients": ["+4354546464654"]}' 'http://127.0.0.1:8080/v2/send'`
57+
58+
For sending larger files such as a 4MB mp4 video file:
59+
60+
`TMPFILE="$(base64 video.mp4)"`
61+
`echo '{"message": "Test video", "base64_attachments": ["'"$TMPFILE"'"], "number": "+431212131491291", "recipients": ["+4354546464654"]}' | curl -X POST -H "Content-Type: application/json" -d @- 'http://127.0.0.1:8080/v2/send'`
62+
5263
- Send a message to a group
5364

5465
The group id can be obtained via the "List groups" REST call.

0 commit comments

Comments
 (0)