jessecooper/pyetrade

Token request failed with code 401

Closed this issue · 5 comments

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><title>HTTP Status 401 – Unauthorized</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style>

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.


'.

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 thanks for the feedback on this. Lesson learned.

mw66 commented

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?