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

BaseURL is not set by default, even for non-invitation API #86

Open
DimosthenisK opened this issue Sep 10, 2021 · 1 comment
Open

BaseURL is not set by default, even for non-invitation API #86

DimosthenisK opened this issue Sep 10, 2021 · 1 comment

Comments

@DimosthenisK
Copy link

Based on the Readme file, it is expected that by default the baseUrl property is set to "https://api.trustpilot.com", and you only need to change it only in case you're using the invitation API.

In reality, you always need to set the baseUrl property, or else you'll be getting "Invalid URL" errors if you follow the Readme examples.

The "Basic Usage"/"Usage with OAuth" examples should be changed to include the baseUrl property.

@KevinDanikowski
Copy link

Thank you!!

const client = await new TrustpilotApi({
      key: 'xxx',
      secret: 'xxx',
      grantType: GrantType.client_credentials,
      baseUrl: 'https://api.trustpilot.com',
    }).authenticate()

finally worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants