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?
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?
Here is the (french) 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’
}
It’s better but there is an error !
Check your quotes - are you using the correct quote character? Try double quotes instead of single quotes.
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.
Thanks !
User | Count |
---|---|
37 | |
31 | |
29 | |
22 | |
18 |