Skip to content

Instantly share code, notes, and snippets.

View iainelder's full-sized avatar

Iain Samuel McLean Elder iainelder

View GitHub Profile
@iainelder
iainelder / intercom-delete-old-users.js
Created October 12, 2018 15:56 — forked from zthomas/intercom-delete-old-users.js
Script to delete and clear old users from intercom. Useful for lowering the monthly bill
// License: MIT, feel free to use it!
const Intercom = require('intercom-client');
const appId = 'APP_ID'
const apiKey = 'APP_KEY'
const client = new Intercom.Client(appId, apiKey);
const async = require('async-q')
//REF: https://developers.intercom.com/reference#iterating-over-all-users
//WARNING: you can only have one scroll working at once. you need to wait for that scroll to clear to try again