|
Python Connector for BigCommerce Connecting to BigCommerce - Python Connector for BigCommerce |
|
To establish a connection to BigCommerce, import the connector and authenticate using basic or OAuth 2.0 authentication.
First, import the BigCommerce connector module:
import devart.bigcommerce as bigcommerce
Connect to your BigCommerce store using the connect() module method and obtain a connection object.
You can connect to BigCommerce using either basic authentication or OAuth 2.0 authentication.
Basic authentication
For basic authentication, provide your BigCommerce server URL and authentication credentials:
my_connection = bigcommerce.connect(
Version="Ver2",
Authentication="Basic",
Server="your_bigcommerce_url",
UserId="your_username",
AuthenticationToken="your_auth_token"
)
Replace the example values with your actual connection values.
For more information, see Connection parameters.
OAuth 2.0 authentication
For OAuth 2.0 authentication, provide your OAuth credentials:
my_connection = bigcommerce.connect(
Version="Ver2",
Authentication="OAuth",
StoreId="your_store_hash",
ClientId="your_client_id",
AccessToken="your_access_token"
)
Replace the example values with your actual connection values.
For more information, see Connection parameters.