Skip to content

Instantly share code, notes, and snippets.

@sampoder
Last active May 11, 2020 07:36
Show Gist options
  • Save sampoder/941502d05944326b8ad9bbdfd519b9a2 to your computer and use it in GitHub Desktop.
Save sampoder/941502d05944326b8ad9bbdfd519b9a2 to your computer and use it in GitHub Desktop.
Draft code for the Innovation Week 2021 Rickroll Workshop
const Nexmo = require('nexmo')
const nexmo = new Nexmo({
apiKey: process.env.API_KEY,
apiSecret: process.env.API_SECRET,
applicationId: process.env.APP_ID,
privateKey: 'private.key',
})
const ncco = [
{
action: "stream",
streamUrl: ["https://cdn.glitch.com/14c597d9-2a70-4f36-9d9f-42155d5791ed%2Fnever-gonna-give-you-up.mp3"]
}
]
nexmo.calls.create(
{
to: [{ type: 'phone', number: process.env.CALLING_PHONE }],
from: { type: 'phone', number: process.env.PERSONAL_PHONE },
ncco,
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment