# set_http_callback

Specifies your HTTP callback script to receive bot events (invitations, IMs etc).

See HTTP Bot Callback for detailed information.

## Variables

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

### Input basic parameters

| Variable | Required | Description |
|----------|----------|-------------|
| action   | yes      | = set_http_callback |
| apikey   | yes      | Your personal [developer's API key](/doc/developers-api-key-tw8bQj4LSJ). |
| botname  | yes      | Your bot's SL login. |
| secret   | yes      | [Bot access code](https://www.mysmartbots.com/docs/Bot_access_code) of your bot. |
| dataType | optional | Set to "json" to get JSON reply instead of URL-encoded string |
| custom   | optional | The custom data (string) to be passed back to caller script. This value will be returned back to the caller in HTTP response. |

### Input

| Variable | Required | Description |
|----------|----------|-------------|
| url      | yes      | The URL of your HTTP script. This script will get POST requests from the bot.<br><br>Send an empty URL to disable HTTP callback. |
| events   | yes      | The events you want to receive, separated by a comma. See HTTP Bot Callback Events for complete a list of events.<br><br>Separate events by comma if you want to monitor several of them: events=group_invite,teleport_offer<br>Specify events=all to monitor all possible events. |
| operation |          | Operation:<br><br>"add" (default) to add callback<br>"remove" to remove callback |

### Output

(to be received in `http_response` LSL event, see [docs](/doc/doing-http-api-calls-c6FSEMF7bP) for details)

| Variable | Description |
|----------|-------------|
| result   | OK - command completed successfully<br>FAIL - command failed |
| resulttext | Detailed reason for the failure. |
| custom   | The value from input "custom" parameter. See above. |

---

**Documents**

- [HTTP Bot Callback](https://sb-docs-dev.getoutline.com/s/dev/doc/http-bot-callback-nnDHBpc05a)
- [HTTP Bot Callback Events](https://sb-docs-dev.getoutline.com/s/dev/doc/http-bot-callback-events-azHaACSj42)