diff --git a/app.py b/app.py index ec0e4d9..535d1e4 100644 --- a/app.py +++ b/app.py @@ -7,9 +7,9 @@ from pathlib import Path from apicalls import * -# Get API key and Email address +# Get API tocken and Email address def getCredentials(): - api_key = input("Enter the Cloudflare API key: ") + api_key = input("Enter the Cloudflare API token: ") email_address = input("Enter the Cloudflare Email address: ") return {"api_key": api_key, "email": email_address} @@ -20,7 +20,8 @@ if len(argv) > 1 and 'loadconfig' in argv: if Path("config.json").exists(): configfile = open("config.json") config = json.load(configfile) - credentials = {'api_key': config['API_Key'], 'email': config['Email']} + credentials = { + 'api_key': config['API_Token'], 'email': config['Email']} else: print('config.json was not found. Please enter the credentials manually') credentials = getCredentials() @@ -73,4 +74,4 @@ if domainToDelete in zone_list: else: print('Aborted, bye...') else: - print('We don\'t have access to the domain name you have entered. Please make sure the API key you have provided has access to the domain name you have entereed.') + print('We don\'t have access to the domain name you have entered. Please make sure the API token you have provided has access to the domain name you have entereed.') diff --git a/config_sample.json b/config_sample.json index 28cfe58..e2fa468 100644 --- a/config_sample.json +++ b/config_sample.json @@ -1,4 +1,4 @@ { - "API_Key": "your api key goes here", + "API_Token": "your api key goes here", "Email": "your cloudflare email address" }