# 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](/docs/service/einstein-bot-api/guide/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](/docs/service/einstein-bot-api/guide/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.
