Uploaded image for project: 'AdMaxLocal'
  1. AdMaxLocal
  2. AML-2835

Handle expired (OAuth) access tokens for AdWords sessions

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Newport, Diu
    • Fix Version/s: Diu
    • Component/s: None
    • Labels:
      None
    • Story Points:
      8
    • Sprint:
      Sprint 5, Sprint 6

      Description

      We create one AdWords session per account and retrieve a token from the cache (good for anywhere between 5 minutes to an hour) when sessions are created. This means if a session is open for longer than an hour the access token will expire and any subsequent calls to the API will fail. I consulted Jeff T and while this isn't likely with a small number of clients we should still handle this scenario. Most of our API calls (deployment, bid updates, SearchEngineUpdater) finish pretty quickly, definitely within an hour, which is why we have never seen it happen in dev or QA.

      The BES code needs refactoring to handle OAuth exceptions. I consulted with the devs on SMS and the workaround is to give the tokens a minimum lifetime of 30 minutes (15 in SMS). The chance of this happening in BES is also greatly reduced because each thread only uses the session for one API call.

      This does not apply to geolocation service requests because everytime we validate an address we get a token from the cache (we make a new AW session with a token that sapi got from the cache) and immediately make the one API request. If the request times out or if we get a REE a new request must come into SAPI because Geolocation service has no knowledge of OAuth service and therefore cannot access the token cache. Keeping Geolocation and OAuth services separate is by design.

        Attachments

          Activity

            People

            • Assignee:
              varshini.padmanabhan Varshini Padmanabhan (Inactive)
              Reporter:
              stacie.waleyko Stacie Waleyko (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: