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)