-
-
Save BastelPichi/b084aa5260331424735fadc3b8e1719d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
cc = input("Enter CC (e.g. GB): ") | |
phone = input("Phone Number (e.g. 7376493559): ") | |
data = { | |
"country_code": cc, | |
"phone_number": phone | |
} | |
headers = { | |
"x-app-version": "3.165.1", | |
"x-os": "Android", | |
"x-os-version": "28", | |
"model": "Pixel 3a XL", | |
"brand": "google", | |
"manufacturer": "Google", | |
"x-app-name": "Rider", | |
"user-agent": "okhttp/4.9.2" | |
} | |
r = requests.post("https://api.voiapp.io/v1/auth/verify/phone", json=data, headers=headers) | |
token = r.json().get("token") | |
if not token: | |
print("Error!") | |
print(r.text, r.status_code) | |
raise SystemExit | |
code = input("Enter code: ") | |
data = { | |
"token": token, | |
"code": code | |
} | |
r = requests.post("https://api.voiapp.io/v2/auth/verify/code", json=data, headers=headers) | |
verification_step = r.json().get("verificationStep") | |
if not verification_step: | |
print("Error!") | |
print(r.text, r.status_code) | |
raise SystemExit | |
if verification_step == "emailValidationRequired": | |
print("Let's create you an account!") | |
email = input("Enter email: ") | |
data = { | |
"token": token, | |
"email": email | |
} | |
r = requests.post("https://api.voiapp.io/v1/auth/verify/presence", json=data, headers=headers) | |
elif verification_step == "deviceActivationRequired": | |
print("You arent the first one to use that phone number 👀...") | |
data = { | |
"token": token, | |
"provider": "sms" | |
} | |
r = requests.post("https://api.voiapp.io/v3/auth/verify/device/activate", json=data, headers=headers) | |
elif verification_step == "authorized": | |
pass | |
auth_token = r.json().get("authToken") | |
data = { | |
"authenticationToken": auth_token, | |
} | |
r = requests.post("https://api.voiapp.io/v1/auth/session", json=data, headers=headers) | |
print("accessToken:", r.json().get("accessToken")) | |
print("authenticationToken:", r.json().get("authenticationToken")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment