curl / Mailing Lists / curl-meet / Single Mail

curl-meet

RE: Curl and Prestashop on Apache Server (OVH)

From: Jean-Christophe Voyeux <jcvoyeux_at_hotmail.com>
Date: Wed, 19 Dec 2018 12:52:54 +0000

Je viens de trouver !
I've just found !

I add " -A 'Mozilla' " then now I can access to the apis.

curl.exe -k -A "Mozilla" -u xxxxxxxxxxxxx: https://www.monsite.be/shop/api

Thank you for your ideas.

________________________________
De : curl-meet <curl-meet-bounces_at_cool.haxx.se> de la part de Dan Fandrich <dan_at_coneharvesters.com>
Envoyé : mercredi 19 décembre 2018 08:43
À : curl-meet_at_cool.haxx.se
Objet : Re: Curl and Prestashop on Apache Server (OVH)

On Tue, Dec 18, 2018 at 11:53:08PM +0000, Jean-Christophe Voyeux wrote:
> I installed prestashop shared web server at OVH.
> I wouldlike to update datas directly with my ERP in https.
> I actived webservices and created a user.
> If I try to access to the api with a browser (https://www.mysite.be/shop/api/),
> everything seems ok.
> It asks me my user account and shows me all allowed apis.
>
> If I try to do the same thing with curl (in command line)
> curl.exe -k --USER XXXXXXXX https://www.mysite.be/shop/api/

The option is called --user (lowercase).

> I receive a message 403 access forbiden !
>
> It seems that apache doesn't accept the connection.
> I tryed with MS IE, it's ok
> With wget it's not ok.
> Can you help me to solve the problème ?

Using --user without any other option uses the basic authentication method. Try
using --anyauth to let curl negotiate an authentication method. If that doesn't
work, then authentication is probably handled by cookies in which case take a
look at the related points at https://curl.haxx.se/docs/httpscripting.html

>>> Dan
_______________________________________________
curl-meet mailing list
curl-meet_at_cool.haxx.se
https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-meet

_______________________________________________
curl-meet mailing list
curl-meet_at_cool.haxx.se
https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-meet
Received on 2018-12-19