I've found a number of post regarding setting up API functionality with OpenCart, though most seem to refer to version 2.0+. The setup instructions indicate defining a user and key in the OpenCart Admin, then give illustrations of submitting these in the form of POST for API/Login.
I'm getting errors around a missing "API_TOKEN" value (which the code implies should be in the GET params). However, nothing in anything I've been able to find discusses this Token, and I've been unable to successfully reverse engineer the coding to any productive ends.
Beyond the API_TOKEN warning - I am also getting a SQL syntax error:
Fatal error: Uncaught exception 'Exception' with message 'Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`key` = '<REDACTED>' at line 1<br />Error No: 1064<br />SELECT * FROM `oc_api` WHERE `username` = '<REDACTED>' `key` = '<REDACTED>' AND status = '1'' in /Users/LLWebDev/Sites/OpenCart-126.96.36.199/upload/system/library/db/mysqli.php on line 40
Uncertain if I've simply missed a vital step or if there is something wrong with this newest version. Relatively new to OpenCart - veteran in other ways.
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
Fatal error: Uncaught Exception: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`key`
<br />Error No: 1064<br />SELECT * FROM `api` WHERE `username` =
Users browsing this forum: No registered users and 4 guests