Zaarrr Posted January 18, 2021 Share Posted January 18, 2021 Hi everyone. I hope you all are having a good day. At the moment I've started using the Prestashop API. I've tryed to access in the way is shown in the documentation. But a problem appears. When making any request I got a message saying (photo 1) { "errors": [ { "code": 18, "message": "Invalid authentication key format" } ] } Idk why this is happening. I'm putting correctly the data. The API key and his authorization mode is putted exactly as shown in documentation. (photo 2) I tryed too making request with another url structure that I find on an old prestashop forum post. The structure of url was this www.domainname.com/api/?ws_key=your key This url correctly works but dont let me put another options ( like display : full ) and more... Does anyone knows if I'm putting fields in some wrong way or something like that? I hope I was explicit. Thanks for your time, I really Appreciate. Mizar. Link to comment Share on other sites More sharing options...
Prestachamps Posted January 18, 2021 Share Posted January 18, 2021 (edited) Hi Mizar, try disabling the debug mode as this notice is breaking the page if debug mode is enabled. if there are still issues, check the log in /var/logs folder. Also maybe(not sure) this one could help you : https://stackoverflow.com/questions/17488656/zend-server-windows-authorization-header-is-not-passed-to-php-script/17489025#17489025 Kind regards, Leo Edited January 18, 2021 by Prestachamps (see edit history) Link to comment Share on other sites More sharing options...
damian_pm Posted October 22, 2021 Share Posted October 22, 2021 (edited) You have to encode key generated in 'Advanced' > 'Api'. For example by page https://www.base64encode.org/ past there your api key and copy generated string to postment. For example: in presta shop key : 4TQM7V66B98SBQ61B22HR2W6MKLDAYER generated in base64.org looks like this now: NFRRTTdWNjZCOThTQlE2MUIyMkhSMlc2TUtMREFZRVI= past it to postman Basic NFRRTTdWNjZCOThTQlE2MUIyMkhSMlc2TUtMREFZRVI= and then send request Edited October 22, 2021 by damian_pm (see edit history) Link to comment Share on other sites More sharing options...
Sasni Posted June 7, 2022 Share Posted June 7, 2022 I give you a solution Method: GET URL: https://your_domain.com/api/ Next in the Authorization tab Type: Basic Auth Username: YOUR_API_KEY Password : [empty] Next in the Headers tab Output-Format: JSON Next Click SEND button 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now