From 25865ea0f79a91295bff37f55474e96420c8a48a Mon Sep 17 00:00:00 2001 From: Nathan Booker Date: Wed, 13 Jan 2021 12:03:41 -0600 Subject: [PATCH] Remove references to basic auth, link to API account creation KB - Remove references to basic auth, as most stores no longer support it so it's confusing for someone new to the repo - Provide link to KB article on how to create an OAuth API token --- README.md | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 8fea908..27dc4a7 100644 --- a/README.md +++ b/README.md @@ -19,14 +19,7 @@ Requirements - PHP 7.0 or greater - cUrl extension enabled -**To connect to the API with basic auth you need the following:** - -- Secure URL pointing to a Bigcommerce store -- Username of an authorized admin user of the store -- API key for the user - -To generate an API key, go to Control Panel > Users > Edit User and make sure -the 'Enable the XML API?' is ticked. +To generate an OAuth API token, [follow this guide.](https://support.bigcommerce.com/s/article/Store-API-Accounts) **To connect to the API with OAuth you will need the following:** @@ -72,15 +65,6 @@ in your autoload path (using Composer’s `vendor/autoload.php` hook is recommen Provide your credentials to the static configuration hook to prepare the API client for connecting to a store on the Bigcommerce platform: -### Basic Auth -~~~php -Bigcommerce::configure(array( - 'store_url' => 'https://store.mybigcommerce.com', - 'username' => 'admin', - 'api_key' => 'd81aada4xc34xx3e18f0xxxx7f36ca' -)); -~~~ - ### OAuth In order to obtain the auth_token you would consume `Bigcommerce::getAuthToken` method @@ -105,6 +89,15 @@ Bigcommerce::configure(array( ~~~ +### Basic Auth (deprecated) +~~~php +Bigcommerce::configure(array( + 'store_url' => 'https://store.mybigcommerce.com', + 'username' => 'admin', + 'api_key' => 'd81aada4xc34xx3e18f0xxxx7f36ca' +)); +~~~ + Connecting to the store -----------------------