Skip to content

Commit

Permalink
Remove references to basic auth, link to API account creation KB
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
bookernath authored Jan 13, 2021
1 parent 39d673e commit 25865ea
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:**

Expand Down Expand Up @@ -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
Expand All @@ -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
-----------------------

Expand Down

0 comments on commit 25865ea

Please sign in to comment.