I just got some problems using the API Interface of my RB2011UiAS.
I’am not able to connect via the API-port. The IP service is enabled and there are no firewall rules which would deny it. For testing I made a log-filter-rule which shows me, if there are any API-related packets. When I use Telnet to port 8728 I see two log entrys for the API but my putty-window closes immediately.
If I use the native Windows telnet client, the window stays open but I still got no connection.
I really don’t know whats the matter. I also updated to new RouterOS 6.42.1 but nothing changed.
The log does’nt tell me anything about that (except the filter-log-rule).
What makes you think that you can chat with API like this? It’s not compatible with telnet, it uses own protocol. If you want to test whether the connection can be established or not, select “Raw” as connection type in PuTTY. Then the connection should stay open and you can type whatever you want, but you still won’t get anything useful back.
Whatever…when I use the Raw connection in Putty I see API packets in torch but my “real” API connection does’nt work. I’am trying to use it with the C# implementation tik4net. It still says it could’nt connect. Is there any way to debug API on router-site? Just to go sure the router does’nt deny or block the connection?
And what about your logging rule, does it see anything, when you try to connect from C#? If it’s really trying to connect to router, you should see something logged, like you did with telnet. If not, then the client is doing something wrong and not connecting to router at all.