Documentation
Learn how to get started with OAuth or your own account's API key, follow along with detailed examples, and get in-depth info on the API.
Create an app
If you want to create an app for other ThriveCart users, you'll need to create a public app, and get users to grant you access to their account via OAuth.
API reference
View our Postman-powered API reference to see requests, responses, and generate code in a variety of languages.
// Include the PHP API (installed via Composer)
include('vendor.php');
// Obtain your access token either from your ThriveCart account, or via the Oauth process
$accessToken = 'ASYDV5S8-0BSO1SH2-4BH5PO7U-YF8SV3CZ';
// Create the API instance
$tc = new \ThriveCart\Api($accessToken);
// Start building!
try {
$products = $tc->getProducts(array(
'status' => 'live',
));
} catch(\ThriveCart\Exception $e) {
die('There was an error loading your list of products: '.$e->getMessage());
}
// Success!
print_r($products);