From 8274835cb3791f68924c471dc3009e4a1cbb4ee5 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 4 Feb 2018 15:59:40 +0100 Subject: Include app URL in Harvest API request User-Agent Harvest requires either a link to the application or an email address to be included in the 'User-Agent' header with requests to their API (https://help.getharvest.com/api-v2/introduction/overview/general/#api-requests). --- harvester_submit_week_for_approval.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/harvester_submit_week_for_approval.py b/harvester_submit_week_for_approval.py index f0fa46f..e7dfbb7 100644 --- a/harvester_submit_week_for_approval.py +++ b/harvester_submit_week_for_approval.py @@ -142,7 +142,7 @@ class WeekIsComplete(object): headers={ 'Harvest-Account-ID': self.account_id, 'Authorization': 'Bearer {}'.format(self.api_token), - 'User-Agent': 'harvester-submit-week-for-approval (TODO email address or link to app)', + 'User-Agent': 'harvester-submit-week-for-approval (https://github.com/teddywing/harvester-submit-week-for-approval)', 'Content-Type': 'application/json', }, params={ -- cgit v1.2.3