Created
April 9, 2020 22:42
-
-
Save jsullivanlive/800b8721146bb41082904ef35da39090 to your computer and use it in GitHub Desktop.
intercom search error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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