Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(integrations): update base_url for gong-oauth #1770

Merged
merged 11 commits into from
Aug 8, 2024
2 changes: 2 additions & 0 deletions docs-v2/integrations/all/gong.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Gong offers both Basic auth (API key) and OAuth as authentication. Nango impleme
- [How to find API credentials (for end-users)](https://help.gong.io/hc/en-us/articles/360042449451-Receive-access-to-the-API)
- [Request a developer account to create an OAuth app](https://app.gong.io/welcome/developer/sign-up)
- [API Docs](https://app.gong.io/settings/api/documentation#overview)
- [Oauth-related docs](https://help.gong.io/hc/en-us/articles/13944551222157-Create-an-app-for-Gong)

<Tip>Need help getting started? Get help in the [community](https://nango.dev/slack).</Tip>

Expand All @@ -32,5 +33,6 @@ Gong offers both Basic auth (API key) and OAuth as authentication. Nango impleme
- End users can generate API keys [on the Gong API page](https://app.gong.io/company/api). They must have the "technical administrator" user role to do this.
- Gong uses BASIC auth for their API, but doesn't call them username and password: `Access Key` is the username in Nango and `Access Key Secret` is the password in Nango.
- [Gong rate-limits](https://app.gong.io/settings/api/documentation#overview) are per second and a total of 10k requests a day.
- Gong-oauth uses `api_base_url_for_customer`, which varies for each customer, as its `base_url` for proxy requests. This parameter is returned in the response of `generate-customer-token`.

<Note>Add Getting Started links and Gotchas by [editing this page](https://github.com/nangohq/nango/tree/master/docs-v2/integrations/all/gong.mdx)</Note>
4 changes: 3 additions & 1 deletion packages/shared/providers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,8 @@ gong-oauth:
auth_mode: OAUTH2
authorization_url: https://app.gong.io/oauth2/authorize
token_url: https://app.gong.io/oauth2/generate-customer-token
token_response_metadata:
- api_base_url_for_customer
authorization_params:
response_type: code
access_type: offline
Expand All @@ -753,7 +755,7 @@ gong-oauth:
disable_pkce: true
token_request_auth_method: basic
proxy:
base_url: https://api.gong.io
base_url: ${connectionConfig.api_base_url_for_customer}
Copy link
Member

@bastienbeurier bastienbeurier Mar 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm concerned this will break existing connections that don't have the api_base_url_for_customer field populated in the connection config.

Is there a way to fall back to https://api.gong.io?

Would something like ${connectionConfig.api_base_url_for_customer || 'https://api.gong.io} work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bastienbeurier , I will do some test on this and see if the platform will handle such case. Incase of any changes to the platform, I will add them to this pull request. Thank you.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference, I checked that no one was using Gong in prod at the moment.

docs: https://docs.nango.dev/integrations/all/gong
google:
auth_mode: OAUTH2
Expand Down
Loading