Community discussions

MikroTik App
 
n4yeem
newbie
Topic Author
Posts: 27
Joined: Wed Dec 18, 2013 8:26 pm
Contact:

How to remove active pppoe user via API

Fri Jan 21, 2022 11:51 am

Hi

I am using evilfreelancer/routeros-api-php . I am trying to make a query so that pppoe active user from a mikrotik can get disconnect. I tried many methods with the php query but in debug it shows "NO Such Command". Normally if i type in mikrotik terminal interface pppoe-server remove <pppoe-username> it removes the user. Also i tried ppp active remove numbers= . Both resulted same response ''no such command'

This is the sample query

public function disconnectConnectedUser()
{
$query_ppp_deactive_user = new Query("/interface/pppoe-server/print", ['name', 'pppoe-user01']);
$user = $this->client->query($query_ppp_deactive_user)->read();
$data = $user[0]['.id'];
$deactive_user = new Query("/interface/pppoe-server/remove/numbers=$data");
return $this->client->query($deactive_user)->read();
}

I can get full pppoe active list via API! used many ways including username sessionid. all resulted same response from api"no such command"

What am i doing wrong?
 
wilmanro77
just joined
Posts: 1
Joined: Fri Apr 28, 2023 8:35 pm

Re: How to remove active pppoe user via API

Fri Apr 28, 2023 8:37 pm

Hi,

Do you found your solution? Bc i have the same issue and documentation is not too much online

thanks

Who is online

Users browsing this forum: No registered users and 22 guests