Open DimosthenisK opened 2 years ago
Thank you!!
const client = await new TrustpilotApi({
key: 'xxx',
secret: 'xxx',
grantType: GrantType.client_credentials,
baseUrl: 'https://api.trustpilot.com',
}).authenticate()
finally worked
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.