node-trustpilot icon indicating copy to clipboard operation
node-trustpilot copied to clipboard

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

Open DimosthenisK opened this issue 4 years ago • 1 comments

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.

DimosthenisK avatar Sep 10 '21 10:09 DimosthenisK

Thank you!!

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

finally worked

KevinDanikowski avatar Mar 30 '23 22:03 KevinDanikowski