API Key

From Zoo Wiki
Revision as of 13:02, 11 February 2024 by Breter98 (talk | contribs)

Introduction

The API Key is a unique relic unlocked by sending a POST request to a "secret" endpoint. It was the first relic added to have a unique unlock method other than through quests. You require 3 relics to unlock the cosmetic.

Emoji Name Description
API Key
Reveals cooldown, timestamps, and other hidden info on the online zoo API.

Use

Provides access to secretInfo on the Zoo API.

This relic is laughing stock when it comes to usability. It reveals the decimal of your embed colour, and timestamps of various events, such as your next shop credit or next rescue. The issue is this isn’t necessary in almost all scenarios, as the time is displayed in the bot. Additionally, self-botting is against Discord’s TOS, so you can’t use it to run a program that would act on this on your behalf.

Obtaining

As mentioned before, this requires sending a POST request to a specified endpoint. If you do not know how to do this, there are many services online that can teach you within a few minutes. A sample code is provided below if extremely necessary, but it is advised to do it without help as it could be a learning experience.

⚠️You cannot get this relic if you don't own at least three other relics.

API Key sample code (written with Python)

import requests
url = "https://gdcolon.com/zoo/api/zooKey" #endpoint
headers = {"Content-Type": "application/json", "Accept": "application/json", "Token": ""} #request headers, insert authentication token into the Token header

#id refers to your Discord User ID
#password can be a few things (usually it's your public IP address/last 3 digits of your token). Leave blank at first to see the response 
params = {"id": "", "password": ""}
 
response = requests.post(url, headers=headers, json=params)
print(response.status_code)
print(response.text)

The authentication token is obtained as follows:

"Go to gdcolon.com/zoo and log in. On your zoo profile, press F12 on your keyboard. Go to 'Application'. Find https://gdcolon.com under 'Cookies', which is located in 'Storage'. Find the Cookie Value for 'zoo', which is the authentication token."

An online website for running Python code: https://reqbin.com/code/python

Troubleshooting

If you encounter an error while running the code via the aforementioned website, follow these steps:

  1. Install Python
  2. Save your code in a Python (.py) file, you can use Python itself, Notepad, Visual Studio, anything you want. Save it in your user folder under an easy name (e.g. zoo.py)
  3. Open CMD (Win+R -> cmd), If you are on MacOS open Terminal from the Launchpad. If you are on Linux you know how to open the terminal already...
  4. Run the following command: python [name of the file with the code you saved]
  5. If you did everything correctly, you should now have the API Key relic!

If python says the "requests" library is not installed, run this command in your terminal:

python -m pip install requests