406 'Not Acceptable' Error from Basecamp API

49 views Asked by At

I'm getting a 406 'Not Acceptable' error from the Basecamp API when using pagination. I'm using Axios in a Node.js script.

Here's an example URL: https://3.basecampapi.com/xxxxxxxxx/buckets/xxxxxxxxx/todosets/xxxxxxxxx/todolists.json?page=2

I have tried many different Accept headers, including 'text/html; charset=UTF-8', '*/*', 'application/json', 'text/javascript'.

I only get the error when adding the 'page' parameter, so I can get page 1 fine. I get no error when making the call from Postman. I've copied Postman's headers exactly and it still will not work.

1

There are 1 answers

0
nodnarbisc On

This was solved by updating Axios from version 1.0.0 to version 1.1.2. Thanks to @Phil for the suggestion.