Title: Extension API Login Error: code 0
Last modified: August 24, 2016

---

# Extension API Login Error: code 0

 *  Resolved [Ivan Stefanov](https://wordpress.org/support/users/iv3rson76/)
 * (@iv3rson76)
 * SiteGround Representative
 * [11 years ago](https://wordpress.org/support/topic/extension-api-login-error-code-0/)
 * Hello,
 * Recently I noticed that the admin-ajax.php POST request that I made from MainWP
   plugin -> Extensions, when I enter valid username/password, results with “Error:
   code 0”
 * Here is the exact CURL request:
 * curl ‘[http://ivan-yordanov3.com/mainwp/wp-admin/admin-ajax.php&#8217](http://ivan-yordanov3.com/mainwp/wp-admin/admin-ajax.php&#8217);-
   H ‘Accept: application/json, text/javascript, */*; q=0.01’ -H ‘Accept-Encoding:
   gzip, deflate’ -H ‘Accept-Language: en-US,en;q=0.5’ -H ‘Cache-Control: no-cache’-
   H ‘Connection: keep-alive’ -H ‘Content-Type: application/x-www-form-urlencoded;
   charset=UTF-8’ -H ‘Cookie: mainwp_api_showhide_section_1=show; wordpress_488ef5be5160f8e6c1a6c1efb45ec1f0
   =admin%7C1430332409%7Cq7LSCE2ymPt0ivKn5Y0y6yUt9dST6GqaluVuHA7YcbT%7Cff58bf9bcca306ef9853a5a17cb22ddd73bed6d19ed809dcb915c334e588f6ae;
   wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_488ef5be5160f8e6c1a6c1efb45ec1f0
   =admin%7C1430332409%7Cq7LSCE2ymPt0ivKn5Y0y6yUt9dST6GqaluVuHA7YcbT%7C10e59797d2902de1e42b1fa49dc2bf614084437f4116d5d5d602a4e0aca99ab4;
   wp-settings-time-1=1430160315; PHPSESSID=s4uoj9b41fo5q6nnktj7lmi853’ -H ‘Host:
   ivan-yordanov3.com’ -H ‘Pragma: no-cache’ -H ‘Referer: [http://ivan-yordanov3.com/mainwp/wp-admin/admin.php?page=Extensions&#8217](http://ivan-yordanov3.com/mainwp/wp-admin/admin.php?page=Extensions&#8217);-
   H ‘User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/
   30.0’ -H ‘X-Requested-With: XMLHttpRequest’ –data ‘action=mainwp_extension_saveextensionapilogin&
   username=sgtest27&password=pass123%24&saveLogin=1’
 * RESPONSE:
 * {“error”:”Error: code 0″}
 * I’ve straced the process and noticed the following:
 * 30710 getsockopt(5, SOL_SOCKET, SO_ERROR, [93349705429286912], [4]) = 0
    30710
   write(1, “{\”error\”:\”Error: code 0\”}”, 25) = 25
 * I carefully reviewed the mainwp/page/MainWPExtensions.page.php code, but was 
   unable to determine wh the “saveExtensionsApiLogin” function failed, when I entered
   the valid credentials.
 * This leaded me to the conclusion that the issue might be either related to the
   cURL or to the openSSL, since according to the changelog, “sslverify” option 
   was added recently for Extension login.
 * Could you please take a look?
 * If you need more details regarding this matter, you can reach me on my personal
   email address.
 * Looking forward to your reply.
 * [https://wordpress.org/plugins/mainwp/](https://wordpress.org/plugins/mainwp/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [mainwp](https://wordpress.org/support/users/mainwp/)
 * (@mainwp)
 * [11 years ago](https://wordpress.org/support/topic/extension-api-login-error-code-0/#post-6064926)
 * It looks like your Dashboard may be having an issue passing through the Sucuri
   Firewall, if you can open a ticket on the [MainWP Support portal](http://support.mainwp.com/support/home)
   we’ll be happy to look into it for you.
 *  Plugin Author [mainwp](https://wordpress.org/support/users/mainwp/)
 * (@mainwp)
 * [11 years ago](https://wordpress.org/support/topic/extension-api-login-error-code-0/#post-6065205)
 * This was determined to be caused by disabled SNI support for the cURL in the 
   host environment.
 * We added a work around for hosts with this issue in Dashboard version 2.0.14

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Extension API Login Error: code 0’ is closed to new replies.

 * ![](https://ps.w.org/mainwp/assets/icon-256x256.png?rev=2734946)
 * [MainWP Dashboard: Self-hosted WordPress Management for Agencies](https://wordpress.org/plugins/mainwp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mainwp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mainwp/)
 * [Active Topics](https://wordpress.org/support/plugin/mainwp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mainwp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mainwp/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [mainwp](https://wordpress.org/support/users/mainwp/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/extension-api-login-error-code-0/#post-6065205)
 * Status: resolved