From 5b246bad6053fc446dd3d2f342f4fdc833deeed2 Mon Sep 17 00:00:00 2001 From: Thena Seer <138702673+thena-seer-sfg@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:29:04 -0700 Subject: [PATCH] Update OAuth instructions to use curl to get refresh token (#1858) --- .../extractors/tap-harvest-forecast/singer-io.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/_data/meltano/extractors/tap-harvest-forecast/singer-io.yml b/_data/meltano/extractors/tap-harvest-forecast/singer-io.yml index 96b574034..5ee88d930 100644 --- a/_data/meltano/extractors/tap-harvest-forecast/singer-io.yml +++ b/_data/meltano/extractors/tap-harvest-forecast/singer-io.yml @@ -59,5 +59,14 @@ usage: | Visit the [developer tools](https://id.getharvest.com/developers) page on Harvest's website and create a new oauth token. - Paste the Client ID you got from the above page in the url of a browser like https://id.getharvest.com/oauth2/authorize?client_id={OAUTH_CLIENT_ID}&response_type=code. Now you're able to login, click 'authorize app' and then are redirected to a url like this https://id.getharvest.com/oauth2/authorize?code={OAUTH_REFRESH_TOKEN}&scope=all. You will use this OAUTH_REFRESH_TOKEN in the following step to configure the oauth application. + Paste the Client ID you got from the above page in the url of a browser like https://id.getharvest.com/oauth2/authorize?client_id={OAUTH_CLIENT_ID}&response_type=code. Now you're able to login, click 'authorize app' and then are redirected to a url like this https://id.getharvest.com/oauth2/authorize?code={AUTHORIZATION_CODE}&scope=forecast%3A{ACCOUNT_ID}. Use the ACCOUNT_ID for the account_id setting. Copy the AUTHORIZATION_CODE into this curl command to get the REFRESH_TOKEN for the refresh_token setting: + + ```curl -X POST \ + -H "User-Agent: MyApp (yourname@example.com)" \ + -d "code=$AUTHORIZATION_CODE" \ + -d "client_id=$CLIENT_ID" \ + -d "client_secret=$CLIENT_SECRET" \ + -d "grant_type=authorization_code" \ + 'https://id.getharvest.com/api/v2/oauth2/token' + ``` variant: singer-io