Skip to content

Instantly share code, notes, and snippets.



Created May 16, 2018
What would you like to do?
Check for key validation
from mapbox import Geocoder
def banner():
return "\n[*] "
def mapbox():
API_TOKEN = raw_input("Enter the Mapbox API key here and press enter:\n")
token_type = API_TOKEN[:2]
if token_type == "pk":
print "\n[+] Key is Public"
if token_type == "sk":
print "\n[+] Key is Private"
geocoder = Geocoder(access_token=API_TOKEN)
response = geocoder.forward('Chester , NJ')
if response.status_code == 200:
print "\n[+] Key is Valid"
elif response.status_code == 401:
print "\n[+] Key is Invalid"
print "\n[-] Check - Unsuccessful"
def gcm():
def appflyer():
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment