Last active
February 11, 2020 11:20
-
-
Save madeindjs/4a710b67b9c858e2233b7e4d01b28287 to your computer and use it in GitHub Desktop.
This file contains 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 Intercom = require('intercom-client'); | |
const myAdminId = 3385260; | |
const client = new Intercom.Client({ token: '...=' }); | |
const until = new Date(2020, 3, 15); | |
const conversationId = 25726415330; | |
client.conversations.reply({ | |
id: conversationId, | |
message_type: 'snoozed', | |
snoozed_until: until.getTime(), | |
admin_id: myAdminId, | |
}) | |
.then(() => console.log('success')) | |
.catch(e => console.error(e.body)) | |
// { | |
// type: 'error.list', | |
// request_id: '00062udkp728do6dr380', | |
// errors: [ { code: 'server_error', message: 'Server Error' } ] | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment