kaggle api returns 401 - Unauthorized
See original GitHub issueI can’t download kaggle data via kaggle api, either on local and on google colab. I can download data on kaggle GUI, which means I successfully enrolled in the competition.
I followed the procedure on https://github.com/Kaggle/kaggle-api to use kaggle api.
Here are information on my environment.
ls /Users/.kaggle/
# ls /Users/.kaggle/
# kaggle.json
ls -l /Users/.kaggle/
# total 8
# -rw-r--r--@ 1 root admin 64 6 26 18:59 kaggle.json
kaggle competitions list
# 401 - Unauthorized
kaggle competitions download -c global-wheat-detection
# 401 - Unauthorized
pip show kaggle
# Name: kaggle
# Version: 1.5.6
# Summary: Kaggle API
# Home-page: https://github.com/Kaggle/kaggle-api
# Author: Kaggle
# Author-email: support@kaggle.com
# License: Apache 2.0
# Location: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
# Requires: python-dateutil, requests, python-slugify, six, tqdm, certifi, urllib3
# Required-by:
I thought the api token was not made correctly, so I made them all expire and made a new token again, but it did not work.
I appreciate if anyone help me out.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:14
- Comments:29
Top Results From Across the Web
API 401 - Unauthorized error | Data Science and ... - Kaggle
I installed the API via pip and then tried to run "kaggle competitions list", then I received "401 - Unauthorized" error, JSON file...
Read more >How to download data set into Colab? Stuck with a problem, it ...
kaggle datasets download -d clorichel/boat-types-recognition -p ./data But I am unable to download it into colab, I am getting error, "401 - ...
Read more >How to download datasets from Kaggle to Google Colab
Log in to your Kaggle account, click on your profile, go to your account, scroll to the API section and click Expire API...
Read more >Solved: Acquired token gives 401 Unauthorized when trying
Acquired token gives 401 Unauthorized when trying to create DataSet ... string resourceUri = "https://analysis.windows.net/powerbi/api"; string authorityUri ...
Read more >Kaggle API issue - Part 1 (2020) - fast.ai Course Forums
The error you get it is just kaggle authorization error. Make sure you have your kaggle.json in ~/.kaggle (the error you show now...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I ran into the same problem, but after creating a new Kaggle Token, the problem was fixed!
I’ve also run into this issue!