Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Figured it out myself.
Might be useful to someone:
mango_json = {
"command_id": "sms",
"text": sms_text,
"from_extension": "111",
"to_number": phone_number,
"sms_sender": "name"
}
# генерируем подпись
sign = sha256(settings.MANGO_API_KEY + json.dumps(mango_json) + settings.MANGO_SALT).hexdigest()
data = {
'vpbx_api_key': settings.MANGO_API_KEY,
'sign': sign,
'json': json.dumps(mango_json)
}
requests.post(self.sms_api_url, data=data)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question