I am sending a request to api/login with the username and key but i get redirected to the login page I have tried it with api/account/login also
POST http://localhost/opencart-3/index.php?r ... ount/login HTTP/1.1
Content-Type: application/json
User-Agent: PostmanRuntime/7.29.2
Accept: */*
Postman-Token: 834b1c7e-9fc1-4c06-be8a-96224163ad66
Host: localhost
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 299
Cookie: OCSESSID=cdc0d1375264860226018c5226; currency=USD; language=en-gb
{
"username": "new",
"key": "OkZzvdDPHUAGSd2Sb2NJN11hFAmVRw8tVMwWMvmQgBngYr81Ck3v7Hdm4UwCOul7NxQsc1k4535qNcNs1JAhdOvQrdmezO42RW8hHW8tywFT40vCuFiyfoMVRgrFzW8FKrZzfgUa7Z3HesyrqQcTq6nK4nxS2UNdyQ2Ybs2znREmnfpy06RdHPCfho0TQPMlOilZHLgf1EWRG4zIUNC2n4awHGdrW6HqU12WFZay5D3a8PxKOjLcNLgpsbGubM6R"
}
HTTP/1.1 404 Not Found
Date: Thu, 23 Jan 2025 13:14:16 GMT
Server: Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.0.30
X-Powered-By: PHP/8.0.30
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: OCSESSID=cdc0d1375264860226018c5226; path=/
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8
It has been days and I have tried creating multiple users also I tried it with version 4.0.2.3 and version 3 also both of the send me the same response. What should I do. I am currently running it on locahost.
POST http://localhost/opencart-4/index.php?r ... ount/login
200
155 ms
Raw Response:
{"error":"Warning: Incorrect API Key!"}
This is what I got after many different attempts via postman but I am still unable to generate my api token. I did use a new API key here with my ip and localhost in the ip sessions of that api.
For OpenCart 3 you wnat /index.php?route=api/login as the URL and to POST in the default encoding not JSON.
Who is online
Users browsing this forum: Semrush [Bot] and 10 guests