From SmartBots Developers Docs
Jump to: navigation, search

Sends an Instant Message to a specific user.


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

Variable Required Description.
Input basic parameters:
action yes = im
apikey yes Your personal developer's API key.
botname yes Your bot's SL login.
secret yes Bot access code of your bot.
custom no The custom data (string) to be passed back to caller script. This value will be returned back to the caller in HTTP response.
slname yes Second Life login name of avatar
message yes The message to send
result OK - command completed successfully
FAIL - command failed
resulttext Detailed reason for the failure.
custom The value from input "custom" parameter. See above.


Send Instant Message to Tester Resident:

string recipient="Tester Resident";

string params = llDumpList2String([
  "action="  + "im",
  "apikey="  + llEscapeURL(sbApiKey),
  "botname=" + llEscapeURL(sbBotName),
  "secret="  + llEscapeURL(sbBotAccessCode),
  "slname="  + llEscapeURL(recipient),
  "message=" + llEscapeURL("Hello there!")
  ], "&");
  [HTTP_METHOD,"POST"], params);

<< return back to Bot commands