con
(@conschneider)
Engineer
Hi there,
I tried to follow 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
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 \
-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
(@rynald0s)
Automattic Happiness Engineer
Hi, @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!
Hi @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!
@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 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.