Announcement

Collapse
No announcement yet.

401 Unauthorized error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    401 Unauthorized error

    New install, getting the same 401 unauthorized error as another poster in the forum.

    07/09/2017 02:22:33:530 PM : v2.0.17.0 - Request_Ring_History(): locationUrl --> /clients_api/doorbots/history?api_version=9&auth_token=TOKENREMOVED&limit=25
    07/09/2017 02:22:33:707 PM : v2.0.17.0 - Request_Ring_History(): thePageContents --> ERROR: The remote server returned an error: (401) Unauthorized.

    Suggestions on how to debug this to get your more information?

    Best,
    Bill

    #2
    Something has changed on the server side for Ring. I am seeing the same thing. I wonder if they blocked the URL and token.
    I can get a token but it seems to be invalid
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    Comment


      #3
      https://github.com/jeroenmoors/php-r...aster/ring.php

      I noticed they are emulating an Android client specifically when getting the auth token and in their client header. Worth a try?

      Comment


        #4
        The plugin already attempts this. They have changed something else.
        I am still investigating
        Cheers,
        Bob
        Web site | Help Desk | Feature Requests | Message Board

        Comment


          #5
          I installed the latest 2.0.18.0 but am still seeing the same 401's. I suspect you know this, but since the read-me said this was aimed at that I wanted to report it in case it was working in some cases but not all.

          Comment


            #6
            I have seen it work but it is spotty
            Back to the drawing board
            Cheers,
            Bob
            Web site | Help Desk | Feature Requests | Message Board

            Comment


              #7
              Installed 2.0.19.0 but unfortunately same 401 issue. Whats weird is I do see some history in the logs, but definitely the 401 and no devices are created.

              e.g. my log shows (after the 401)

              History:
              --------
              id: 6450421655978475430
              created_at: 8/4/2017 7:10:26 AM
              answered: False
              kind: motion
              favorite: False
              snapshot_url:
              Recording:
              ----------
              status: ready
              Doorbot:
              --------
              id: 1408934
              description: Casa Piedra Gate

              Guessing maybe you are working on an alternative way of getting the data. If so, devices aren't being created on that path.

              Comment


                #8
                It appears that a fix may have been found here: https://github.com/homespun/homebrid...bell/issues/16

                The relevant post:

                I just pushed up doorbot@2.0.0 with a fix that works for me now (and a fix for the video api).

                The token seems to get invalidated pretty quickly or lost on their side. So I added a retry on the 401 response and I go get a new token. I set my retry to 15 times with a 500ms delay and it seems to make it stable again for me.

                The Video API issue wasn't really an API issue, it was a "Javascript sucks at large numbers" issue. The id was being rounded during JSON.parse since it was too large for JS to handle. I has to cast it to a string so that it wasn't messed with.

                Comment


                  #9
                  I will take another look at this
                  Cheers,
                  Bob
                  Web site | Help Desk | Feature Requests | Message Board

                  Comment


                    #10
                    Thank you!

                    Comment


                      #11
                      Thanks, Blade for looking more at this! I'm excited to get to try this out.

                      Comment


                        #12
                        Any luck yet? I have the 401 blues...

                        Comment


                          #13
                          Not yet
                          Cheers,
                          Bob
                          Web site | Help Desk | Feature Requests | Message Board

                          Comment


                            #14
                            Given the post about the token expiring very quickly, have you tried ensuring the connection is kept alive and doing the request on the same connection you got the token from? Seems like a horrible token system, but perhaps the mobile apps keep the connection alive and don't see this issue?

                            Comment


                              #15
                              Any news on this..all seems quite broken.

                              Comment

                              Working...
                              X