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 one of the Thinkific Site's API Access Tokens.
Creating an API Access Token
For Thinkific customers that have an active subscription, you can create new API Access Tokens and view existing API Access Token information on your site's settings page under Code & Analytics in the API Access Tokens section.
- Login to your Thinkific Site
- Go to Settings
- Select the Code & Analytics Tab
- Use the sub menu or scroll down to the API Access Tokens section to view existing API Access Tokens
You can create a new API Access Token by using the following steps:
- At the bottom of the API Access Tokens section click Add API access token
- Enter a unique name for your API Access Token so you can later identify it and choose an expiration date that you're comfortable with. After this date, the API Access Token will no longer function so make a note to rotate it in the future.
- Click Save to create the API Access Token
- Copy the value under API Access Token to keep it somewhere safe, since this will be the secret you'll use to identify yourself with the API. If you plan to implement Custom SSO, also make note of the SSO Signing Secret. These values are only shown once, and will not be visible again.
You cannot view the previously created API Access Tokens. Existing tokens will only show their name, expiry date, and a button to remove the token.
We strongly recommend securely recording your new API Access Token value when you create it as it is only displayed to you once.
Structuring your request
Authorization is achieved by providing the API Access Token an Authorization header in each request.
Structure of headers:
| Authorization | Bearer {{Thinkific API Access Token}} |
| 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-access-token” with your own credentials.
curl https://api.thinkific.com/api/public/v1/courses \
-H 'Authorization: Bearer my-api-access-token' \
-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 error 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.