6 Replies Latest reply on Mar 10, 2016 11:56 AM by bb695b98d6ca97757add46dcb5e5929b043b2ab3

    Getting expired token


      I have a number of jobs that connect to marketo to download or upload data via RESTAPI.


      each one connects, and geta a session token:



      Token: b181289f-013d-4075-bda4-80a4583071a9:ab and expires in 0


      So I added a check for the expiration:   and if expired, get a new token.  

      try 2nd time to get a token: b181289f-013d-4075-bda4-80a4583071a9:ab returned


      same expired token returned.


      obvious result when using CURL:
      {"requestId":"c500#153609e0084","success":false,"errors":[{"code":"602","message":"Access token expired"}]}


      Why do i get an expired token, and why do i get the same expired token a 2nd time, even after checking?


      This job typically runs in seconds and only grabs a few 100k of data.


      Its not always the same job either.  it could be the first one of the morning, or the 3rd one, 45 minutes later.