Create Instant Messenger Account for Threema / Threema Work¶
The following steps give you an overview of the steps necessary to create a bot for Threema / Threema Work. Since the user interface of Threema is regularly subject to change, the following steps are not entitlement to completeness or accurateness. However, we update the documentation on a regular basis and look forward to your hints.
- Brief overview: The installation takes place in multiple steps:
- Create a new bot account
- Create a new bot account on the Business Bot platform
- Set Webhook for the Threema Bot
Step 1: Create a new bot account for Threema¶
Open your web-browser and navigate to the ThreemaGateway website (https://gateway.threema.ch/en). If you don’t have an account, you have to register first. Once you have received the login credentials, login with your mail address and password.
Next step is to request a new Threema ID. Therefore you have to provide some information as shown in the screenshot below:
Once your Threema ID is created, you can set the profile picture and manage the balance for your account.
Step 2: Create a new bot account on the Business Bot platform¶
- Firstly, login to the Business Bot Platform
- Choose
Chatbot Administration
->Instant Messenger Accounts
->Create Bot Account
. The following data is required to create the bot account:
Field | Example value |
---|---|
Name: | MyThreemaBotKonto |
Description: | BotKonto for department Z |
Instant Messenger: | Threema |
- The bot account has been created and must still be configured with the instant messenger account information. To do this, click on the icon
Settings
and modify the following parameters:
Required Fields | Description | Example value |
---|---|---|
Threema.UserInfo.UserId | Threema Id for business use (begins with *) | e.g. *COMPANY |
Threema.User.PrivateKey.Secret | Threema private key password | lksjdfjlkjjsjjsjkd |
Threema.User.PrivateKey.String | Threema private key string (from privateKey.txt) | e.g. 6139ae.. (65 chars) |
Threema.User.PublicKey.String | Threema public key string (from publicKey.txt) | e.g. 6139ae.. (65 chars) |
Threema.ValidationToken | Similar to a key which is required by Threema to establish the connection with password protected webhook of the BBP | NoVerificationRequired |
Messenger.WebhookId | This webhook id is unique and generated by the Business Bot Platform (e.g. https://demo.mmgw.de/bbp/webhook/<webhook id>) | 42da2023-0187-4ab7-94ec-c843153bb36a |
The user account for the bot is now configured and will be used later when creating a bot instance for the Threema Messenger.
Step 3: Set Webhook for the Threema Bot¶
Next we need to get those messages forwarding to the Business Bot Platform. Firstly, you have to identify the webhook address on the Business Bot Platform.
To do this, login to the Business Bot Platform, navigate to Chatbot Administration
-> Chatbots
, then move with your mouse cursor over the bot name to display the webhook address of the bot.
Once you have figured out the webhook address, you have to setup this address on Threema Gateway. Login to Threema Gateway, go to menu ID
and enter the webhook address in field URL for incoming messages
. Click save to apply the changes and wait few minutes before continue with next steps.
The webhook configuration is now complete. In order to receive messages from the Threema Gateway, you have to get the webhook on the Business Bot Platform up and running. Therefore, just start the Bot.