Created
April 10, 2020 19:56
-
-
Save jsullivanlive/c247a07ff3f0ed0d5d6004252d70637e to your computer and use it in GitHub Desktop.
how to update intercom user and clear the user_id value
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
// currently this does not work, we get 2xx return code but user_id is still on record | |
const axios = require("axios"); | |
var basicAuth = { | |
auth: { | |
username: process.env.INTERCOM_TOKEN, | |
password: "", | |
}, | |
}; | |
var id = 'intercom user id'; | |
var data = { external_id: '' }; | |
await axios.put("https://api.intercom.io/contacts/" + id, data, basicAuth); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment