Using Webhook

Hello,

I have an http request that works from a browser:

https://apirest.isendpro.com/cgi-bin/sms?keyid=xxx&num=9999999999&sms=Text&nostop=1&sandbox=1

How to configure a webhook to run it?

All my tries result in a (400) Bad Request error

Thank you for your help !

Need a bit more info. Screenshots or configuration settings?

1 Like

Hello !

Thanks ! Here is a screen shot. !

You need to check the HTTP Verb - I think the endpoint is expecting a GET.

If so, you will have to change your Url to be what you currently have in the Body, leave the Body blank.

Also, the HTTP Content Type seems incorrect as well - my guess is it should be JSON.

Is there a documentation page for this web service?

1 Like

Here is the (french) documentation !

https://www.isendpro.com/api-sms-documentation

You are trying to send an SMS, it appears. For that, you need to do a POST.

The Python code is given:

import requests

url = 'https://apirest.isendpro.com/cgi-bin/sms'
params = {
    'keyid':    'a296464ce012b8ab710a',
    'num':      '33601020304',
    'sms':      'Bonjour! Bienvenue sur iSendPro!',
    'emetteur': 'isendpro'
}
response = requests.post(url, params)
print(response.text)

You need to configure your webhook as follows:

Url: https://apirest.isendpro.com/cgi-bin/sms
HTTP Verb: POST
HTTP Content Type: JSON
Body: {
‘keyid’: ‘a296464ce012b8ab710a’,
‘num’: ‘33601020304’,
‘sms’: ‘Bonjour! Bienvenue sur iSendPro!’,
‘emetteur’: ‘isendpro’
}

1 Like

It’s better but there is an error !

“Errors”: “Error: Failed to parse JSON due to Invalid property identifier character: ‘. Path ‘’, line 1, position 1… Invalid JSON value starts with: ‘keyid’: ‘au73aoQgHk98kvoLzmP75NQ3g8TmKK2j’,‘num’: ‘0695390116’,‘sms’: ‘Bonjour! Bienvenue sur iSend”,

Check your quotes - are you using the correct quote character? Try double quotes instead of single quotes.

1 Like

With this body :
{
“keyid”: “au73aoxxxxxxx75NQ3g8TmKK2j”,
“num”: “0695390116”,
“sms”: “Bonjour! Bienvenue sur iSendPro!”
}

“Exception”: "Webhook HTTP post request failed with exception The remote server returned an error: (400) Bad Request. ",

At this point, I can no longer help - you will have to check the logs in your isendpro dashboard or contact their support. Good luck.

1 Like

Thanks !