•   over 10 years ago

Not receivng calls when using Voice message template

Hi

I am trying to use Voice message templates and was able to create one successfully. When I make a call referencing the Template ID, the API responds back with a 202 Accepted and a message:

Your request has been accepted for processing

However, I never receive a call. Here is the template for the voice message I created: 0F3E9238E54BAB10

Thanks
Ahmed

  • 5 comments

  • Manager   •   over 10 years ago

    Hi Ahmed. I recommend that you check the messagestatus endpoint for your message. You'll receive the ID for the generated message as the Location Header when you get the 202 response.

    This endpoint will show you the status of your message being in either Sent, Received or Undeliverable status.

    It will also provide further information around why the message is in the status.

    If that doesn't provide you any information, please check your request payload against the one provided here: https://whispir.github.io/api/#voice-messages

    Please note that the 'type' section is mandatory, and it is required to have at least the string provided in the example.

    Let us know how you go.

    Jordan

  •   •   over 10 years ago

    Hi Jordan,

    I tried the URL from the Location Header and that returns a 404 with this message:

    The resource that you have requested does not exist. Please check the identifier and try again

    I tried creating a SMS template instead of voice but I get the same 404 error from the Location URL.

  •   •   over 10 years ago

    Here are my cURL requests for reference:

    1. Creating a SMS template
    curl --request POST --url 'https://api.whispir.com/templates?apikey=[redacted]' --header 'authorization: Basic [redacted]' --header 'content-type: application/vnd.whispir.template-v1+json' --data '{"messageTemplateName": "Sample SMS Template - test", "messageTemplateDescription": "Template to provide an example on whispir.io", "subject": "Test SMS Message","body": "This is the body of my test SMS message"}'

    2. Referencing template
    curl --request POST \
    > --url 'https://api.whispir.com/messages?apikey=[redacted]' \
    > --header 'authorization: Basic [redacted]' \
    > --header 'content-type: application/vnd.whispir.message-v1+json' \
    > --data '{"to" : "+1000000","messageTemplateId" : "8010D66825730096"}'
    Response: Your request has been accepted for processing
    Location: https://api.whispir.com/messages/61E488C6DD7709FC?apikey=[redacted]

  • Manager   •   over 10 years ago

    Hi Ahmed,

    Thanks for your detailed message. It has highlighted an issue that a recent release has pushed into production.

    Essentially you also need to provide content for the 'email', 'voice' and 'web' sections of your template, even if they're empty.

    Please update your template creation to include the following data:

    --data '{"messageTemplateName": "Sample SMS Template - test", "messageTemplateDescription": "Template to provide an example on whispir.io", "subject": "Test SMS Message","body": "This is the body of my test SMS message", "email": {},"voice" : {},"web" : {}}'

    Basically this is just adding empty content to the three objects, email, voice and web. This will create your template correctly, and your above POST to the /messages endpoint will work as expected.

    I'll update the documentation to reflect the above and get the guys to update the application to make this clearer.

    Thanks

    Jordan

  •   •   over 10 years ago

    Thanks, I am now able to use templates for both SMS and Voice.

Comments are closed.