Small python library for the Signal Cli REST API
If you have set up the REST API already, you can start sending and receiving messages in Python!
Intialize the client
# Seperated for clarity
SERVER = "http://localhose:8080" # Your server address and port
SERVER_NUMBER ="+123456789" # The phone number you registered with the API
signal = SignalCliRestApi(SERVER,SERVER_NUMBER)
Send a message
myMessage = "Hello World" # Your message
myFriendSteve = +987654321 # The number you want to message (must be registered with Signal)
sendMe = signal.send_message(message=myMessage,recipients=myFriendSteve)
receive messages
myMessages = signal.receive(send_read_receipts=True) # Send read receipts so everyone knows you have seen their message
Anything that was already part of the package before I added stuff should work, but I haven't fully tested all the ones I have added, which is why I haven't tried to merge yet! If an endpoint is not listed, assume it is not added.
| Service | Status | Function Name | Notes |
|---|---|---|---|
| about | Working | about() | Was already here. |
| No other general endpoints have been added. |
No device endpoints have been added.
No accounts endpoints have been added.
| Service | Status | Function Name | Notes |
|---|---|---|---|
| GET groups | Working | list_groups() | |
| POST groups | In Progress | create_group() | Have not run into any issues yet |
| GET group | Working | get_group() | Want to try messing with the group IDs to see how it reacts |
| PUT group | Working | update_group() | Images now work |
| DELETE group | In Progress | delete_group() | Need to try deleting a group that I do not own |
| POST group admins | In Progress | add_group_admins() | Need to try different number types and formats |
| DELETE group admins | In Progress | remove_group_admins() | Need to try different number types and formats |
| POST block group | Untested | block_group() | Need a group I didn't create to test with |
| POST join group | Untested | join_group() | Need a group I didn't create to test with |
| POST group members | In Progress | add_group_members() | Need to try different number types and formats |
| DELETE group members | In Progress | remove_group_members() | Need to try different number types and formats |
| POST quit group | Untested | leave_group() | Need a group I didn't create to test with |
| Service | Status | Function Name | Description |
|---|---|---|---|
| receive | Working | receive() | Was working when I got here, added some more args and a docstring |
| send | Working* | send_message() | Have not tested with API V1 |
| Service | Status | Function Name | Description |
|---|---|---|---|
| attachments | Working | list_attachments() | Converted to new sender |
| GET attachment | Working | get_attachment() | Converted to new sender |
| DELETE attachment | Working | delete_attachment() | Haven't touched |
| Service | Status | Function Name | Description |
|---|---|---|---|
| profiles | Testing | update_profile | Converted to new sender, no issues yet |
| Service | Status | Function Name | Description |
|---|---|---|---|
| identities | Working | list_identities() | |
| trust identities | In Progress | verify_identity() | Not sure if this should be renamed, also had some issues with the trust all known keys |
| Service | Status | Function Name | Description |
|---|---|---|---|
| POST reaction | Working | add_reaction() | |
| DELETE reaction | Working | remove_reaction() |
| Service | Status | Function Name | Description |
|---|---|---|---|
| receipts | In Progress | send_receipt() |
| Service | Status | Function Name | Description |
|---|---|---|---|
| search | Working* | search() | Seems to only work with numbers in your account region? |
No sticker pack endpoints have been added.
| Service | Status | Function Name | Description |
|---|---|---|---|
| GET contacts | Working | get_contacts() | |
| POST contacts | Untested | update_contact() | Must have API set up as main device, which mine is not |
| sync contacts | Untested | sync_contacts() | Must have API set up as main device, which mine is not |