mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-06 14:10:37 +00:00
Merge branch master into dbus_mentions_attachments
This commit is contained in:
commit
cff5ec9a9f
73 changed files with 3294 additions and 1573 deletions
|
@ -44,6 +44,64 @@ Phone numbers always have the format +<countrycode><regional number>
|
|||
|
||||
== Methods
|
||||
|
||||
=== Control methods
|
||||
These methods are available if the daemon is started anonymously (without an explicit `-u USERNAME`).
|
||||
Requests are sent to `/org/asamk/Signal`; requests related to individual accounts are sent to
|
||||
`/org/asamk/Signal/_441234567890` where the + dialing code is replaced by an underscore (_).
|
||||
Only `version()` is activated in single-user mode; the rest are disabled.
|
||||
|
||||
link() -> deviceLinkUri<s>::
|
||||
link(newDeviceName<s>) -> deviceLinkUri<s>::
|
||||
* newDeviceName : Name to give new device (defaults to "cli" if no name is given)
|
||||
* deviceLinkUri : URI of newly linked device
|
||||
|
||||
Returns a URI of the form "tsdevice:/?uuid=...". This can be piped to a QR encoder to create a display that
|
||||
can be captured by a Signal smartphone client. For example:
|
||||
|
||||
`dbus-send --session --dest=org.asamk.Signal --type=method_call --print-reply /org/asamk/Signal org.asamk.Signal.link string:"My secondary client"|tr '\n' '\0'|sed 's/.*string //g'|sed 's/\"//g'|qrencode -s10 -tANSI256`
|
||||
|
||||
Exception: Failure
|
||||
|
||||
listAccounts() -> accountList<as>::
|
||||
* accountList : Array of all attached accounts in DBus object path form
|
||||
|
||||
Exceptions: None
|
||||
|
||||
register(number<s>, voiceVerification<b>) -> <>::
|
||||
* number : Phone number
|
||||
* voiceVerification : true = use voice verification; false = use SMS verification
|
||||
|
||||
Exceptions: Failure, InvalidNumber, RequiresCaptcha
|
||||
|
||||
registerWithCaptcha(number<s>, voiceVerification<b>, captcha<s>) -> <>::
|
||||
* number : Phone number
|
||||
* voiceVerification : true = use voice verification; false = use SMS verification
|
||||
* captcha : Captcha string
|
||||
|
||||
Exceptions: Failure, InvalidNumber, RequiresCaptcha
|
||||
|
||||
verify(number<s>, verificationCode<s>) -> <>::
|
||||
* number : Phone number
|
||||
* verificationCode : Code received from Signal after successful registration request
|
||||
|
||||
Command fails if PIN was set after previous registration; use verifyWithPin instead.
|
||||
|
||||
Exception: Failure, InvalidNumber
|
||||
|
||||
verifyWithPin(number<s>, verificationCode<s>, pin<s>) -> <>::
|
||||
* number : Phone number
|
||||
* verificationCode : Code received from Signal after successful registration request
|
||||
* pin : PIN you set with setPin command after verifying previous registration
|
||||
|
||||
Exception: Failure, InvalidNumber
|
||||
|
||||
version() -> version<s>::
|
||||
* version : Version string of signal-cli
|
||||
|
||||
Exceptions: None
|
||||
|
||||
=== Other methods
|
||||
|
||||
updateGroup(groupId<ay>, newName<s>, members<as>, avatar<s>) -> groupId<ay>::
|
||||
* groupId : Byte array representing the internal group identifier
|
||||
* newName : New name of group (empty if unchanged)
|
||||
|
@ -52,8 +110,11 @@ updateGroup(groupId<ay>, newName<s>, members<as>, avatar<s>) -> groupId<ay>::
|
|||
|
||||
Exceptions: AttachmentInvalid, Failure, InvalidNumber, GroupNotFound
|
||||
|
||||
updateProfile(newName<s>, about <s>, aboutEmoji <s>, avatar<s>, remove<b>) -> <>::
|
||||
* newName : New name for your own profile (empty if unchanged)
|
||||
updateProfile(name<s>, about<s>, aboutEmoji <s>, avatar<s>, remove<b>) -> <>::
|
||||
updateProfile(givenName<s>, familyName<s>, about<s>, aboutEmoji <s>, avatar<s>, remove<b>) -> <>::
|
||||
* name : Name for your own profile (empty if unchanged)
|
||||
* givenName : Given name for your own profile (empty if unchanged)
|
||||
* familyName : Family name for your own profile (empty if unchanged)
|
||||
* about : About message for profile (empty if unchanged)
|
||||
* aboutEmoji : Emoji for profile (empty if unchanged)
|
||||
* avatar : Filename of avatar picture for profile (empty if unchanged)
|
||||
|
@ -61,6 +122,12 @@ updateProfile(newName<s>, about <s>, aboutEmoji <s>, avatar<s>, remove<b>) -> <>
|
|||
|
||||
Exceptions: Failure
|
||||
|
||||
setExpirationTimer(number<s>, expiration<i>) -> <>::
|
||||
* number : Phone number of recipient
|
||||
* expiration : int32 for the number of seconds before messages to this recipient disappear. Set to 0 to disable expiration.
|
||||
|
||||
Exceptions: Failure
|
||||
|
||||
setContactBlocked(number<s>, block<b>) -> <>::
|
||||
* number : Phone number affected by method
|
||||
* block : false=remove block , true=block
|
||||
|
@ -107,6 +174,18 @@ sendGroupMessage(message<s>, attachments<as>, groupId<ay>) -> timestamp<x>::
|
|||
|
||||
Exceptions: GroupNotFound, Failure, AttachmentInvalid
|
||||
|
||||
sendContacts() -> <>::
|
||||
|
||||
Sends a synchronization message with the local contacts list to all linked devices. This command should only be used if this is the primary device.
|
||||
|
||||
Exceptions: Failure
|
||||
|
||||
sendSyncRequest() -> <>::
|
||||
|
||||
Sends a synchronization request to the primary device (for group, contacts, ...). Only works if sent from a secondary device.
|
||||
|
||||
Exception: Failure
|
||||
|
||||
sendNoteToSelfMessage(message<s>, attachments<as>) -> timestamp<x>::
|
||||
* message : Text to send (can be UTF8)
|
||||
* 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)
|
||||
|
@ -229,11 +308,59 @@ isGroupBlocked(groupId<ay>) -> state<b>::
|
|||
|
||||
Exceptions: None; for unknown groups false is returned
|
||||
|
||||
removePin() -> <>::
|
||||
|
||||
Removes registration PIN protection.
|
||||
|
||||
Exception: Failure
|
||||
|
||||
setPin(pin<s>) -> <>::
|
||||
* pin : PIN you set after registration (resets after 7 days of inactivity)
|
||||
|
||||
Sets a registration lock PIN, to prevent others from registering your number.
|
||||
|
||||
Exception: Failure
|
||||
|
||||
version() -> version<s>::
|
||||
* version : Version string of signal-cli
|
||||
|
||||
isRegistred -> result<b>::
|
||||
* result : Currently always returns true
|
||||
isRegistered() -> result<b>::
|
||||
isRegistered(number<s>) -> result<b>::
|
||||
isRegistered(numbers<as>) -> results<ab>::
|
||||
* number : Phone number
|
||||
* numbers : String array of phone numbers
|
||||
* result : true=number is registered, false=number is not registered
|
||||
* results : Boolean array of results
|
||||
|
||||
Exception: InvalidNumber for an incorrectly formatted phone number. For unknown numbers, false is returned, but no exception is raised. If no number is given, returns whether you are registered (presumably true).
|
||||
|
||||
addDevice(deviceUri<s>) -> <>::
|
||||
* deviceUri : URI in the form of tsdevice:/?uuid=... Normally received from Signal desktop or smartphone app
|
||||
|
||||
Exception: InvalidUri
|
||||
|
||||
listDevices() -> devices<as>::
|
||||
* devices : String array of linked devices
|
||||
|
||||
Exception: Failure
|
||||
|
||||
removeDevice(deviceId<i>) -> <>::
|
||||
* deviceId : Device ID to remove, obtained from listDevices() command
|
||||
|
||||
Exception: Failure
|
||||
|
||||
updateDeviceName(deviceName<s>) -> <>::
|
||||
* deviceName : New name
|
||||
|
||||
Set a new name for this device (main or linked).
|
||||
|
||||
Exception: Failure
|
||||
|
||||
uploadStickerPack(stickerPackPath<s>) -> url<s>::
|
||||
* stickerPackPath : Path to the manifest.json file or a zip file in the same directory
|
||||
* url : URL of sticker pack after successful upload
|
||||
|
||||
Exception: Failure
|
||||
|
||||
== Signals
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue