Configure your Bot for BDK 1.0
Bot Configuration guide for using the BDK and CLI Tool

Configure your Bot for BDK

This page is a configuration guide specific to using the Symphony BDK and the BDK CLI Tool.

Prerequisites

  • Node.JS
  • Java 8
  • Maven 3
  • Git

Install the BDK CLI

1
$ npm install -g symphony-bdk-cli
Copied!

Confirm all the dependencies are met:

1
$ symphony-bdk-cli --check-dependencies
Copied!

1. Generate your Bot

To generate a new bot project, enter the following:
1
$ symphony-bdk-cli --bot
Copied!
This will prompt with you a number of questions about your bot and Pod configuration. Type in your bot's metadata, use arrows to scroll, and press enter to move on to the next prompt:
1
✔ All Dependencies are met!
2
Setting up a new Bot application
3
Please answer the following questions
4
? What's the bot project name? (required) demo-bot2
5
? What's the bot username? (required) demobot2
6
? What's the bot email address? (required) [email protected]
7
? What's the base package? (required) com.symphony.documentation
8
? do you have an existing extension app?, if so what is the application ID declared in Symphony?
9
? Please Provide the Symphony Pod address this bot will serve develop2.symphony.com
10
11
⠋ Generating bot RSA keys
12
Generating RSA private key, 4096 bit long modulus
13
.............................++
14
............................................................++
15
✔ Keys generated.
16
✔ Ran install dependencies
17
Project ready DONE
18
********************************************************************************************
19
Please find below the bot public key, it must be added to the bot user account
20
please visit: https://developers.symphony.com/restapi/docs/rsa-bot-authentication-workflow to learn more.
21
********************************************************************************************
22
-----BEGIN PUBLIC KEY-----
23
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAzpiQJwzqUusEcAWqLKyM
24
lo8qZXUHhuT6kmb1UgSMxkZ9LZI7I1qfCD2v3HlBNj1fiTJkR08meCy//04DruBN
25
jiBbQTfJzryB+5xpu3RvUrhVhqRM8YsQHU/zo82q+XBe0LZa1E0OtH/Pc1B1HVvr
26
oOMFuSZJSwq4mB/eWz0gV+lK9FFS5crwFXZk7gfhIACcW4SCVKpj7iyu66iO/4ed
27
TqNwMsyiMY4XEFkfIlBy+nbdf3ciGG8e8JxeSlI5sU33u6IQ8JdFHslR1pN5vj++
28
3omwuSWPvsfixdEEq2HILKuYgX6jrwgWFLRbOs2WB7rP7O1R3RaoxeOU+N68ORSy
29
jALEaLppq+ephIajMgzNJJzmvFnoWrvfj+YuS6wn+6FWgSs6Mop+KoJaRo+94r4B
30
UQTe+nZDXASB1V0wSIXyohlwdrrAE+4F+UXzOybVAEaA6wxgWhTtWDJX9jrBM4Df
31
IaLg/Gn9qCwb3tUDSkRxKmSsLpbdNW7zmdm/JEYQfdoysiyb4/Nrt6DX+PYue7IP
32
xJ77TIQnl3SvmSeLqJSH65d76hf1f4Ld07cgGXZTVW+1LeDi2dIS01n40aAfyKNx
33
OZrGTfbHusNQFjy3UBmu8r2EaETbyCfUUmcye6Hqy3jKZ13ylvXr1AH4kRVG4TGs
34
cYtyBTslVQ5nUvIYPqPfrKECAwEAAQ==
35
-----END PUBLIC KEY-----
Copied!
Leave the answer to the application ID question blank and press enter to skip
Upon completion, the BDK CLI tool has created a public/private RSA key pair, a configuration and requirements file, as well as some default commands/datafeed event listeners.

2. Configure your Bot

Once you have your generated bot scaffold, the next step is to configure your bot user.
Ensure that your pod admin has created a corresponding service account on the admin portal of your Symphony Pod. Additionally, you must upload the generated RSA public key for the service account created.
Copy the entire contents of this RSA public key including the dashes on either side, and hand it to your pod admin and request for it to be saved against the respective service account you will be using.
Note: The bot username and bot email address entered to the CLI tool must match exactly the Basic Information shown in the Pod above.
Open your generated bot code in your favorite Java IDE and navigate to the bot-config.json file:
1
{
2
"sessionAuthHost": "develop2.symphony.com",
3
"sessionAuthPort": 443,
4
"keyAuthHost": "develop2.symphony.com",
5
"keyAuthPort": 443,
6
"podHost": "develop2.symphony.com",
7
"podPort": 443,
8
"agentHost": "develop2.symphony.com",
9
"agentPort": 443,
10
"appId": "",
11
"appPrivateKeyPath": "certs/",
12
"appPrivateKeyName": "demobot2_privatekey.pkcs8",
13
"botPrivateKeyPath": "certs/",
14
"botPrivateKeyName": "demobot2_privatekey.pkcs8",
15
"botUsername": "demobot2",
16
"authTokenRefreshPeriod": "30",
17
"authenticationFilterUrlPattern": "/secure/",
18
"showFirehoseErrors": false,
19
"connectionTimeout": 45000,
20
"botEmailAddress": "[email protected]"
21
}
Copied!
Confirm that the sessionAuthHost, keyAuthHost, and agentHost matches the correct Pod, Key Manager, and Agent endpoints respectfully. Again, confirm that the botUsername, and botEmailAddress matches the information entered in the admin portal on the Pod.

3. Build Your Bot

Now that you have generated and configured your Bot, move onto one of our BDK tutorials: