Join the Conversation

To sign in, use your existing MySonicWall account. To create a free MySonicWall account click "Register".

SonicOS API returning 401 Unauthorized error

I enabled SonicOS API on my router and turned on HTTP basic authentication. The simple curl command mentioned in here returns 401 Unauthorized error. https://www.sonicwall.com/support/technical-documentation/docs/sonicos-7-0-0-0-api/Content/SonicOS_API_Guide/API_Authentication/rfc-2617-http-basic-authentication.htm/

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
Reply

Answers

  • BWCBWC Cybersecurity Overlord ✭✭✭

    @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

  • HKIHKI Newbie ✭

    Yes, I enabled that.

Sign In or Register to comment.