Quickstart
This article describes how to use the Harvestr REST API using cURL.
Install cURL
Install cURL if cURL isn't already installed on your machine. To check if cURL is installed, execute curl --version
in the command line. If the output is information about the cURL version, cURL is installed. If you get a message similar to command not found: curl, you need to download and install cURL. For more information, see the cURL project download page.
Create a private app
Warning: Treat your access token like a password. To keep it secure, you can store your token in a password manager.
If you loose your access token, you can revoke it in Harvestr then recreate one.
Go to your Harvestr settings and create an Api Access Token.
Select Message Read scope, create and save your token. More information about scopes
Make your first request
Use the cURL command to make your request. Pass your token in an Authorization header. Replace YOUR-TOKEN with your token.
curl --request GET \
--url "https://rest.harvestr.io/v1/message" \
--header "Accept: application/json" \
--header "X-Harvestr-Private-App-Token: YOUR-TOKEN"
For more endpoints, see full API reference