User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by insurenow » Fri Jan 04, 2019 8:51 am

Go to System > Setting > Edit Your main Store > Click on Option
See here : API User
Select Your API USER

And thats it Solved

Newbie

Posts

Joined
Sat Dec 08, 2018 6:39 pm

Post by OSWorX » Sun Jan 13, 2019 3:51 am

3.0.2.0 is different in handling the IPs and API that is why it is working.
In 2.x simply hit the button to add the IP.

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


User avatar
Guru Member

Posts

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

Post by thekrotek » Thu Mar 28, 2019 8:17 pm

Just to sum this up...

Why the API issue happens?
Because since OC 2 OpenCart has absolutely ugly algorithm of editing orders from admin. In my opinion, it doesn't have any excuses or really solid reasons to be implemented. Never seen anything like this in any other platform and hopefully never will.

When it happens?
Sometimes it is indeed an issue with API settings or database structure after OC upgrade, sometimes a server side issue.

How can I fix this?
There're plenty simple solutions right in this topic, which may help, if your case is wrong setup/upgrade. If none of them helped and you're pretty sure, that all settings are correct, then you're, well... fudged. Even if you disable API check, the issue may stay and pop again in different places. For example, when editing an order, a payment/shipping address may be stored in session and not retrieved right in the next API call, when payment/shipping methods are queried. This happens, because session data was lost.

I've seen it personally on a few systems and there was a discussion of StackOverflow a few years ago, where issues with particular version of CentOS (or maybe some other server OS, not sure) were reported. The only way in the case, when no other solution helped, is to get yourself an admin and start digging into the issue.

P.S.: For me this API issue ALWAYS happened on OC 2.3 only, other versions worked just fine. It appears, that OC 2.3 is the most troublesome version, when it comes to API.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by straightlight » Fri Mar 29, 2019 4:35 am

P.S.: For me this API issue ALWAYS happened on OC 2.3 only, other versions worked just fine. It appears, that OC 2.3 is the most troublesome version, when it comes to API.
Correct. v3.x releases have been mostly fixed regarding the APIs since.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by kur1977@gmail.com » Sun Oct 06, 2019 3:49 am

catalog\controller\startup\session.php

just add string: $this->session->data['api_id'] = $query->row['api_id'];
after the string $this->session->start('api', $query->row['session_id']);


Posts

Joined
Sun Oct 06, 2019 3:47 am

Post by Live_Life » Sat Aug 19, 2023 1:15 am

I am cross posting this since it is not on this thread and this thread pops up first when you search "You do not have permission to access the API!" hopefully it will save other people time.
CódigoNET wrote:
Tue Aug 03, 2021 12:20 pm
Try

UPDATE `oc_setting` SET `value` = 'UTC' WHERE `key` = 'config_timezone';
This worked for me after trying all sorts of other solutions so Thank You CódigoNET.

Just a slight addition for other people: UPDATE `ocxx_setting` SET `value` = 'UTC' WHERE `key` = 'config_timezone';
where xx in ocxx_setting will vary depending on your database.

The GitHub issue for the timezone affecting the API is here, if anyone is interested. https://github.com/opencart/opencart/issues/9492

Newbie

Posts

Joined
Sat Apr 22, 2023 3:10 am

Post by Rdilendra » Mon Jan 29, 2024 5:42 pm

i want API_token to practicing opencart API,becouse by using postman test command i failed to get API_token. so kindly please provide me API_key

Newbie

Posts

Joined
Mon Jan 29, 2024 4:23 pm

Post by Cue4cheap » Mon Jan 29, 2024 10:13 pm

Rdilendra wrote:
Mon Jan 29, 2024 5:42 pm
i want API_token to practicing opencart API,becouse by using postman test command i failed to get API_token. so kindly please provide me API_key
Huh?
Tell us what testing you are trying to do in postman otherwise we would just have to guess what you are trying to do.

Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by straightlight » Tue Jan 30, 2024 6:07 am

Rdilendra wrote:
Mon Jan 29, 2024 5:42 pm
i want API_token to practicing opencart API,becouse by using postman test command i failed to get API_token. so kindly please provide me API_key
OC version. Contact your postman sales support by email or by phone. They will provide you one.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 22 guests