From SmartBots Developers Docs
Jump to: navigation, search

Sends the group invitation to specific resident.


The following table shows input values (you send them with the API call) and returned output values.

Variable Required Description.
Input base:
action yes = invite
apikey yes Your personal developer's API key.
secret yes Security code of the group you are using.
secret_sha1 no The same as "secret" but hashed using SHA1 (useful if you don't want to keep plain customer's passwords)
group yes the group name (must be listed with SmartBots!)
slkey yes the UUID of the resident
role no the group role name (default 'Everyone')
message no the optional message to send along with invitation (can't contain international characters)
force no if equals to 1 - invite existing group members also (otherwise silently ignore them)
cooldown no set to X seconds = do not send other invitation to this resident during next X seconds. Maximum value is 86400 seconds (24 hours)
location no put a location address here, it will be visible in statistics instead of automatic one.


misc no set the custom "Misc" value in group invitation statistics.

Format: any text, 60 characters max

Output (plain text returned):
OK command completed successfully
anything else Request failed, the fail reason is returned


The following example sends a direct group invitation to a resident touching the object (the group name is "My Group Name"). The greeting IM is being delivered along with the invitation.

touch_start(integer num) {
  string params = llDumpList2String([
    "action="  + "invite",
    "apikey="  + llEscapeURL(yourApiKey),
    "secret="  + llEscapeURL(groupSecretCode),
    "group="   + llEscapeURL("My Group Name"),
    "slkey="   + (string)llDetectedKey(0),
    "force="   + "1", // Invite group members too
    "message=" + llEscapeURL("Welcome!")], // Send a greeting IM


<< return back to group commands