---
schema_version: "1"
id: db1cce7ffbc9b8d8be0fc7ee2cbd334cf6ba54b39b9d9c3baae3a2fb3d14e580
title: Set Up the Dependency and Config Variables
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/bot-api/einstein-bot/guides/sdk/sdk-set-up.md
canonical_url: https://developer.salesforce.com/docs/service/einstein-bot-api/guide/sdk-set-up.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 19fb9b7777390fdd4b2d71cc1a690e8201b845d58b13035c8c912cf74f31263b
products:
  - Einstein Bots API and SDK
  - Enstein Bot API and SDK
---
# Set Up the Dependency and Config Variables

To run the Einstein Bots SDK, add this POM dependency to your `pom.xml`. For `<version>`, use the latest [Einstein Bots SDK Java version](https://mvnrepository.com/artifact/com.salesforce.einsteinbot/einstein-bot-sdk-java).

```xml
<dependency>
  <groupId>com.salesforce.einsteinbot</groupId>
  <artifactId>einstein-bot-sdk-java</artifactId>
  <version>${einstein-bot-sdk-java-version}</version>
</dependency>
```

Then set up these configuration variables.

```java
private final String basePath = "BOT_RUNTIME_URL";

private final String orgId = "YOUR_ORG_ID";
private final String botId = "YOUR_BOT_ID";
private final String forceConfigEndPoint = "MY_DOMAIN_LOGIN_URL";

private final String loginEndpoint = "SALESFORCE_LOGIN_END_POINT";
private final String connectedAppId = "YOUR_CONNECTED_APP_ID";
private final String secret = "YOUR_CONNECTED_APP_SECRET";
private final String userId = "YOUR_SALESFORCE_LOGIN_USER";

private final String privateKeyFilePath =
    "/path/to/YOUR_CONNECTED_APP_PRIVATE_KEY.der";
```

Here’s how you find the configuration values.

- `basePath`: The runtime base URL found in the **Add Connection** dialog when you add the connected app to the bot. See [Get Started with Einstein Bots API](https://developer.salesforce.com/docs/service/einstein-bot-api/prerequisites.md).
- `orgId`: The 18 character org ID of the Salesforce org that is associated with the bot. To get the org ID:
  1. [Find your Salesforce Organization ID](https://help.salesforce.com/s/articleView?id=000325251&type=1) (15 characters long).
  2. Then convert it from the 15 to 18 character version. You can find Salesforce org ID converters using any search engine.
- `botId`: The bot ID found on the [Bot Overview Page](https://help.salesforce.com/s/articleView?id=service.bots_service_new_bot.htm&type=5).
- `forceConfigEndPoint`: The forceConfig endpoint found in the **Add Connection** dialog when you add the connected app to the bot. See [Get Started with Einstein Bots API](https://developer.salesforce.com/docs/service/einstein-bot-api/prerequisites.md).
- `loginEndpoint`: The Salesforce login endpoint. This is `https://login.salesforce.com` for the production org and `https://test.salesforce.com` for a sandbox org.
- `connectedAppId`: The consumer key of your [connector app setup](https://help.salesforce.com/s/articleView?id=xcloud.external_identity_login_step_2.htm&type=5).
- `secret`: The consumer secret of [connector app setup](https://help.salesforce.com/s/articleView?id=xcloud.external_identity_login_step_2.htm&type=5).
- `userId`: The user ID that you use to log in to Salesforce.
- `privateKeyFilePath`: Required for the JTW bearer flow. The private key that you used to create the public certificate and uploaded to the connected app for the [OAuth 2.0 JWT Bearer Flow for Server-to-Server Integration](https://help.salesforce.com/s/articleView?id=xcloud.remoteaccess_oauth_jwt_flow.htm&type=5). If your private key is in `PEM` format, convert it to a DER format using this command.

```bash
openssl pkcs8 -topk8 -inform PEM -outform DER \
    -in server.key -out src/test/resources/YourPrivateKey.der \
    -nocrypt.
```

NOTE: The private key is required only for the JWT bearer flow. If you aren’t using the JWT bearer flow, provide your own authorization mechanism.
