poe-auth is a command line tool to automate the obtention of a session token from Quora's Poe.
UPDATE: This library is currently broken as Quora's Poe can detect when sending automated queries. If someone know how to bypass that, feel free to contribute.
You can install this package using pip
pip install --upgrade git+https://github.com/krishna2206/poe-auth.git
You can use the poe-auth
command that will be installed in your system.
It has two options: --email
and --phone
.
You can use either one of them to authenticate to Poe.
poe-auth --email your.email@example.com
or
poe-auth --phone +33601234567
You can also use this package as a module. To do so, import the PoeAuth
class and instantiate it.
from poe_auth.V1 import PoeAuth
auth = PoeAuth()
# Send a verification code to your email
email = input("Enter your email: ")
status = auth.send_verification_code(email)
# Authenticate by entering the verification code
verification_code = input("Enter the verification code: ")
if status == "user_with_confirmed_email_not_found":
session_token = auth.signup_using_verification_code(
verification_code=verification_code, mode="email", email=email_adress)
else:
session_token = auth.login_using_verification_code(
verification_code=verification_code, mode="email", email=email_adress)
# Print the session token
print(session_token)
phone = input("Enter your phone number: ")
status = auth.send_verification_code(phone, mode="phone")
# Authenticate by entering the verification code
verification_code = input("Enter the verification code: ")
if status == "user_with_confirmed_phone_number_not_found":
session_token = auth.signup_using_verification_code(
verification_code=verification_code, mode="phone", phone=phone_number)
else:
session_token = auth.login_using_verification_code(
verification_code=verification_code, mode="phone", phone=phone_number)
# Print the session token
print(session_token)
The script will send a verification code to your email or phone number, depending on the option you choose. Enter the verification code when prompted, and the script will authenticate to Poe and display the session token. You can now use this token for this API.
MIT License
Copyright (c) 2023 Fitiavana Anhy Krishna
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.