The latest specification recommends using OAuth to connect to the BigCommerce API, as the simple auth method will be deprecated soon.
I use the BigCommerce API in some PHP scripts that access the Store API for my store. These scripts do relatively simple things, such as product update names, product price updates, etc.
I am confused about how to port these scripts to using the new OAuth system. All I read is that OAuth is based on developing the actual application that the user installs and authorizes to access their store. However, this is clearly not my precedent, and I was very embarrassed.
A simple example would be a script to retrieve products from my store. I just run this code in a PHP file:
Bigcommerce::configure(array(
'store_url' => 'https://www.my-store.com',
'username' => 'my_username',
'api_key' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
));
Bigcommerce::setCipher('RC4-SHA');
Bigcommerce::verifyPeer(false);
Bigcommmerce::getProducts();
How can I achieve the same using OAuth? Is it possible?
source
share