2 vim:set ts=4 sw=4 tw=82 noet:
10 DBus API for signal-cli - A commandline and dbus interface for the Signal messenger
14 *signal-cli* [--config CONFIG] daemon --dbus-system
16 *dbus-send* --system --type=method_call --print-reply --dest="org.asamk.Signal" /org/asamk/Signal org.asamk.Signal.<method> [string:<string argument>] [array:<type>:<array argument>]
21 See signal-cli (1) for details on the application.
23 This documentation handles the supported methods when running signal-cli as a DBus daemon.
25 The method are described as follows:
27 method(arg1<type>, arg2<type>, ...) -> return<type>
29 Where <type> is according to DBus specification:
33 * <aay> : Array of Byte Arrays
36 * <x> : Signed 64 bit integer
37 * <> : no return value
39 Exceptions are the names of the Java Exceptions returned in the body field. They typically contain an additional message with details. All Exceptions begin with "org.asamk.Signal.Error." which is omitted here for better readability.
41 Phone numbers always have the format +<countrycode><regional number>
45 updateGroup(groupId<ay>, newName<s>, members<as>, avatar<s>) -> groupId<ay>::
46 * groupId : Byte array representing the internal group identifier
47 * newName : New name of group (empty if unchanged)
48 * members : String array of new members to be invited to group
49 * avatar : Filename of avatar picture to be set for group (empty if none)
51 Exceptions: AttachmentInvalid, Failure, InvalidNumber, GroupNotFound
53 updateProfile(newName<s>, about <s>, aboutEmoji <s>, avatar<s>, remove<b>) -> <>::
54 * newName : New name for your own profile (empty if unchanged)
55 * about : About message for profile (empty if unchanged)
56 * aboutEmoji : Emoji for profile (empty if unchanged)
57 * avatar : Filename of avatar picutre for profile (empty if unchanged)
58 * remove : Set to 1 if the existing avatar picture should be removed
62 setContactBlocked(number<s>, block<b>) -> <>::
63 * number : Phone number affected by method
64 * block : 0=remove block , 1=blocked
66 Messages from blocked numbers will no longer be forwarded via DBus.
68 Exceptions: InvalidNumber
70 setGroupBlocked(groupId<ay>, block<b>) -> <>::
71 * groupId : Byte array representing the internal group identifier
72 * block : 0=remove block , 1=blocked
74 Messages from blocked groups will no longer be forwarded via DBus.
76 Exceptions: GroupNotFound
78 joinGroup(inviteURI<s>) -> <>::
79 * inviteURI : String starting with https://signal.group which is generated when you share a group link via Signal App
83 quitGroup(groupId<ay>) -> <>::
84 * groupId : Byte array representing the internal group identifier
86 Note that quitting a group will not remove the group from the getGroupIds command, but set it inactive which can be tested with isMember()
88 Exceptions: GroupNotFound, Failure
90 isMember(groupId<ay>) -> active<b>::
91 * groupId : Byte array representing the internal group identifier
93 Note that this method not raise an Exception for a non-existing/unknown group but will simply return 0 (false)
95 sendEndSessionMessage(recipients<as>) -> <>::
96 * recipients : Array of phone numbers
98 Exceptions: Failure, InvalidNumber, UntrustedIdentity
100 sendGroupMessage(message<s>, attachments<as>, groupId<a>) -> timestamp<x>::
101 * message : Text to send (can be UTF8)
102 * attachments : String array of filenames to send as attachments (passed as filename, so need to be readable by the user signal-cli is running under)
103 * groupId : Byte array representing the internal group identifier
104 * timestamp : Can be used to identify the corresponding signal reply
106 Exceptions: GroupNotFound, Failure, AttachmentInvalid
108 sendNoteToSelfMessage(message<s>, attachments<as>) -> timestamp<x>::
109 * message : Text to send (can be UTF8)
110 * attachments : String array of filenames to send as attachments (passed as filename, so need to be readable by the user signal-cli is running under)
111 * timestamp : Can be used to identify the corresponding signal reply
113 Exceptions: Failure, AttachmentInvalid
115 sendMessage(message<s>, attachments<as>, recipient<s) -> timestamp<x>::
116 sendMessage(message<s>, attachments<as>, recipients<as>) -> timestamp<x>::
117 * message : Text to send (can be UTF8)
118 * attachments : String array of filenames to send as attachments (passed as filename, so need to be readable by the user signal-cli is running under)
119 * recipient : Phone number of a single recipient
120 * recipients : Array of phone numbers
121 * timestamp : Can be used to identify the corresponding signal reply
123 Depending on the type of the recipient field this sends a message to one or multiple recipients.
125 Expections: AttachmentInvalid, Failure, InvalidNumber, UntrustedIdentity
127 getContactName(number<s>) -> name<s>::
128 * number : Phone number
129 * name : Name set in contacts (setContacts) or if not set the profile name
131 setContactName(number<s>,name<>) -> <>::
132 * number : Phone number
133 * name : Name to be set in contacts (in local storage with signal-cli)
135 getGroupIds() -> groupList<aay>::
136 groupList : Array of Byte arrays representing the internal group identifiers
138 All groups known are returned, regardsless of their active or blocked status. To query that use isMember() and isGroupBlocked()
140 getGroupName(groupId<ay>) -> groupName<s>::
141 groupName : The display name of the group
142 groupId : Byte array representing the internal group identifier
144 Exceptions: None, if the group name is not found an empty string is returned
146 getGroupMembers(groupId<ay>) -> members<as>::
147 members : String array with the phone numbers of all active members of a group
148 groupId : Byte array representing the internal group identifier
150 Exceptions: None, if the group name is not found an empty array is returned
152 listNumbers() -> numbers<as>::
153 numbers : String array of all known numbers
155 This is a concatenated list of all defined contacts as well of profiles known (e.g. peer group members or sender of received messages)
157 getContactNumber(name<s>) -> numbers<as>::
158 * numbers : Array of phone number
159 * name : Contact or profile name ("firstname lastname")
161 Searches contacts and know profiles for a given name and returns the list of all known names. May result in e.g. two entries if a contact and profile name is set.
163 isContactBlocked(number<s>) -> state<b>::
164 * number : Phone number
165 * state : 1=blocked, 0=not blocked
167 Exceptions: None, for unknown numbers 0 (false) is returned
169 isGroupBlocked(groupId<ay>) -> state<b>::
170 * groupId : Byte array representing the internal group identifier
171 * state : 1=blocked, 0=not blocked
173 Exceptions: None, for unknown groups 0 (false) is returned
175 version() -> version<s>::
176 * version : Version string of signal-cli
178 isRegistred -> result<b>::
179 * result : Currently always returns 1=true
183 SyncMessageReceived (timestamp<x>, sender<s>, destination<s>, groupId<ay>,message<s>, attachments<as>)::
184 The sync message is received when the user sends a message from a linked device.
186 ReceiptReceived (timestamp<x>, sender<s>)::
187 * timestamp : Integer value that can be used to associate this e.g. with a sendMessage()
188 * sender : Phone number of the sender
190 This signal is sent by each recipient (e.g. each group member) after the message was successfully delivered to the device
192 MessageReceived(timestamp<x>, sender<s>, groupId<ay>, message<s>, attachments<as>)::
193 * timestamp : Integer value that is used by the system to send a ReceiptReceived reply
194 * sender : Phone number of the sender
195 * groupId : Byte array representing the internal group identifier (empty when private message)
196 * message : Message text
197 * attachments : String array of filenames for the attachments. These files are located in the signal-cli storage and the current user needs to have read access there
199 This signal is received whenever we get a private message or a message is posted in a group we are an active member
203 Maintained by AsamK <asamk@gmx.de>, who is assisted by other open source contributors.
204 For more information about signal-cli development, see
205 <https://github.com/AsamK/signal-cli>.