homebridge-nest-cam_old icon indicating copy to clipboard operation
homebridge-nest-cam_old copied to clipboard

406 Not Acceptable when requesting access token

Open askovi opened this issue 5 years ago • 7 comments

The request from readme seems to not work anymore. It returns 406 Not Acceptable. However you can change the user-agent to iOS 13 instead of 11 and it will work again:

curl -X "POST" "https://home.nest.com/session" \
     -H 'User-Agent: iPhone iPhone OS 13.0 Dropcam/5.14.0 com.nestlabs.jasper.release Darwin' \
     -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' \
     --data-urlencode "email=YOUR_NEST_EMAIL" \
     --data-urlencode "password=YOUR_PASSWORD"

Please update the readme file.

askovi avatar Nov 24 '19 06:11 askovi

Replace user agent by something else like Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0. 2272.118 Safari/537.36.

funkyremi avatar Dec 01 '19 08:12 funkyremi

Thanks, that worked for me.

bookismllc avatar Dec 20 '19 17:12 bookismllc

curl wasn't working for me via the README or by using another user agent.

I was able to just go to https://home.nest.com/session in a browser and get my access token. This assumes that you're currently logged into https://home.nest.com/.

Do note:

I have 2FA enabled.

I did have Nest-Cam working prior to my access_token expiring when I noticed that my Nest Cam's weren't refreshing in HomeKit today.

thecoleorton avatar Jan 09 '20 02:01 thecoleorton

The suggestion to visit https://home.nest.com/session worked for me (I do not have 2FA enabled).

jeffvautin avatar Jan 20 '20 15:01 jeffvautin

@jeffvautin I was also able to get the access_token thru https:/home.nest.com/session. However, it still doesn't work for me and I get this error:

[NestCam]Failed to request access token. Unexpected API Error - 403

Is it working in your setup?

jqnatividad avatar Jan 20 '20 18:01 jqnatividad

^ Same here. I went to the /session page and got the token, which is massive. I DO have 2FA enabled.

Finch106 avatar Feb 11 '20 18:02 Finch106

curl wasn't working for me via the README or by using another user agent.

I was able to just go to https://home.nest.com/session in a browser and get my access token. This assumes that you're currently logged into https://home.nest.com/.

Do note:

I have 2FA enabled.

I did have Nest-Cam working prior to my access_token expiring when I noticed that my Nest Cam's weren't refreshing in HomeKit today.

This needs to be in the README

opswhisperer avatar Feb 20 '20 16:02 opswhisperer