Difference between revisions of "HTTP API/Bot Commands"
From SmartBots Developers Docs
(33 intermediate revisions by 3 users not shown) | |||
Line 16: | Line 16: | ||
{{API_Group|Status}} | {{API_Group|Status}} | ||
+ | {{API_Entry|HTTP Bot Command|status}} | ||
{{API_Entry|HTTP Bot Command|login}} | {{API_Entry|HTTP Bot Command|login}} | ||
{{API_Entry|HTTP Bot Command|logout}} | {{API_Entry|HTTP Bot Command|logout}} | ||
Line 24: | Line 25: | ||
{{API_Entry|HTTP Bot Command|reply_dialog}} | {{API_Entry|HTTP Bot Command|reply_dialog}} | ||
{{API_Entry|HTTP Bot Command|say_chat_channel}} | {{API_Entry|HTTP Bot Command|say_chat_channel}} | ||
+ | {{API_Entry|HTTP Bot Command|typing_start}} | ||
+ | {{API_Entry|HTTP Bot Command|typing_stop}} | ||
+ | |||
+ | {{API_Group|Friendship}} | ||
+ | {{API_Entry|HTTP Bot Command|cancel_friendship}} | ||
+ | {{API_Entry|HTTP Bot Command|edit_friendship}} | ||
+ | {{API_Entry|HTTP Bot Command|friendship_offer_accept}} | ||
+ | {{API_Entry|HTTP Bot Command|offer_friendship}} | ||
{{API_Group|Inventory}} | {{API_Group|Inventory}} | ||
− | {{API_Entry|HTTP Bot Command| | + | {{API_Entry|HTTP Bot Command|inventory_delete}} |
− | {{API_Entry|HTTP Bot Command| | + | {{API_Entry|HTTP Bot Command|inventory_give}} |
+ | {{API_Entry|HTTP Bot Command|inventory_list}} | ||
+ | {{API_Entry|HTTP Bot Command|inventory_offer_accept}} | ||
+ | {{API_Entry|HTTP Bot Command|inventory_to_prim}} | ||
+ | {{API_Entry|HTTP Bot Command|notecard_create}} | ||
+ | {{API_Entry|HTTP Bot Command|notecard_edit}} | ||
+ | {{API_Entry|HTTP Bot Command|notecard_read}} | ||
+ | {{API_Entry|HTTP Bot Command|texture_upload}} | ||
{{API_Group|Appearance}} | {{API_Group|Appearance}} | ||
Line 34: | Line 50: | ||
{{API_Entry|HTTP Bot Command|wear}} | {{API_Entry|HTTP Bot Command|wear}} | ||
− | {{API_Group|Group | + | {{API_Group|Group control}} |
{{API_Entry|HTTP Bot Command|activate_group}} | {{API_Entry|HTTP Bot Command|activate_group}} | ||
+ | {{API_Entry|HTTP Bot Command|activate_role}} | ||
+ | {{API_Entry|HTTP Bot Command|group_info}} | ||
{{API_Entry|HTTP Bot Command|group_join}} | {{API_Entry|HTTP Bot Command|group_join}} | ||
{{API_Entry|HTTP Bot Command|group_leave}} | {{API_Entry|HTTP Bot Command|group_leave}} | ||
+ | {{API_Entry|HTTP Bot Command|group_list2}} | ||
+ | {{API_Entry|HTTP Bot Command|group_offer_accept}} | ||
+ | {{API_Entry|HTTP Bot Command|group_visibility}} | ||
{{API_Entry|HTTP Bot Command|list_group_roles}} | {{API_Entry|HTTP Bot Command|list_group_roles}} | ||
{{API_Entry|HTTP Bot Command|listgroups}} | {{API_Entry|HTTP Bot Command|listgroups}} | ||
+ | {{API_Entry|HTTP Bot Command|listgroups_extended}} | ||
{{API_Group|Group members and communications}} | {{API_Group|Group members and communications}} | ||
Line 54: | Line 76: | ||
{{API_Group|Avatar info}} | {{API_Group|Avatar info}} | ||
+ | {{API_Entry|HTTP Bot Command|avatar_info}} | ||
{{API_Entry|HTTP Bot Command|avatar_groups}} | {{API_Entry|HTTP Bot Command|avatar_groups}} | ||
{{API_Entry|HTTP Bot Command|avatar_picks}} | {{API_Entry|HTTP Bot Command|avatar_picks}} | ||
{{API_Entry|HTTP Bot Command|key2name}} | {{API_Entry|HTTP Bot Command|key2name}} | ||
{{API_Entry|HTTP Bot Command|name2key}} | {{API_Entry|HTTP Bot Command|name2key}} | ||
− | |||
{{API_Entry|HTTP Bot Command|offer_teleport}} | {{API_Entry|HTTP Bot Command|offer_teleport}} | ||
− | {{API_Group| | + | {{API_Group|Movement}} |
− | + | ||
− | + | ||
{{API_Entry|HTTP Bot Command|move}} | {{API_Entry|HTTP Bot Command|move}} | ||
+ | {{API_Entry|HTTP Bot Command|walkto}} | ||
+ | {{API_Entry|HTTP Bot Command|fly}} | ||
{{API_Entry|HTTP Bot Command|sit}} | {{API_Entry|HTTP Bot Command|sit}} | ||
{{API_Entry|HTTP Bot Command|teleport}} | {{API_Entry|HTTP Bot Command|teleport}} | ||
+ | {{API_Entry|HTTP Bot Command|teleport_offer_accept}} | ||
+ | |||
+ | {{API_Group|World interaction}} | ||
+ | {{API_Entry|HTTP Bot Command|attachments}} | ||
+ | {{API_Entry|HTTP Bot Command|bot_location}} | ||
+ | {{API_Entry|HTTP Bot Command|inworld_prim_take}} | ||
+ | {{API_Entry|HTTP Bot Command|find_objects}} | ||
+ | {{API_Entry|HTTP Bot Command|nearbyavatars_scan}} | ||
+ | {{API_Entry|HTTP Bot Command|touch_attachment}} | ||
{{API_Entry|HTTP Bot Command|touch_prim}} | {{API_Entry|HTTP Bot Command|touch_prim}} | ||
{{API_Entry|HTTP Bot Command|touch_prim_coord}} | {{API_Entry|HTTP Bot Command|touch_prim_coord}} | ||
− | {{API_Group| | + | {{API_Group|Region (sim) control}} |
{{API_Entry|HTTP Bot Command|sim_access}} | {{API_Entry|HTTP Bot Command|sim_access}} | ||
{{API_Entry|HTTP Bot Command|sim_kick}} | {{API_Entry|HTTP Bot Command|sim_kick}} | ||
Line 76: | Line 107: | ||
{{API_Entry|HTTP Bot Command|sim_return}} | {{API_Entry|HTTP Bot Command|sim_return}} | ||
{{API_Entry|HTTP Bot Command|sim_send_message}} | {{API_Entry|HTTP Bot Command|sim_send_message}} | ||
+ | {{API_Entry|HTTP Bot Command|region_info}} | ||
{{API_Group|Parcel control}} | {{API_Group|Parcel control}} | ||
+ | {{API_Entry|HTTP Bot Command|parcel_buy}} | ||
+ | {{API_Entry|HTTP Bot Command|parcel_eject}} | ||
{{API_Entry|HTTP Bot Command|parcel_info}} | {{API_Entry|HTTP Bot Command|parcel_info}} | ||
− | {{API_Entry|HTTP Bot Command| | + | {{API_Entry|HTTP Bot Command|parcel_info_update}} |
− | + | {{API_Entry|HTTP Bot Command|parcel_list}} | |
{{API_Table_end}} | {{API_Table_end}} |
Latest revision as of 20:55, 26 July 2024
HTTP API commands are being sent to the bot by calling a special HTTP URL:
https://api.mysmartbots.com/api/bot.html
The request can be either GET or POST. Read the Doing HTTP API Calls article for more info.
Testing
You can compose and test your queries using SmartBots API Testing Suite:
https://www.mysmartbots.com/api/testing.html
Available bot HTTP commands
Command | Description | |
---|---|---|
Status | ||
status | Returns the online status of the bot. | |
login | Initiates bot login sequence. | |
logout | Initiates bot logout sequence. | |
set_http_callback | Specifies your HTTP callback script to receive bot events (invitations, IMs etc). | |
Messaging | ||
im | Sends an Instant Message to a specific user. | |
reply_dialog | Virtually "presses" a pop-up dialog button (which was displayed by an in-world script). | |
say_chat_channel | Says message over a specific chat channel. | |
typing_start | Sends "typing" in chat to a specific user. | |
typing_stop | Stops sending "typing" in chat to a specific user. | |
Friendship | ||
cancel_friendship | Removes an avatar from the bots friend list. | |
edit_friendship | Enables/Disables friend abilities such as Online Status, Show On Map, or Edit Rights | |
friendship_offer_accept | Accept (or reject) a friendship offer sent by other avatar. | |
offer_friendship | Offers friendship to a resident. | |
Inventory | ||
inventory_delete | Deletes an item from the bot's inventory. | |
inventory_give | Commands bot to send an inventory item or folder to specific avatar. | |
inventory_list | Returns a list ofthe bot's inventory folder contents. | |
inventory_offer_accept | Accept (or reject) an inventory invitation sent by other avatar or in-world script. | |
inventory_to_prim | Put an item from inventory to in-world prim | |
notecard_create | Create a notecard in the bot's inventory. | |
notecard_edit | Edit a notecard in the bot's inventory. | |
notecard_read | Edit a notecard in the bot's inventory. | |
texture_upload | Uploads and creates a new texture in inventory | |
Appearance | ||
rebake | Commands bot to rebake its appearance (reload its clothing and skin textures). | |
takeoff | Removes a clothing item, body part or attachment (the opposite of the wear command). | |
wear | Commands bot to wear a clothing item, body part or attach an object. | |
Group control | ||
activate_group | Activates a specific group (for example, to get build rights on the parcel). | |
activate_role | Changes the active group tag/title to the corresponding role UUID. | |
group_info | Returns the information about Second Life group. | |
group_join | Tries to join a group by UUID. | |
group_leave | Commands bot to leave the group specified by a UUID. | |
group_list2 | Returns the bot's groups list as JSON. | |
group_offer_accept | Accept (or reject) a group invitation sent by other avatar. | |
group_visibility | Controls the group visibility in bot profile. | |
list_group_roles | Returns a list the roles in given group. | |
listgroups | Returns a list of the Second Life groups the bot is member of. | |
listgroups_extended | Returns the bot's groups list, with additional details. | |
Group members and communications | ||
group_invite | Sends a group invitation to a specific resident. | |
group_eject | Ejects residents from the group. | |
send_group_im | Sends a message to group chat. | |
send_notice | Sends a notice to the group. | |
setrole | Puts member of a group in a specific role. | |
Money | ||
get_balance | Returns avatar L$ balance. | |
give_money | Commands bot to send money (L$) to specific avatar. | |
give_money_object | Commands bot to send money (L$) to a specific object. | |
Avatar info | ||
avatar_info | Returns the specific avatar's info. | |
avatar_groups | Returns a list of a resident's groups. | |
avatar_picks | Returns a list of a resident's picks. | |
key2name | Returns avatar Second Life name by UUID. | |
name2key | Returns avatar UUID by Second Life name. | |
offer_teleport | Sends a teleport offer to the resident. | |
Movement | ||
move | Start or stop bot movement and rotations. | |
walkto | Walk to a position within the current region. | |
fly | Commands the bot to fly. | |
sit | Commands bot to sit on a specific prim. | |
teleport | Teleports bot to specific location. | |
teleport_offer_accept | Accept (or reject) a teleport offer sent by other avatar. | |
World interaction | ||
attachments | Returns a list of the bot's attachments (including HUD objects). | |
bot_location | Returns the current location of the bot. | |
inworld_prim_take | Takes or copies in-world prim into bot's inventory. | |
find_objects | Returns the list of objects rezzed in the region. | |
nearbyavatars_scan | Scans current region for other avatars. | |
touch_attachment | Touches an object attached to the bot (HUD or attachment). | |
touch_prim | Touches a prim in-world. | |
touch_prim_coord | Touches a prim in-world by using its coordinates. | |
Region (sim) control | ||
sim_access | Control access to the sim. | |
sim_kick | Kicks resident (without banning from the sim) | |
sim_restart | Begins the sim restart routine. Also used to cancel the restart routine previously started. | |
sim_return | Returns objects of the specific resident from the sim. | |
sim_send_message | Sends a message to all visitors of the sim. | |
region_info | Gets the region info of a sim. | |
Parcel control | ||
parcel_buy | Purchases the parcel at specific point of the region | |
parcel_eject | Ejects avatar from bot's current parcel | |
parcel_info | Returns a lot of information about a parcel. | |
parcel_info_update | Update parcel details, including the name, description and selling options | |
parcel_list | Retrieves all parcels of the current sim |
Restrictions
API frequency restrictions may be applied for numerous subsequent queries (especially messaging ones: im, send_group_im etc). We suggest maintaining about 3 seconds delay between the subsequent queries since SL also caps delivery at this rate.
SmartBots API query returns the following error message when you hit the frequency restriction: Frequent API requests throttled