Title: WooCommerce Authentication API &#8220;Error: cURL error 52: Empty reply from server&#8221;
Last modified: December 8, 2018

---

# WooCommerce Authentication API “Error: cURL error 52: Empty reply from server”

 *  Resolved [natthawutheamatulin](https://wordpress.org/support/users/natthawutheamatulin/)
 * (@natthawutheamatulin)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/woocommerce-authentication-api-error-curl-error-52-empty-reply-from-server/)
 * Hello,
 * I’m making a mobile app via WooCommerce rest API.
 * I tried to follow [http://woocommerce.github.io/woocommerce-rest-api-docs/#rest-api-keys](http://Authentication API)
   but after logged-in complete and click approve. The API redirect me to `wc-auth/
   v1/access_granted` endpoint and displayed `wc-auth/v1/access_granted` on screen.
   I’m not sure what I did something wrong. Could you help me with this?
 * And also something I’m not quite clear about `return_url` and `callback_url`.
   Do I have to implement the endpoint to receive the response from authentication
   API in case I logged-in succeed and return to my app?

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

 *  [con](https://wordpress.org/support/users/conschneider/)
 * (@conschneider)
 * Engineer
 * [7 years, 4 months ago](https://wordpress.org/support/topic/woocommerce-authentication-api-error-curl-error-52-empty-reply-from-server/#post-11090562)
 * Hi there,
 * > I tried to follow [http://woocommerce.github.io/woocommerce-rest-api-docs/#rest-api-keys](http://woocommerce.github.io/woocommerce-rest-api-docs/#rest-api-keys)
   > but after logged-in complete and click approve. The API redirect me to wc-auth/
   > v1/access_granted endpoint and displayed wc-auth/v1/access_granted on screen.
   > I’m not sure what I did something wrong. Could you help me with this?
 * That sounds like all went ok and you can save the replied keys in your app to
   then make authorised requests. What are you trying to do and what are the requests
   you use?
 * > And also something I’m not quite clear about return_url and callback_url. Do
   > I have to implement the endpoint to receive the response from authentication
   > API in case I logged-in succeed and return to my app
 * Yes, you must define them as stated via: [http://cld.wthms.co/J27vPK](http://cld.wthms.co/J27vPK)
 *  Thread Starter [natthawutheamatulin](https://wordpress.org/support/users/natthawutheamatulin/)
 * (@natthawutheamatulin)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/woocommerce-authentication-api-error-curl-error-52-empty-reply-from-server/#post-11098318)
 * Thank you for your response.
 * > What are you trying to do and what are the requests you use?
 * I’m building a shopping application on Android/iOS by using WooCommerce Rest 
   API. For now, I’m implementing the login.
 * Honestly, I want to make the login page following my design. However, look like
   the API provided the authentication UI. Is it possible to make my UI for the 
   login page?
 * > What are the requests you use?
 * Here is my request
    ` curl [https://xxx.com/wc-auth/v1/authorize](https://xxx.com/wc-auth/v1/authorize)\-
   X POST \ -d “app_name=Demo Shop” \ -d “scope=read_write” \ -d “user_id=123″\ -
   d “return_url=https://xxx.com/wc-auth-return.php” \ -d “callback_url=https://
   xxx.com/wc-auth-callback.php” ` After send request I got the authentication page.
   And in enter my user and password and click Approve button and I got the error`
   Error: cURL error 52: Empty reply from server`
 *  [Rynald0s](https://wordpress.org/support/users/rynald0s/)
 * (@rynald0s)
 * Automattic Happiness Engineer
 * [7 years, 3 months ago](https://wordpress.org/support/topic/woocommerce-authentication-api-error-curl-error-52-empty-reply-from-server/#post-11219689)
 * Hi, [@natthawutheamatulin](https://wordpress.org/support/users/natthawutheamatulin/)!
 * The `cURL error 52: Empty reply from server` is the server side more than it 
   is client side. I suspect the problem you have is that there is some piece of
   network infrastructure, like a firewall or a proxy, between you and the host 
   in question, and I would recommend you reach out to your host about this
 * Cheers!
 *  [Hari Shanker R](https://wordpress.org/support/users/harishanker/)
 * (@harishanker)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/woocommerce-authentication-api-error-curl-error-52-empty-reply-from-server/#post-11243413)
 * Hi [@natthawutheamatulin](https://wordpress.org/support/users/natthawutheamatulin/)
 * I just wanted to follow-up with you on this thread; hope you were able to fix
   this problem that we had discussed here.
 * I’m marking this thread as `Resolved` as we have not heard back from you in a
   while. If the problem persists though, feel free to reopen this, we would be 
   happy to look into this for you.
 * All the best!
 *  Thread Starter [natthawutheamatulin](https://wordpress.org/support/users/natthawutheamatulin/)
 * (@natthawutheamatulin)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/woocommerce-authentication-api-error-curl-error-52-empty-reply-from-server/#post-11247978)
 * [@rynald0s](https://wordpress.org/support/users/rynald0s/) thank you for your
   help. I’m using the shared hosting not sure I’m might not to able to optimize
   the server. However, I’ll try on my local machine to see what different on the
   server.
 * [@harishanker](https://wordpress.org/support/users/harishanker/) Exactly the 
   problem persisted. I’m plan to create a custom API to use for authentication 
   to able to use my custom login page. If you have any suggestion or comments, 
   feel free to let me know.
 * Thank you for all your help.

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

The topic ‘WooCommerce Authentication API “Error: cURL error 52: Empty reply from
server”’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [authentication](https://wordpress.org/support/topic-tag/authentication/)

 * 5 replies
 * 4 participants
 * Last reply from: [natthawutheamatulin](https://wordpress.org/support/users/natthawutheamatulin/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/woocommerce-authentication-api-error-curl-error-52-empty-reply-from-server/#post-11247978)
 * Status: resolved