Permalink
Browse files

Updates README for API key usage; add sample config

Since explaining how to use an API key requires an understanding of how
the OAuth configuration works, this commit includes a brief outline
of how the `config.json` works as well as a sample. The verbiage in
the README was drawn from similar language in the
[singer-io/target-csv](https://github.com/singer-io/target-csv/blob/2e76485b2d574594387a945aeb7d6e7df4c43645/README.md)
repo.

Partially addresses issue #9.
  • Loading branch information...
jaeger401 committed Oct 23, 2017
1 parent 5e6861c commit 88c1280953ecd90037749b683fdcbee687aea126
Showing with 25 additions and 0 deletions.
  1. +17 −0 README.md
  2. +8 −0 config.sample.json
View
@@ -20,6 +20,23 @@ This tap:
- Outputs the schema for each resource
- Incrementally pulls data based on the input state
## Configuration
This tap requires a `config.json` which specifies details regarding [OAuth 2.0](https://developers.hubspot.com/docs/methods/oauth2/oauth2-overview) authentication, a cutoff date for syncing historical data, and an optional flag which controls collection of anonymous usage metrics. See [config.sample.json](config.sample.json) for an example.
To run `tap-hubspot` with the configuration file, use this command:
```bash
› tap-hubspot -c my-config.json
```
## API Key Authentication (for development)
As an alternative to OAuth 2.0 authentication during development, you may specify an API key (`HAPIKEY`) to authenticate with the HubSpot API. This should be used only for low-volume development work, as the [HubSpot API Usage Guidelines](https://developers.hubspot.com/apps/api_guidelines) specify that integrations should use OAuth for authentication.
To use an API key, set the `HUBSPOT_HAPIKEY` environment variable with the value of your HAPIKEY when running `tap-hubspot`. Any authentication parameters in your `config.json` will be ignored.
---
Copyright © 2017 Stitch
View
@@ -0,0 +1,8 @@
{
"redirect_uri": "https://api.hubspot.com/",
"client_id": 123456789000,
"client_secret": "my_secret",
"refresh_token": "my_token",
"start_date": "2017-01-01T00:00:00Z",
"disable_collection": false
}

0 comments on commit 88c1280

Please sign in to comment.