team-telnyx / telnyx-python

Python SDK for the Telnyx API
MIT License
49 stars 16 forks source link

Bug and deprecation of feature in nacl library which existing implementation of telnyx webhook.py relies on #52

Closed mattsdevop closed 8 months ago

mattsdevop commented 3 years ago

Python 3.8.5 I experienced this issue https://github.com/pyca/pynacl/issues/525 while testing https://github.com/team-telnyx/telnyx-python/blob/master/telnyx/webhook.py I used pip3 install --upgrade telnyx to install latest. It looks like this is a known bug that they don't plan to fix. There is a PR prepared that deprecates the encoder= option from pynacl https://github.com/pyca/pynacl/pull/523.

Unfortunately, since it's a requirement to use the same encoder= option that was used to sign, it isn't possible to remove this on the receiving endpoint of the webhook call. It would need to be updated on the signing side.

Suggest using encoder = encoding.RawEncoder on the signing side before calling webhook remote server so that the endpoint can use the same.

To be explicit: this is currently preventing webhooks from working as they are described in the documentation. And blocking any implementation.

d-telnyx commented 3 years ago

@mattsdevop We're looking into this now. We don't use python on our server side so we're investigating the whole solution.