Skip to content

Commit

Permalink
Merge branch 'master' of github.com:bbernhard/signal-cli-rest-api
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernhard B committed Mar 6, 2022
2 parents bede4bc + 092fb1a commit f976263
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ e.g:

`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'`

- Send a message with a base64 encoded attachment

e.g:
`TMPFILE="$(base64 image_9.jpg)"`
`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'`

For sending larger files such as a 4MB mp4 video file:

`TMPFILE="$(base64 video.mp4)"`
`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'`

- Send a message to a group

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

0 comments on commit f976263

Please sign in to comment.