Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy Error on Login #1

Open
dkofiarmah opened this issue Oct 1, 2023 · 1 comment
Open

Proxy Error on Login #1

dkofiarmah opened this issue Oct 1, 2023 · 1 comment

Comments

@dkofiarmah
Copy link

Any idea why I am getting a prox error on the requests? Happens when I tried to login. See error below:

During handling of the above exception, another exception occurred:
NO MATCH
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2077, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1525, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1523, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1509, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/home/dkarmah2/app/auth.py", line 103, in otp
res = requests.post("https://account-asia-south1.truecaller.com/v2/sendOnboardingOtp", json=data, headers=headers)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 559, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='account-asia-south1.truecaller.com', port=443): Max retries exceeded with url: /v2/sendOnboardingOtp (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden')))

@FadeHack
Copy link
Owner

FadeHack commented Oct 4, 2023

Have you updated the data object in otp() function (auth.py) change the following for your usage (countryCode, dialingCode, region)

 data = {
        "countryCode": "IN",
        "dialingCode": 91,
        "installationDetails": {
            "app": {
                "buildVersion": 5,
                "majorVersion": 11,
                "minorVersion": 7,
                "store": "GOOGLE_PLAY"
            },
            "device": {
                "deviceId": generate_random_string(16),
                "language": "en",
                "manufacturer": random.choice(phones_list)["manufacturer"],
                "model": random.choice(phones_list)["model"],
                "osName": "Android",
                "osVersion": "10",
                "mobileServices": ["GMS"]
            },
            "language": "en"
        },
        "phoneNumber": phoneNum,
        "region": "region-2",
        "sequenceNo": 2
    }

Also, The host is set to South Asia server as it will only permit phone numbers from that region

  •     res = requests.post("https://account-asia-south1.truecaller.com/v2/sendOnboardingOtp"
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants