Which URL actions are supported?

Threema supports the following URL actions:

  • Adding an ID to the contact list

    threema://add?id=ABCDEFGH

    Adds the given ID to the contact list if it's not already on it, and shows the contact details.

  • Composing a message

    For all URLs below, a parameter “id” can optionally be added to specify the target ID. If the ID is not supplied, a contact picker will be shown first. In all cases, user confirmation (pressing the “Send” button) will be required before the message/image is actually sent.

    threema://compose?text=Hello

    Opens a message composer and puts the given text in the input box.

    threema://compose?image=pasteboard (only on iOS)

    Accepts an (unencrypted) image on the general pasteboard. A message composer is opened and a preview of the image appears. The user can then send the image by tapping the appropriate button.

    threema://compose?image=pasteboard&key=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef (only on iOS)

    Allows passing encrypted image data through the general pasteboard. The image data must be encrypted with AES256 in CBC mode with PKCS7 padding and a zero IV. A new, random key should be used for each invocation.The key must be given in hex. The pasteboard type (UTI) must be “ch.threema.app.imgenc”. If the image data has been successfully decrypted, a message composer is opened and a preview of the image appears. The user can then send the image by tapping the appropriate button.

  • File URL handling (only on iOS)

    Threema accepts the UTI “public.image”. If an image file is opened with Threema (via UIDocumentInteractionController), a contact picker is shown. Once the user has chosen a contact, the message composer is opened and a preview of the image appears. The user can then send the image by tapping the appropriate button.

Other useful topics