If you want a simple way to gain access to the API for an individual Thinkific Site with the purpose of building a private or one-off app, you can authorize using the Thinkific Site's Subdomain and API Key.
Note: If you are building an app that requires access to our upcoming GraphQL API (once it is available) or to multiple Thinkific sites you must authorize using OAuth. For more information, see Using the API.
In this article
Finding your API key and Subdomain
For Thinkific customers that have an active subscription, you API Key can be found on your site's settings page.
- Login to your Thinkific Site.
- Go to "Settings".
- Select the "Code & Analytics" Tab.
- Use the sub menu or scroll down to the API section.
- Click the "Reveal Key" button.
Structuring your request
Authorization is achieved by providing both the subdomain and corresponding API key as a Header in each request.
Structure of headers:
X-Auth-API-Key | {{Thinkific API key}} |
X-Auth-Subdomain | {{Subdomain of the Thinkific site}} |
Content-Type | application/json |
Making a test request
Test your connection by retrieving a list of your courses using the following command in your console. Make sure you replace “my-api-key” and “my-subdomain” with your own credentials.
curl https://api.thinkific.com/api/public/v1/courses \ -H 'X-Auth-API-Key: my-api-key' \ -H 'X-Auth-Subdomain: my-subdomain' \ -H 'Content-Type: application/json'
Authorization Errors
Errors due to invalid/incorrect credentials will return:
{ "error":"Authentication Error" }
and the response will have an HTTP status code of 401.
Note: This 401 errror will occur if the site's Thinkific pricing plan does not allow access to the API. Thinkific customers must be on the Grow/Pro + Growth Plan or above in order to access the API.