Post by ayushpatel » Fri Sep 05, 2025 5:43 pm

The issue i am facing is as follows
I Registered a account on opencart
my domain is : https://ayushpateldemostore.opencart.shop/
when i try to acess login api via this doc of api refernence
https://docs.opencart.com/en-gb/system/users/api/

i am not able to call the login url that generated a session token
code snippet
import requests

s = requests.Session()

username = ''
key=''

response = s.post(
'https://ayushpateldemostore.opencart.sh ... =api/login',
data={'username':username, 'key':key}
).text
print(response)

i get following response
403 Forbidden
{"error":"You do not have permission to access this page."}

i have followed basic trouble shooting of whitelisting ip address but its still gives same error

kindly help me out
Last edited by ayushpatel on Mon Sep 08, 2025 7:42 pm, edited 1 time in total.

Newbie

Posts

Joined
Fri Sep 05, 2025 4:33 pm

Post by OSWorX » Fri Sep 05, 2025 7:17 pm

ayushpatel wrote:
Fri Sep 05, 2025 5:43 pm
The issue i am facing is as follows
I Registered a account on opencart
my domain is : https://ayushpateldemostore.opencart.shop/
Guess you mean OpenCart Cloud ?

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by ayushpatel » Fri Sep 05, 2025 7:22 pm

OSWorX wrote:
Fri Sep 05, 2025 7:17 pm
ayushpatel wrote:
Fri Sep 05, 2025 5:43 pm
The issue i am facing is as follows
I Registered a account on opencart
my domain is : https://ayushpateldemostore.opencart.shop/
Guess you mean OpenCart Cloud ?

i had basically created a trial account via
https://www.opencart.com/index.php?route=common/home

see image attached

Attachments

???
trial_pagess.png
trail page where i created my store

Newbie

Posts

Joined
Fri Sep 05, 2025 4:33 pm

Post by paulfeakins » Fri Sep 05, 2025 10:31 pm

ayushpatel wrote:
Fri Sep 05, 2025 5:43 pm
i have followed basic trouble shooting of whitelisting ip address but its still gives same error

kindly help me out
I don't know what you're trying to do ... but I probably wouldn't do it.

However, if you insist on taking this wacky path, then you should contact OpenCart support: https://www.opencart.com/index.php?rout ... rt/contact

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by OSWorX » Sat Sep 06, 2025 1:06 am

ayushpatel wrote:
Fri Sep 05, 2025 7:22 pm
OSWorX wrote:
Fri Sep 05, 2025 7:17 pm
ayushpatel wrote:
Fri Sep 05, 2025 5:43 pm
The issue i am facing is as follows
I Registered a account on opencart
my domain is : https://ayushpateldemostore.opencart.shop/
Guess you mean OpenCart Cloud ?

i had basically created a trial account via
https://www.opencart.com/index.php?route=common/home
That IS the OPenCart Cloud .. you really should know what you're doing!

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by ayushpatel » Mon Sep 08, 2025 12:48 pm

paulfeakins wrote:
Fri Sep 05, 2025 10:31 pm
ayushpatel wrote:
Fri Sep 05, 2025 5:43 pm
i have followed basic trouble shooting of whitelisting ip address but its still gives same error

kindly help me out
I don't know what you're trying to do ... but I probably wouldn't do it.

However, if you insist on taking this wacky path, then you should contact OpenCart support: https://www.opencart.com/index.php?rout ... rt/contact
Sorry for being little ambigous
After creating my opencart store i want to admin panel
from there i went to System->Users->API
i created an api key there, added ip in allowed ip (see image)
and from there i am trying to use this that key and user as per API given in this documentation
https://docs.opencart.com/en-gb/system/users/api/

but i keep getting error
You do not have permission to access this page.

Attachments

???
api menu.png
api menu where i added api key

Newbie

Posts

Joined
Fri Sep 05, 2025 4:33 pm

Post by ADD Creative » Mon Sep 08, 2025 3:33 pm

What version of OpenCart is used? If 4.x then it won't have api/login.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by ayushpatel » Mon Sep 08, 2025 4:00 pm

ADD Creative wrote:
Mon Sep 08, 2025 3:33 pm
What version of OpenCart is used? If 4.x then it won't have api/login.
yes opencart version is 4.x to be specific : 4.1.0.3
is there any updated api reference available?

Newbie

Posts

Joined
Fri Sep 05, 2025 4:33 pm

Post by by mona » Mon Sep 08, 2025 4:13 pm

Might be related to this viewtopic.php?t=233046#p869915
NOTE : Opencart 4 in any version is not recommended for a live site - you should consider 3.0.4.1
If you are using the Cloud - as we suspect you are - please contact their support for assistance

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by ayushpatel » Mon Sep 08, 2025 4:47 pm

by mona wrote:
Mon Sep 08, 2025 4:13 pm
Might be related to this viewtopic.php?t=233046#p869915
NOTE : Opencart 4 in any version is not recommended for a live site - you should consider 3.0.4.1
If you are using the Cloud - as we suspect you are - please contact their support for assistance
Exact same thing is happening in localhost as well
i have installed opencart 4.1.0.3 on my local
from : https://www.opencart.com/index.php?route=cms/download
followed the process of setup, works correctly in local except for api part
gives same error as i mentioned first time

Newbie

Posts

Joined
Fri Sep 05, 2025 4:33 pm

Post by khnaz35 » Mon Sep 08, 2025 4:55 pm

ayushpatel wrote:
Mon Sep 08, 2025 4:47 pm
by mona wrote:
Mon Sep 08, 2025 4:13 pm
Might be related to this viewtopic.php?t=233046#p869915
NOTE : Opencart 4 in any version is not recommended for a live site - you should consider 3.0.4.1
If you are using the Cloud - as we suspect you are - please contact their support for assistance
Exact same thing is happening in localhost as well
i have installed opencart 4.1.0.3 on my local host
Are you even paying attention to what you been told for Opencart 4.x and what to expect?? Re-read above message clearly from the posted answer!

Got a burning question at 3 AM that even Google shrugs at? There’s a not-so-secret inbox that might just have your answer: khnaz35@gmail.com
Breathe in some nature while you're at it. It’s cheaper than therapy. :-*

Feel free to sling a bear my way via PayPal @ khnaz35@gmail.com


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by by mona » Mon Sep 08, 2025 5:30 pm

https://www.opencart.com/index.php?rout ... ad/history
From here you can download 3.0.4.1

I appreciate that it might be a little confusing , and I suspect that the issue is with coding of the page - but actually the latest release is 3.0.4.1 and it is because OC4 has so many issues - even when a new OC4 is released it is unlikely to be recommended until it has been tested - that is Opencart and always has been - Opencart does not release stable toughly tested versions - it releases for testing by the community -

Download 3.0.4.1 and start again.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by ayushpatel » Mon Sep 08, 2025 7:35 pm

by mona wrote:
Mon Sep 08, 2025 5:30 pm
https://www.opencart.com/index.php?rout ... ad/history
From here you can download 3.0.4.1

I appreciate that it might be a little confusing , and I suspect that the issue is with coding of the page - but actually the latest release is 3.0.4.1 and it is because OC4 has so many issues - even when a new OC4 is released it is unlikely to be recommended until it has been tested - that is Opencart and always has been - Opencart does not release stable toughly tested versions - it releases for testing by the community -

Download 3.0.4.1 and start again.
Thanks man, installed 3.0.4.1 and API works now

Newbie

Posts

Joined
Fri Sep 05, 2025 4:33 pm

Post by ADD Creative » Mon Sep 08, 2025 7:39 pm

ayushpatel wrote:
Mon Sep 08, 2025 4:00 pm
yes opencart version is 4.x to be specific : 4.1.0.3
is there any updated api reference available?
Unfortunately the OpenCart documentation hasn't been updated for version 4.x (another reason for sticking with 3.0.x). There may be some comments in the code or on GitHub.
https://github.com/opencart/opencart/discussions/14815

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by by mona » Mon Sep 08, 2025 7:40 pm

BRILLIANT - you are very welcome - If you could just include the word [SOLVED] to your title many people will appreciate that
good luck with your site

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: No registered users and 1 guest