> For the complete documentation index, see [llms.txt](https://docs.tailent.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tailent.com/getting-started/tailent-gateway-agent/tap-gateway-agent-api-references/get-bot-response.md).

# Get Bot Response

This endpoint can be used to retreive the bot response (as posted in the bot logic, using either scripting or Set HTTP Response actions).

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](https://docs.tailent.com/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'
```
