Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

237
Views
Connecting to AVS with Node.js returns strange error

I am trying to connect to the AVS API with Node.js as the client, but I keep getting a strange error while trying to read from amazon's response:

Error:

{ Error: Parse Error

   at TLSSocket.socketOnData (_http_client.js:411:20)

   at emitOne (events.js:96:13)

   at TLSSocket.emit (events.js:191:7)

   at readableAddChunk (_stream_readable.js:178:18)

   at TLSSocket.Readable.push (_stream_readable.js:136:10)

   at TLSWrap.onread (net.js:559:20) bytesParsed: 0, code: 'HPE_INVALID_CONSTANT' }

and here is my code:

var options = {
    url: 'https://avs-alexa-na.amazon.com/v20160207/directives',
    headers: {
      'Authorization': 'Bearer ' + JSON.parse(localStorage.getItem('CREDS')).access_token
    }
  };

  request.get(options).then((result) => {
    console.log(result)
      // localStorage.setItem('CREDS', result);
    res.send("Authenticated")
  })

I did some research and it said this would be an issue on Amazon's side, any workaround or fixes in the near future?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!