Skip to content
SoulFire LogoSoulFire

Mouse click

POST
/v1/instances/{instance_id}/bots/{bot_id}/mouse:click

Simulates a mouse click in the game world. Left click: attack entity or start breaking block. Right click: use item or interact with entity/block. The bot must be online with valid player, level, and gameMode.

Authorization

headerAuthorizationBearer <JWT>

Preferred API authentication. Use a JWT with the api audience.

Path Parameters

instance_id*string

The UUID of the SoulFire instance containing the bot.

Formatuuid
bot_id*string

The profile UUID of the bot performing the click.

Formatuuid

Request Body

application/json
  1. body

Request to simulate a mouse click action in the game world. Used for attacking entities, breaking blocks, using items, and interacting with blocks/entities.

button*string

Which mouse button to simulate clicking.

Value in"MOUSE_BUTTON_UNSPECIFIED""LEFT_BUTTON""RIGHT_BUTTON"

Response Body

Response for mouse click action.

application/json
  1. response

Response for mouse click action.

success*boolean

Whether the click action was successfully performed.

error?|

Error message if success is false. Possible errors: "Invalid mouse button"

Example Request
curl -X POST 'http://127.0.0.1:38765/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/bots/497f6eca-6276-4993-bfeb-53cbbbba6f08/mouse:click' \
  -H 'Content-Type: application/json' \
  -d '{
  "button": "MOUSE_BUTTON_UNSPECIFIED"
}'
Example Response
{
  "success": true,
  "error": "string"
}

Was this page helpful?