Login to your Kaggle account and go to My Account -> API and Create New API Token. This will download your API token file, kaggle.json, on your machine..