jessecooper / pyetrade

Python E-Trade API Wrapper
GNU General Public License v3.0
205 stars 96 forks source link

Token request failed with code 401 #52

Closed viaConBodhi closed 2 years ago

viaConBodhi commented 2 years ago

Anyone else getting this while attempting login? I just ran it last night and got this error. Rebooted thinking it was something simple but looks like it's not. Looks like it hanging up on the following. Any thoughts on what's happening as things were working fine a week ago.

self.session.fetch_request_token(self.req_token_url) token = self._fetch_token(url, **request_kwargs) raise TokenRequestDenied(error % (r.status_code, r.text), r)

TokenRequestDenied: Token request failed with code 401, response was '<!doctype html>HTTP Status 401 – Unauthorized

HTTP Status 401 – Unauthorized


Type Status Report

Message oauth_problem=consumer_key_rejected

Description The request has not been applied because it lacks valid authentication credentials for the target resource.


'.

viaConBodhi commented 2 years ago

Just heard back from eTrade tech support after trying to debug throughout the day. Looks like the keys expire after 2 years and I did not receive notice and/or remember that's a thing. They are working to reinstate access. Hope this at least helps someone else to mark their calendar a few weeks prior to their 2 year mark so things don't stop working all of a sudden.

1rocketdude commented 2 years ago

this is a typical problem with Etrade. Put the date on your calendar for a month before renewal so that you don't have expired keys next time. My sense is there is one person manning the "keys desk" and they don't have any automation for checking usage, revocation, or renewal.

On Oct 27, 2021, at 2:56 PM, viaConBodhi @.***> wrote:

Just heard back from eTrade tech support after trying to debug throughout the day. Looks like the keys expire after 2 years and I did not receive notice and/or remember that's a thing. They are working to reinstate access. Hope this at least helps someone else to mark their calendar a few weeks prior to their 2 year mark so things don't stop working all of a sudden.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jessecooper/pyetrade/issues/52#issuecomment-953304644, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABE3CHDRQ6WG6KLOZEXDWVDUJBRRVANCNFSM5G2JXJUA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

viaConBodhi commented 2 years ago

@1rocketdude thanks for the feedback on this. Lesson learned.

mw66 commented 1 year ago

this is a typical problem with Etrade. Put the date on your calendar for a month before renewal so that you don't have expired

How to do renew? send email to their support?

1rocketdude commented 1 year ago

send a secure message from within the web platform. There is a specific menu item for API keys. Use kind words, rub your lucky rabbits foot, give offerings to local deities, and within a week, it’ll just start working.

I don’t have a good sense how the API will “work” after Sept 1 switchover to Morgan Stanley…

On Jul 17, 2023, at 2:26 PM, mw66 @.***> wrote:

this is a typical problem with Etrade. Put the date on your calendar for a month before renewal so that you don't have expired

How to do renew? send email to their support?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.