trustpilot / node-trustpilot

HTTP client for Trustpilot
MIT License
31 stars 4 forks source link

Reply not added to trustpilot #57

Closed ghost closed 5 years ago

ghost commented 5 years ago

I am trying to add a reply to the Trustpilot review by using Trustpilot npm package. But I got this error.

statusCode: 400, message: '400 - { "message":"The request was malformed", "errorCode":1001, "details":"", "correlationId":"2e03bbf2-2978-442e-9302-3c875b696f79" }',

b-dur commented 5 years ago

Hi @prsaravana0712, how does your post call look like? It should be something similiar:

const options = {
  url: 'https://api.trustpilot.com/v1/private/reviews/${reviewId}/reply',
  method: 'POST',
  body: {
    message: 'your reply'
  },
  json: true
}
client(options)