jeffreydwalter / arlo

Python module for interacting with Netgear's Arlo camera system.
Apache License 2.0
520 stars 123 forks source link

Snapshots randomly stopped working - 403 Client Error: Forbidden for url: https://my.arlo.com/hmsweb/login/v2 #149

Closed meriksson123 closed 4 years ago

meriksson123 commented 4 years ago

Please answer these questions before submitting your issue. Thanks!

What version of Python are you using (python -V)?

Python 2.7.15+

What operating system and processor architecture are you using (python -c 'import platform; print(platform.uname());')?

('Linux', 'ip-172-31-31-209', '4.15.0-1063-aws', '#67-Ubuntu SMP Mon Mar 2 07:24:29 UTC 2020', 'x86_64', 'x86_64')

Which Python packages do you have installed (run the pip freeze or pip3 freeze command and paste output)?

arlo==1.2.33
asn1crypto==0.24.0
boto==2.49.0
boto3==1.11.16
botocore==1.14.16
certifi==2019.11.28
chardet==3.0.4
cryptography==2.1.4
docutils==0.15.2
enum34==1.1.6
feedparser==5.2.1
futures==3.3.0
idna==2.8
ipaddress==1.0.17
jmespath==0.9.4
keyring==10.6.0
keyrings.alt==3.0
monotonic==1.5
pycrypto==2.6.1
pygobject==3.26.1
pyOpenSSL==17.5.0
PySocks==1.7.1
python-dateutil==2.8.1
pyxdg==0.25
requests==2.22.0
s3transfer==0.3.3
SecretStorage==2.3.1
six==1.12.0
sseclient==0.0.22
ubidots==1.6.6
urllib3==1.25.7

Which version of ffmpeg are you using (ffmpeg -version)?

ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil      55. 78.100 / 55. 78.100
libavcodec     57.107.100 / 57.107.100
libavformat    57. 83.100 / 57. 83.100
libavdevice    57. 10.100 / 57. 10.100
libavfilter     6.107.100 /  6.107.100
libavresample   3.  7.  0 /  3.  7.  0
libswscale      4.  8.100 /  4.  8.100
libswresample   2.  9.100 /  2.  9.100
libpostproc    54.  7.100 / 54.  7.100

Which Arlo hardware do you have (camera types - [Arlo, Pro, Q, etc.], basestation model, etc.)?

Arlo Pro 2 Base statation VMB4000r3

What did you do?

If possible, provide the steps you took to reproduce the issue. A complete runnable program is good. (don't include your user/password or any sensitive info)

Everything has been working fine until the 21/03/2020 - I have an arlo snapshot run every day on 3 cameras.

I'm using the below testing code to rule out anything else, and it fails - I have tried different users to confirm auth isnt an issue.

`
from arlo import Arlo

USERNAME = 'username'
PASSWORD = 'password'
import os
from shutil import copyfile
import time
timestr = time.strftime("%Y%m%d-%H%M%S")
print timestr

try:
        # Instantiating the Arlo object automatically calls Login(), which returns an oAuth token that gets cached.
        # Subsequent successful calls to login will update the oAuth token.
        arlo = Arlo(USERNAME, PASSWORD)
        # At this point you're logged into Arlo.

        # Get the list of devices and filter on device type to only get the basestation.
        # This will return an array which includes all of the basestation's associated metadata.
        basestations = arlo.GetDevices('basestation')
except Exception as e:
    print(e)
`

What did you expect to see?

No errors

What did you see instead?

20200325-102847
403 Client Error: Forbidden for url: https://my.arlo.com/hmsweb/login/v2

Does this issue reproduce with the latest release?

Yes - i updated and its still happening

optilude commented 4 years ago

I've got the same error in a script that was working fine for months. I've confirmed that I'm able to log in via the username and password on the Arlo website, so I wonder if Arlo have restricted access to the API or changed it somehow?

KristianKarl commented 4 years ago

I get the same problem as above. I can however login using:

curl -s -H "Content-Type: application/json;charset=UTF-8" -d '{"email":"EMAIL","password":"PASSWORD"}' -X POST "https://arlo.netgear.com/hmsweb/login/v2"

Using python2 on a rapsbian OS

pip freeze
arlo==1.2.33
asn1crypto==0.24.0
broadlink==0.9
certifi==2019.6.16
chardet==3.0.4
configparser==3.5.0b2
cryptography==2.6.1
entrypoints==0.3
enum34==1.1.6
idna==2.8
ipaddress==1.0.17
keyring==17.1.1
keyrings.alt==3.1.1
monotonic==1.5
netaddr==0.7.19
pyarlo==0.2.3
PyCRC==1.21
pycrypto==2.6.1
pycryptodome==3.4.11
PyGObject==3.30.4
PySocks==1.7.1
pyxdg==0.25
requests==2.22.0
RPi.GPIO==0.7.0
SecretStorage==2.3.1
six==1.12.0
sseclient==0.0.22
urllib3==1.25.3
gkulasik commented 4 years ago

Same issue on Python 3.6.9. "403 Client Error: Forbidden for url: https://my.arlo.com/hmsweb/login/v2"

I wonder if Arlo started enforcing their 2FA changes early.

jeffreydwalter commented 4 years ago

This issue should be fixed. Going to close this, please let me know if it's still a problem.

KristianKarl commented 4 years ago

I can confirm that it works. Thanks!

jeffreydwalter commented 4 years ago

@KristianKarl thank you!

gkulasik commented 4 years ago

I also can confirm this is working. Thanks!

meriksson123 commented 4 years ago

Confirmed! thanks @jeffreydwalter