TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker and becoming a Supporting Member. For more info: Support TMC

Does making too many token requests get you throttled?

Discussion in 'Model S: User Interface' started by wayner, Dec 28, 2016.

  1. wayner

    wayner Active Member

    Oct 29, 2014
    I am doing some playing around and I am no unable to get a token. My process uses that requests a new token every time you use it. Is this a way of getting locked out? Should I just cache a token an reuse it until it stops working?
  2. Drewflux

    Drewflux Member

    Aug 25, 2015
    Short answer is yes. its happened to other members in the model s rest API thread.
  3. tliving

    tliving Member

    Mar 8, 2014
    New England, USA
    Teslajson didn't used to let you provide the token back to it, so I forked it and added the feature and the owner merged it back in. That was back in Feb 2016. Unfortunately the original author just made a change (1.2) that broke that feature -- you can't get the token back any more.

    That broke a bunch of my stuff, so I reported it and resorted to going back to using my fork:
    GitHub - the-mace/teslajson: Simple Python class to access the Tesla JSON API

    With that fork you can get the access_token from the Connection object and keep it around for however long you want. This is how connects to Tesla owner's accounts only once and then only keeps the token (not any passwords) for long term monitoring.
  4. cryptyk

    cryptyk Member

    Jul 8, 2015
    United States
    I used to run EvMote. I had a few thousand teslas using the site and lots of testing before it went public. I never saw any intentional throttling from the tesla APIs even with thousands of concurrent GPS stream connections and hundreds of concurrent API requests. I also did lots of messing around with the APIs while I was developing and I'm sure I requested oauth tokens a few hundred times per hour in the early days.

    I'm sure they will throttle you if you're abusive, but the threshold appears to be pretty high...
  5. cytranic

    cytranic Member

    Aug 14, 2015
    Yes, when I was testing, especially when making bad calls they would rate limit me... Normally for a few hours, but i've seen 24 hours as well.

Share This Page

  • About Us

    Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.
  • Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.