HTTP Error 401: {"finance":{"result":null,"error":{"code":"Unauthorized","description":"Invalid Crumb"}}} #2776
Replies: 5 comments 5 replies
-
|
What does that bitly link resolve to? No one should be clicking mystery links. |
Beta Was this translation helpful? Give feedback.
-
|
I found a conversation @ sstrickx/yahoofinance-api#206 that lead to a finding. From a browser if I call "https://query1.finance.yahoo.com/v7/finance/quote?symbols=ORCL" I get an "Unauthorized" error. However if I ask yahoo for a crumb and append that to the call it works i.e. https://query1.finance.yahoo.com/v1/test/getcrumb Is there a method to get or replace a crumb in yfinance? I don't see yfinance documentation on handing crumbs. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, any idea why getting a crumb via https works from a browser, but doesn't work from yfinance data.py on one PC, but does on another? |
Beta Was this translation helpful? Give feedback.
-
|
I tried a quick experiment
Any idea why yfinance isn't recreating a cookies.db that works? |
Beta Was this translation helpful? Give feedback.
-
|
Thanks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
1st thanks for creating yfinance
I started to receive 401 errors when I call yfinance from one PC, but not from another. It looks like one PC/user became "Unauthorized" and I don't understand why. I'm using yfinance for personal reasons and not excessively. The error provides a link https://bit.ly/yahoo-finance-api-feedback
Quick background. I use yfinance in stock_quote and I started to see the 401 errors when I ran stock_quote from my main PC, however it still runs from my laptop (which runs the same version of stock_quote, yfinance and python). I certainly call yfinance more from my main PC as develop and test stock_quote on it, however my usage is light and I guess around 100-200 API call / day on average.
Is becoming "Unauthorized" expected? If so what are the usage limits? Can it be reset?
Note. I'm not looking forward to rewriting my app without yfinance, but I currently can not test or maintain it.
I can reproduce the issue directly in python
``Python 3.14.4 (main, Apr 8 2026, 17:48:49) [GCC 15.2.1 20260209] on linux
Type "help", "copyright", "credits" or "license" for more information.
Beta Was this translation helpful? Give feedback.
All reactions