|show offline managers|
|English, Japanese, Russian|
|HTTP API: Simple Groups|
Have a question? Ask at SmartBots DevPortal!
DevPortal is a blog and forum for developers. Ask your questions to get a prompt reply!
Simple Group HTTP API (or Simple HTTP) has been created to easily invoke the basic group commands such as invite or eject.
Unlike HTTP API: Bot Commands, Simple API does not require the knowledge UUIDs. It also returns the reply in simple plain form (see below).
To invoke Simple Group HTTP API command, call the following URL with required parameters:
The request can be either GET or POST. The returned value format is described down below.
Imagine you need to call invite command to invite someone to your group.
The resulting query looks like this:
string params = llDumpList2String([ "action=" + "invite", "apikey=" + llEscapeURL(yourApiKey), "secret=" + llEscapeURL(groupSecretCode), "group=" + llEscapeURL("My Group Name"), "slkey=" + (string)llDetectedKey(0), "force=" + "1", "message=" + llEscapeURL("Welcome!")], "&"); llHTTPRequest( "http://api.mysmartbots.com/api/simple.html", [HTTP_METHOD,"POST"], params );
Simple HTTP API returns the reply as a plain string. Thus, you just need to check if reply equals to "OK". Any other reply means that something wrong, e.g. "ACCESS DENIED" means wrong security code.
You can compose and test your queries using SmartBots API Testing Suite: http://www.mysmartbots.com/api/testing.html
Refer to HTTP API page for information on API commands available.