Quick Start
Learn the foundations for using the REST API, starting with authentication and some endpoint examples.
Let's walk through core API concepts as we tackle some everyday use cases.
Overview
Most applications will use an existing wrapper library in the language of your choice, but it's important to familiarize yourself with the underlying API HTTP methods first.
There's no easier way to kick the tires than through cURL.
Hello World
Let's start by testing our setup. Open up a command prompt and enter the following command:
Authentication
To be honest, doing anything interesting with the TextMaster API requires authentication.
Using a signature
The easiest way to authenticate with TextMaster API is by using the signature authentication strategy.
Warning: We strongly advise to use the signature strategy only for test purposes. Prefer using OAuth2 tokens for production use cases.
In the top-bar navigation of TextMaster's application, click on API & Loop
In the left panel, copy & paste your api key and secret.
Set the following shell variables:
Verify the validity of your signature by executing the following request:
Get your own user profile
When properly authenticated, you can take advantage of the permissions associated with your account on TextMaster. For example, try getting your own user profile:
Using OAuth tokens for apps
Apps that need to read or write private information using the API on behalf of another user should use OAuth.
OAuth uses tokens. Tokens provide two big features:
Revokable access: users can revoke authorization to third party apps at any time
Limited access: users can review the specific access that a token will provide before authorizing a third party app
Tokens should be created via a web flow. An application sends users to TextMaster to log in. TextMaster then presents a dialog indicating the name of the app, as well as the level of access the app has once it's authorized by the user. After a user authorizes access, TextMaster redirects the user back to the application:
Treat OAuth tokens like passwords! Don't share them with other users or store them in insecure places. The tokens in these examples are fake and the names have been changed to protect the innocent.
Now that we've got the hang of making authenticated calls, let's move along to the Projects API.
Projects
Almost any meaningful use of the TextMaster API will involve some level of Project information. We can GET project details in the same way we fetched user details earlier:
Or, we can list our projects:
As the docs indicate, you can query a filter endpoint that can be used to filter projects returned based on various attributes:
For more informations on the different filters available, see:
Woot! Now you know the basics of the TextMaster API!
Signature & OAuth authentication
Fetching and filtering projects
Dive deeper and get more details about available resources:
Or, start learning about OAuth Apps:
Or, start exploring our API reference to get an idea of everything that's possible with the API:
Finally, don't forget to read about Webhooks to build or set up powerful integrations:
Last updated