# BotsResource

Canonical page: https://docs.ovok.com/java-sdk/reference/bots-resource

```java
public final class BotsResource
```

Runs Ovok bots. Get it from [`Ovok.bots()`](/java-sdk/reference/ovok#bots).

## Methods [#methods]

### execute [#execute]

```java
public JsonNode execute(String identifier, Object input) throws IOException, InterruptedException
```

Runs a bot (`POST /bots?identifier=...`).

**Parameters:**

- `identifier`: the bot identifier
- `input`: the bot input

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

```java
public JsonNode execute(
        String identifier,
        Object input,
        RequestOptions options) throws IOException, InterruptedException
```

Runs a bot (`POST /bots?identifier=...`).

**Parameters:**

- `identifier`: the bot identifier
- `input`: the bot input
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response
