twilio / authy-python Goto Github PK
View Code? Open in Web Editor NEWAuthy API Client for Python
License: MIT License
Authy API Client for Python
License: MIT License
twilio has been a pain in the ass
me and my friend has been trying to work on an app and try different stuff like automating dictionary building dating apps
but when i try upgrading account it gets suspended i tried two accounts it got suspended
i asked my friend to try from his end in germany same thing happened
https://github.com/authy/authy-python/blob/6f7aa284de2bcefc424b55ecdf04e128081837d3/setup.py#L26
When looking to check if a package supports python 3 a nice standard computer readable place to check is via classifiers.
Travis fails after running the 3.6 tests because it's trying to re-release a version of the package that already exists to PyPI. Update the deploy script to fix this.
httplib2 default ca_certs doesn't validate the certificate for api.authy.com. I had to provide the path to the certs file on my webfaction account to the ca_certs parameter in the authy.api.resources.Resource.request method on the first line where where the Http class is instantiated.
It worked fine thereafter. It might be a good idea to provide a ca_certs as part of the configuration of the AuthyApiClient so you don't have to dig around in the code to configure it.
There might be a global method of configuring that parameter through the httplib2 module that I don't know about...
Per the verification api docs[1] there is support for a code_length param. However in authy-python, there does not seem to be support for this per the verification_start method [2].
1: https://www.twilio.com/docs/api/verify/rest
2: https://github.com/authy/authy-python/blob/d4857b6daf78c8fe4ee9fe37394ecd2027d31555/authy/api/resources.py#L318
A change was made to the verify function to use the python format method, but the substitution arguments weren't numbered which removes support for python 2.6.
Updating:
"/protected/json/verify/{}/{}"
to become:
"/protected/json/verify/{0}/{1}"
will resolve the issue
hi there,
not a python question directly but is there any plans to support this?
https://www.zdnet.com/article/google-backs-apples-sms-otp-standard-proposal/
Either directly or by allowing the SMS msg format to be specified?
I was able to install authy for python3, but this call fails:
from authy.api import AuthyApiClient
Seems like it may not actually be ready for Python3
Hi, I am wondering if it's possible to suspend users with API here? We just want to disable rather than delete the user. Thanks.
Deprecation warning due to invalid escape sequences. Using raw strings or escaping them again helps in resolving this. Check https://github.com/asottile/pyupgrade/ for automatic fix of this.
find . -iname '*.py' | grep -Ev 'rdf4|tool' | xargs -P4 -I{} python3.8 -Wall -m py_compile {}
./tests/test_client.py:25: DeprecationWarning: invalid escape sequence \d
self.assertRegex(self.api.version(), '\d.\d*')
PyPi shows 2.1.4
to be the latest release: https://pypi.python.org/pypi/authy
However, it doesn't seem like 2.1.4 is installable:
Collecting authy==2.1.4
Could not find a version that satisfies the requirement authy==2.1.4 (from versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 1.0.0, 2.0.0, 2.1.0, 2.1.1, 2.1.2, 2.1.3)
No matching distribution found for authy==2.1.4
Hi, I was wondering what the difference between verification_start (using via "sms") and request_sms was. I can't seem to find any ways to control the number of digits sent, and for the app that I am developing, I need a four-digit verification code (as is with the former command). However, I need to be able to resend codes. When I tested this, the codes became 7 digits long and I cannot figure out how options can be manipulated. Will this verification code also work with the command verification_check (such that if I use a combination of the two commands, the correct code will still update as necessary)? The documentation is a bit unclear so any help would be greatly appreciated. Thanks!
Curious if there are plans for an async version of this library?
If not, is there an open api specification (aka swagger) for the Authy API?
thanks,
Ian
This bit of code in authy/api/resources.py
doesn't work on GAE:
def __default_headers(self):
return {
'User-Agent': "AuthyPython/{0} ({1}; Python {2})".format(
__version__,
platform.platform(True),
platform.python_version()
)}
On GAE, platform.platform(True)
fails because it tries to open /usr/bin/python (or wherever the interpreter is located), and user code doesn't have access to that.
Replacing platform.platform(True)
with something like "google-app-engine"
works.
The link on pypi goes to http://github.com/authy/python-authy instead of https://github.com/authy/authy-python
Hi,
I'm trying to configure authy-python with my Twilio account. I follow the steps of both docs (Twilio and yours) and I can't get it working properly.
I receive the SMS and create the user in Authy users fine, but the SMS Code verify returns the following error all the times:
"No pending verifications for +34 NN-NNN-NNNN found."
The phone it's right but the verify doesn't works.
How can I should fix this? I'm trying a lot of configurations but although I receiving SMS i can't verify it.
Thanks and regards
We use this library in production, and as a best practice, we wish to make use of timeouts. Per python requests' documentation, "Nearly all production code should use this parameter in nearly all requests.".
Would it be possible to extend authy.api.resources.Resource
to take an optional timeout
parameter that is passed through to requests.request? It would need to be piped through from AuthyApiClient
to the individual Resource
implementations.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.