Skip to content

Instantly share code, notes, and snippets.

Avatar
🥧
These pies, these pies, not as good as our API's. https://youtu.be/Umq_hehfqPo

Toni Kuschan klapperkopp

🥧
These pies, these pies, not as good as our API's. https://youtu.be/Umq_hehfqPo
View GitHub Profile
View example_job.json
{
"name": "Whatsapp News Send",
"tags": [
"news",
"de",
"2022-10-01"
],
"definition": {
"type": "segmentation-job",
"recipients": {
@klapperkopp
klapperkopp / sample-cooper-template-sending-via-ai.sh
Created Jul 4, 2022
Cooper Whatsapp Templates via AI Studio
View sample-cooper-template-sending-via-ai.sh
curl --location --request POST 'https://studio-api-eu.ai.vonage.com/messaging/conversation' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-Vgai-Key: YOUR_AI_STUDIO_API_KEY_FROM_STUDIO_PROFILE_ICON' \
--data-raw '{
"components": [
{
"type": "header",
"parameters": [
{
View sample_request_body_cooper.json
{
"to": "RECEIVER_NUMBER",
"from": "SENDER_NUMBER",
"channel": "whatsapp",
"message_type": "custom",
"custom": {
"type": "template",
"template": {
"namespace": "3b6524f9_2ce0_4165_afe9_25ad81f5f781",
"name": "user_confirmation_cooper",
View ncco-tts-with-ssml-into-call.json
[
{
"action": "talk",
"text": "<speak>Sein <break strength='weak' />oder nicht sein<break strength='weak' />das ist die Frage.</speak>",
"bargeIn": false,
"level": 0.25,
"language": "de-DE",
"style": 6,
"loop": 2
}
View ncco-asr.json
[
{
"action": "input",
"eventUrl": [
"https://webhook.site/098b0f8f-700c-43b4-bda9-6971d7a28a21"
],
"type": [ "speech" ],
"speech": {
"saveAudio": "true"
}
@klapperkopp
klapperkopp / ncco-loop-audio-into-call.json
Last active Jan 26, 2022
ncco-loop-audio-into-call.json
View ncco-loop-audio-into-call.json
[
{
"action": "talk",
"text": "Welcome to a Vonage scream service. Enjoy.",
"voiceName": "Amy"
},
{
"action": "stream",
"streamUrl": ["https://dl.dropboxusercontent.com/s/ea81s0ebaakm3ki/1hourscreaming.mp3"]
}
View ncco-record.json
[
{
"action": "talk",
"text": "Please say something."
},
{
"action": "record",
"endOnSilence": "10",
"timeout": "30",
"eventUrl": ["https://example.com/recordings"]