MikroTik API icon

MikroTik API

Community Node for MikroTik RouterOS API

Actions67

Hotspot → Enable

AI-generated

Summary

Enables a MikroTik Hotspot entity (user, server, or IP binding) identified by its ID or name.

Inputs

  • hotspotCategory — Type of Hotspot entity to enable: Servers, Users, User Profiles, Active, Hosts, IP Bindings, or Cookies. Only Servers, Users, and IP Bindings support the Enable operation. Default: Users.
  • targetId (required) — ID (*1, *2) or name (e.g., ether1, user1) of the Hotspot entity to enable.
  • options.connectionAttempts — Number of times to try connecting to the MikroTik device. Default: 5.
  • options.connectionDelay — Delay in seconds between connection attempts. Default: 3.
  • options.cleanKeys — Replace - and / with _ in the keys of the returned data. Default: false.
  • options.tag — Custom tag for the command. Default: 0.

Output shape

An object with a json property containing: resource (Hotspot), operation (enable), count (number of returned items), and data (the raw API response, often empty for enable).

If cleanKeys is true, keys in data have - and / replaced with _.

Examples

Example 1: Enable a Hotspot user named 'guest1'

Resource: Hotspot, Operation: Enable, hotspotCategory: Users, targetId: guest1

Example 2: Enable a Hotspot server by ID '*6'

Resource: Hotspot, Operation: Enable, hotspotCategory: Servers, targetId: *6

Example 3: Enable an IP binding with clean keys and retry options

Resource: Hotspot, Operation: Enable, hotspotCategory: IP Bindings, targetId: *3, options: {connectionAttempts: 10, connectionDelay: 2, cleanKeys: true}

Links

Discussion