Community discussions

MikroTik App
 
craigmcfly
just joined
Topic Author
Posts: 5
Joined: Mon Sep 05, 2022 2:36 am

Dedicated user can't access API

Wed Apr 26, 2023 3:34 pm

My full privileges user (i.e. that I use for SSH/webfig) can access the REST API fine, but the user I created specifically can't:
:~$ curl -k -u api https://192.168.5.1/rest/ip/address
Enter host password for user 'api':
{"detail":"not enough permissions (9)","error":500,"message":"Internal Server Error"}
The user's group is as follows
/user group
add name=api policy="api,rest-api,!local,!telnet,!ssh,!ftp,!reboot,!read,!write,!policy,!test,!winbox,!password,!web,!sni\
    ff,!sensitive,!romon"
This is on 7.8. No matter what permissions I give the api group, it gives the same error.

I'm always prepared to admit I'm doing something silly.
 
bacu
just joined
Posts: 1
Joined: Fri May 12, 2023 4:12 pm

Re: Dedicated user can't access API

Fri May 12, 2023 4:17 pm

You must enable read and write permissions.

/user group add name=api policy="api,rest-api,!local,!telnet,!ssh,!ftp,!reboot,read,write,!policy,!test,!winbox,!password,!web,!sniff,!sensitive,!romon"
Last edited by bacu on Fri May 12, 2023 4:18 pm, edited 1 time in total.

Who is online

Users browsing this forum: ohilton576 and 19 guests