HTTP API - SMS MO: Can't verify the "ACK/Jasmin" body

124 views
Skip to first unread message

Charles Bernard

unread,
Apr 29, 2022, 10:00:42 AM4/29/22
to Jasmin SMS Gateway
Dear team, 

I am trying to set a python API to receive SMS MO.
it's fairly easy and I managed to receive the SMS on my API.

However, I am supposed to acknowledge the SMS by responding with "ACK/Jasmin" and I can't make it work.

I checked the group conversation and found that in the code you check the content:
the code is checking the content of the response.
However, content from a response of a request is stored in bytes in python.
No matter how I send the response, the content.stripe() will always be: b'"ACK/Jasmin"'
The code would ideally need to check the response.text.


but would you have similar working example with Python?

regards,
Charles


Rasto Rickardt

unread,
Apr 30, 2022, 9:56:27 AM4/30/22
to jasmin-sm...@googlegroups.com

Hello Charles,

i think this is with 0.10 version of Jasmin.

I saw it multiple times, looks like since python3/0.10 version everything is handled as bytes.

Therefore i suppose check should be rewritten on server side like ... if content.strip().decode() != 'ACK/Jasmin':

I possibly misunderstand something so maybe someone can shed more light on what is expected to happen here.

Kind Regards

Rasto

--
Jasmin SMS Gateway -- http://jasminsms.com
Commercial support: https://jasminsms.atlassian.net/servicedesk/customer/portal/1
---
You received this message because you are subscribed to the Google Groups "Jasmin SMS Gateway" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jasmin-sms-gate...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/jasmin-sms-gateway/f9875497-9ddb-45e4-8ce2-5c37508920cdn%40googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages