Osintgram icon indicating copy to clipboard operation
Osintgram copied to clipboard

HTTP Error 401: Unauthorized. Please help.

Open EshanShekhaji opened this issue 3 years ago • 3 comments

I get this error when i run the command "fwingsemail"

Run a command: fwingsemail
Searching for emails of users followed by target... this can take a few minutes
Do you want to get all emails? y/n: n
How many emails do you want to get? 1
Catched 0 followings emailTraceback (most recent call last):
  File "/home/mshekhaji/.local/lib/python3.9/site-packages/instagram_private_api/client.py", line 523, in _call_api
    response = self.opener.open(req, timeout=self.timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.9/urllib/request.py", line 561, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mshekhaji/Osintgram/main.py", line 186, in <module>
    _cmd()
  File "/home/mshekhaji/Osintgram/src/Osintgram.py", line 1343, in get_fwingsemail
    user = self.api.user_info(str(follow['id']))
  File "/home/mshekhaji/.local/lib/python3.9/site-packages/instagram_private_api/endpoints/users.py", line 17, in user_info
    res = self._call_api('users/{user_id!s}/info/'.format(**{'user_id': user_id}))
  File "/home/mshekhaji/.local/lib/python3.9/site-packages/instagram_private_api/client.py", line 527, in _call_api
    ErrorHandler.process(e, error_response)
  File "/home/mshekhaji/.local/lib/python3.9/site-packages/instagram_private_api/errors.py", line 135, in process
    raise ClientError(error_msg, http_error.code, error_response)
instagram_private_api.errors.ClientError: Unauthorized: Please wait a few minutes before you try again.

Any help would be greatly appreciated.

EshanShekhaji avatar Dec 30 '22 17:12 EshanShekhaji

Did you try logging in to see if you have to reset your password or clearing cookies with -C ?

adyrol avatar Dec 31 '22 18:12 adyrol

This happens to me whenever I try any email or phone scrape. I ve tried multiple computers with different linnux distros, from different IP addresses (I tried on my home network, my neighbors network, public wifi etc...)

same result as you instagram_private_api.errors.ClientError

kicked off after 5 minutes scraping emails or phones.

It will connect to the account and cache the emails, but then kicks me off right after

1qaz0okm avatar Jan 05 '23 00:01 1qaz0okm

Did you try logging in to see if you have to reset your password or clearing cookies with -C ?

i did. but error still persists

EshanShekhaji avatar Jan 17 '23 10:01 EshanShekhaji