# acceptInventoryOffer

Accept (or reject) an inventory offer sent by another avatar or in-world script.

```javascript
Bot.on("inventory_offer", (event) => {
  Bot.acceptInventoryOffer(
    event.sender_type, 
    event.object_id, 
    event.sender_uuid, 
    event.folder, 
    event.session, 
    true
  );
});
```

See the [inventory_offer](/doc/e92f3367-ab0d-4b6f-82b7-5b63dd406594) event for details.

```snippet playground-input-2k8u0pPON3
`sender_type` | yes | Who sent the inventory (agent or in-world script)
`object_id`   | yes | Inventory UUID of the item being offered
`sender_uuid` | yes | UUID of the sender
`folder`      | yes | Inventory folder UUID this item goes to
`session`     | yes | Session UUID from the event
`accept`      | yes | `true` to accept the item, `false` to reject
```

```snippet playground-output-RlTybcdAWF
`success` | bool   | true if command completed successfully
`error`   | string | error string if command has failed
```