SonicOS API returning 401 Unauthorized error
HKI
Newbie ✭
I enabled SonicOS API on my router and turned on HTTP basic authentication. The simple curl command mentioned in here returns 401 Unauthorized error.
curl -k -i -u admin:password -X POST https://a.b.c.d/api/sonicos/auth
I am a trying to login as a user with full admin rights, the username password works with web interface and even works with SSH. I checked my interfaces and HTTPS user login is enabled on the LAN side port. SSH management is enabled, and I can ssh into the router and use CLI.
Category: Entry Level Firewalls
0
Answers
@HKI did you enabled "RFC-2617 HTTP Basic Access authentication" which is required for the kind of access you're trying to do? It's disabled by default.
—Michael@BWC
Yes, I enabled that.