mx_delete_device: Delete a device

View source: R/devices.R

mx_delete_deviceR Documentation

Delete a device

Description

Removes a device and invalidates its access token. Most homeservers protect this with user-interactive authentication: the first call fails with M_FORBIDDEN or a 401 carrying a flows object, and the caller retries with a completed auth payload, e.g. list(type = "m.login.password", identifier = list(type = "m.id.user", user = "bot"), password = "...", session = "<from the 401>"). mx.api deliberately does not automate that exchange.

Usage

mx_delete_device(session, device_id, auth = NULL)

Arguments

session

An "mx_session" object.

device_id

Character. The device to delete.

auth

List or NULL. Completed user-interactive auth payload.

Value

Invisibly TRUE on success.

Examples

## Not run: 
mx_delete_device(s, "OLDDEVICE", auth = list(
    type = "m.login.password",
    identifier = list(type = "m.id.user", user = "bot"),
    password = "secret"
))

## End(Not run)

mx.api documentation built on Sept. 12, 2026, 1:07 a.m.