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 |
---|---|
36 | |
33 | |
27 | |
23 | |
18 |