Harvest is a popular time tracking, invoicing, and reporting software for employee timesheets and billing.
Apipheny is a free API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to API data sources, easily.
1.) Install Apipheny by opening the following link on desktop and then clicking the Install button in the Google Marketplace: https://apipheny.io/install
2.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top.
In the dropdown list you should see Apipheny. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.
Tip: you can open a new Google Sheet by entering this URL in your browser:
Next, click the Create New Personal Access Token button:
2. Choose a name for your Harvest API token and click the Create Personal Access Token button:
3. Now, your token has been created and displayed. Copy and paste your token and your Account ID to a safe location because you will need it in the next steps:
In this section, we’ll show you how to browse the Harvest API documentation and choose an API Endpoint URL that retrieves the information you need from your Harvest account.
And endpoint is the part of the API request that tells Harvest which data you’re trying to pull.
If you already know your endpoint, or you want to use the same example endpoint as us, just skip to Step 4.
To choose a Harvest endpoint, first open the Harvest API documentation page here: https://help.getharvest.com/api-v2/
The various sections of the documentation appear as cards on the page.
In the API Introduction section, click on the Overview link. On the Overview page, you will find information about API requests and their authentication methods.
The other cards on the API documentation page are API groups linking to individual APIs, with each API page linking to a list of its endpoints.
Click on the OAuth2 or Personal Access Tokens link and a page with the authentication descriptions and examples will be displayed.
As an example, let’s see how the Projects API reveals its description and a summary listing of its endpoints:
This is the endpoint for the Projects API:
The documentation contains a short description for each endpoint, as well as the HTTP method used (eg. GET) and the link you should append to the root API URL for querying this endpoint (eg. /v2/projects):
For endpoints that accept parameters, this documentation page is where you would find them listed and explained, along with example inputs and responses.
Now, open your Google Sheet again, with the Apipheny sidebar open (screenshot below).
With the Import tab open, enter these details into the Apipheny add-on:
API URL: In Step 3 we explained how you can find the Harvest REST API endpoint that you need. Now that you have an endpoint, copy the complete URL into the Apipheny add-on, where it says API URL Path, followed by any GET parameters required for your query.
For this example, we are using the Users API Endpoint, to get a list of users, and this is the URL we are using:
Headers: In the Headers section in Apipheny, add two rows with the following keys and values:
Key 1: Harvest-Account-Id Value 1: account_id
Key 2: Authorization Value 2: Bearer your_access_token
your-access-token and account_id are the values you generated previously, in Step 2. Note that there should be a space between “Bearer” and “your_access_token”.
The Harvest-Account-Id and Authorization keys and values are required, so you should add them to the Apipheny add-on like this:
Lastly, click the Run button at the bottom of the Apipheny add-on and then your Harvest data will automatically be imported into your Google Sheets, and it should look like this:
After making a successful request to the Harvest API, try querying a different endpoint, or try using one of the more advanced features in the Apipheny add-on.
Crypto API Tutorials: