# Get Bot Response

This endpoint can be accessed repeatedly as the bot might update it's response multiple times in a single run instance. **Only the last update is available**.

<pre class="language-http"><code class="lang-http"><strong>[GET] https://localhost:65001/Status/[guid]
</strong></code></pre>

## Request parameters

The only request parameters required for this operation is the **guid** of the target bot instance. For instance:

```
[GET] https://localhost:65001/Status/78bd048b-6847-4056-8a74-3f71b5fc1271
```

## Request headers

**accessToken -** This operation requires to include the access token associated with the bot instance (obtained as a response from the [Start Session Bot](/getting-started/tailent-gateway-agent/tap-gateway-agent-api-references/start-session-bot.md) request. Failure to provide the correct access token will result in a **401 Unauthorized** response.

## Request body

This is a simple GET request that does not require a body.

## Returns

The TGA should reply with a code 200 and the bot instance details, along with the output, in JSON format:

```json
{
	"guid": "2777f2d5-dbf1-41a0-ad1a-b2c9b9388baf",
	"status": "Running",
	"path": "C:\\Tailent\\Test\\Test.tap",
	"start": "2024-10-09T05:33:16.4779509-07:00",
	"output": "\"\"Some String Response\"\""
}
```

**guid -** represents the bot instance guid, which is generated with the **Start Session Bot** request.

**status** - represents the current status of the bot; this can be Stopped or Running.

**path** - represents the path of the .tap automation file

**start** - represents the starting time of the bot instance.

**output** - is the serialized string form of whatever object was set as the response in the bot logic.

## Example curl request

```sh
curl --request GET \
  --url https://tap.gateway:port/Status/2777f2d5-dbf1-41a0-ad1a-b2c9b9388baf \
  --header 'accessToken: AiUAOWUjyvZSRkabP9208JguJ4NUYXktMAteQVZZDoHfRJ4FTk46CrYuBZmiK1fWkVCn39BGYItxtHoYBTKlfO8bLE8avBENhOaQ9kIk6MuEgpA3HnlT5PKRhAwCQM4U'
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tailent.com/getting-started/tailent-gateway-agent/tap-gateway-agent-api-references/get-bot-response.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
