eigenein / my-iot-rs

Yet another home automation (alpha)
https://eigenein.github.io/my-iot-rs/html
MIT License
32 stars 5 forks source link

Ring.com service #61

Closed eigenein closed 4 years ago

eigenein commented 4 years ago
eigenein commented 4 years ago
❯ http 'https://oauth.ring.com/oauth/token' username="…" password='...' scope=client client_id=ring_official_android grant_type=password
HTTP/1.1 412 Precondition Failed

{
    "next_time_in_secs": 60,
    "phone": "+3xxxxxxxx44"
}
❯ http 'https://oauth.ring.com/oauth/token' username="…" password='...' scope=client client_id=ring_official_android grant_type=password 2fa-support:true 2fa-code:140429

{
    "access_token": "…",
    "expires_in": 3600,
    "refresh_token": "…",
    "scope": "client",
    "token_type": "Bearer"
}
eigenein commented 4 years ago
❯ http 'https://api.ring.com/clients_api/ring_devices' Authorization:'Bearer ...'
HTTP/1.1 200 OK
eigenein commented 4 years ago
❯ http 'https://api.ring.com/clients_api/doorbots/32333947/history' Authorization:'Bearer ...' 
HTTP/1.1 200 OK
eigenein commented 4 years ago
❯ http --follow 'https://api.ring.com/clients_api/dings/6845923959979729019/recording' Authorization:'Bearer ...' 
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 3132015
Content-Type: video/mp4
eigenein commented 4 years ago
❯ http 'https://oauth.ring.com/oauth/token' scope=client client_id=ring_official_android grant_type=refresh_token refresh_token='...'
HTTP/1.1 200 OK