API Key: Difference between revisions
WolfPlay013 (talk | contribs) Fixed up the page and added a list of properties found in API Key. |
WolfPlay013 (talk | contribs) m Fixed up the fix |
||
| Line 150: | Line 150: | ||
1. Logging into gdcolon.com/zoo | 1. Logging into gdcolon.com/zoo | ||
2. Going into the Application tab in the Developer Tools | 2. Going into the Application tab in the Developer Tools | ||
3. Finding https://gdcolon.com under 'Cookies', which is located in 'Storage'. | 3. Finding https://gdcolon.com under 'Cookies', which is located in 'Storage'. | ||
4. Find the Cookie Value for 'zoo', which is the authentication token. | 4. Find the Cookie Value for 'zoo', which is the authentication token. | ||
Here's a website that allows you to run python code. https://reqbin.com/code/python | |||
https://reqbin.com/code/python | |||
== Troubleshooting == | == Troubleshooting == | ||
'''If you encounter an error while running the code via the aforementioned website, follow these steps:''' | '''If you encounter an error while running the code via the aforementioned website, follow these steps:''' | ||
Revision as of 16:07, 13 February 2024
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. API Key has a description of "Reveals cooldown, timestamps, and other hidden info on the online zoo API."
Use
Provides access to secretInfo on the Zoo API, which has multiple kinds of stats within it.
| Property Name | Information | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| sort | Shows the sorting method in /animals. 0 being Name and 1 being Amount. | ||||||||||||||||||
| color | Shows the color of the zoo in a decimal number. | ||||||||||||||||||
| promise | Shows what is promised on the next rescue. There can be multiple kinds of promises
| ||||||||||||||||||
| questEnd | Shows the exact unix timestamp of when the quest ends. | ||||||||||||||||||
| questBoosts | Shows all boosts applied to the next quest. | ||||||||||||||||||
| curseEnd | Shows the exact unix timestamp of when the curse ends. | ||||||||||||||||||
| mechanicEnd | Shows the exact unix timestamp of when the mechanic finishes. | ||||||||||||||||||
| shop | Shows multiple statistics about the shop
| ||||||||||||||||||
| cooldowns | Shows the unix timestamp of when all of your current cooldowns expire.
| ||||||||||||||||||
| terminal | Shows different information about the terminal.
| ||||||||||||||||||
| garden | Shows different information about the garden.
|
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.
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 by
1. Logging into gdcolon.com/zoo
2. Going into the Application tab in the Developer Tools
3. Finding https://gdcolon.com under 'Cookies', which is located in 'Storage'.
4. Find the Cookie Value for 'zoo', which is the authentication token.
Here's a website that allows you to run python code. https://reqbin.com/code/python
Troubleshooting
If you encounter an error while running the code via the aforementioned website, follow these steps:
- Install Python
- 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)
- 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...
- Run the following command: python [name of the file with the code you saved]
- 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