graphem / thinkific-php
Simple PHP library for Thinkific API
Installs: 2 149
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 7
Open Issues: 1
Requires
- firebase/php-jwt: ^6.1
- guzzlehttp/guzzle: ^7.2
This package is auto-updated.
Last update: 2025-05-12 02:23:27 UTC
README
Light Thinkific API library for PHP based on the documentation found here
Requirements
- PHP 7.4+
Installation
The Thinkific PHP API client can be installed using Composer.
Composer
To install run composer require graphem/thinkific-php
Configuration
Configuration is done through an instance of Thinkific\Thinkific
.
The block is mandatory and if not passed, an error will be thrown.
// load Composer require 'vendor/autoload.php'; use \Thinkific\Thinkific; $subdomain = "subdomain"; $apiKey = "yourapikey"; $client = new Thinkific($apiKey,$subdomain);
Usage
Basic Operations
// Get all the courses $courses = $client->courses()->getAll(); print_r($courses); // Find a user by email $user = $client->users()->findByEmail('me@domain.com'); print_r($user); // Encoll a user to a course $enroll = $client->enrollments()->create($courseId,$userId, '2020-01-01', '2021-01-01'); // Generate SSO link $link = $client->sso()->getLink('signed-by (your application name or url)', ['email' => 'me@domain.com', 'first_name' => 'Me', 'last_name' => 'Hey']);