Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
The Telnyx "Twexit" Python library allows users to send messages and validate webhooks with minimal changes to their existing Twilio messaging code.
This SDK can be installed either via pip
:
pip install twexit
or direct from source by downloading and unzipping the repository from here, then from within the twexit-python
folder, run
python setup.py install
Complete the Portal Setup to set up a messaging-enabled number.
Follow the additional Twexit setup steps to configure webhooks
from twilio.rest import Client
# Your organization ID from
account_sid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
# An API key from https://portal.telnyx.com/#/app/api-keys
auth_token = "KEY0123456789xxxxx"
message = client.messages.create(
to="+13125550123",
from_="+16165550123",
body="Free yourself with Twexit!"
)
print(message.sid)
Twexit uses a fast asymmetric signing algorithm, Ed25519, to avoid issues discovered with SHA-1. To switch from the HMAC-SHA1 signing method, follow these steps:
Obtain your account's public key at https://portal.telnyx.com/#/app/account/public-key
Update your application to use the TwexitRequestValidator
instead of RequestValidator
Extract the X-Twexit-Signature
from the request and provide that when calling the validator.
from twilio.request_validator import TwexitRequestValidator
public_key = "abcdef123456xxxxx"
validator = TwexitRequestValidator(public_key)
url = 'https://mycompany.com/myapp.php?foo=1&bar=2'
params = {
"MessageSid": "CA1234567890ABCDE",
"ApiVersion": "2010-04-01",
"Body": "Aloha!",
"From": "+13125550123",
"To": "+16165550123",
}
# The X-Twexit-Signature header attached to the request
twexit_signature = '0/KCTR6DLpKmkAf8muzZqo1nDgQ='
print(validator.validate(url, params, twexit_signature))
This SDK currently only provides the capability to send messages via REST and validate webhooks when receiving messages. Configuration of the messaging product and other products (voice, fax) are not yet supported.
FAQs
Telnyx Twexit API client
We found that twexit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.