Skip to content

Instantly share code, notes, and snippets.

@jsullivanlive
Created April 9, 2020 22:42
Show Gist options
  • Save jsullivanlive/800b8721146bb41082904ef35da39090 to your computer and use it in GitHub Desktop.
Save jsullivanlive/800b8721146bb41082904ef35da39090 to your computer and use it in GitHub Desktop.
intercom search error
const axios = require("axios");
var basicAuth = {
auth: {
username: process.env.INTERCOM_TOKEN,
password: "",
},
};
(async () => {
// this works fine
var res = await axios.get("https://api.intercom.io/contacts", basicAuth);
console.log(res.data);
// this fails as not_found
var res = await axios.post(
"https://api.intercom.io/contacts/search",
{ query: { field: "deleted", operator: "=", value: "true" } },
basicAuth
);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment