API Key: Difference between revisions
→Effects: rewrote & made it prettier |
|||
| Line 53: | Line 53: | ||
The player's profile on the [[Zoo API]] gains a <code>secretInfo</code> field with the following data: | The player's profile on the [[Zoo API]] gains a <code>secretInfo</code> field with the following data: | ||
{| class="sortable | {| class="wikitable sortable" | ||
|+ | |+ | ||
! | !Key | ||
! | !Explanation | ||
!Data type | |||
|- | |- | ||
| sort | |rowspan=2|<code>sort</code> | ||
| | |rowspan=2|How the player's animals is sorted | ||
|<code>0</code>: Sorted by name | |||
|- | |- | ||
| | |<code>1</code>: Sorted by amount | ||
|- | |- | ||
| | |<code>color</code> | ||
| | |Zoo color | ||
|Decimal number representing a [[w:hex triplet|hex triplet]] | |||
|- | |- | ||
| | |<code>promise</code> | ||
| | |Things guaranteed for the next rescue | ||
| | |||
{| class="wikitable sortable mw-collapsible" | |||
|+ | |||
!Key | |||
!Explanation | |||
!Data type | |||
|- | |- | ||
| pair | |<code>pair</code> | ||
| | |Whether a pair is guaranteed | ||
|Boolean | |||
|- | |- | ||
| animal | |rowspan=8|<code>type</code> | ||
| | |rowspan=8|The guaranteed [[animal type]] | ||
|<code>arctic</code>: Arctic animal | |||
|- | |||
|<code>bird</code>: Bird | |||
|- | |||
|<code>bug</code>: Bug | |||
|- | |||
|<code>farm</code>: Farm animal | |||
|- | |||
|<code>favorite</code>: Leader's favorite animal | |||
|- | |||
|<code>jungle</code>: Jungle animal | |||
|- | |||
|<code>pet</code>: Pet | |||
|- | |||
|<code>water</code>: Aquatic animal | |||
|- | |||
|<code>animal</code> | |||
|The guaranteed animal | |||
|Internal name of the animal (equivalent to the shortcode of its emoji) | |||
|- | |||
|<code>debuffImmunity</code> | |||
|Cooldown raises will be divided by this number | |||
|Integer | |||
|- | |||
|<code>buffBoost</code> | |||
|Cooldown reductions will be multiplied by this number | |||
|Integer | |||
|- | |||
|<code>luckyRelics | |||
|Whether the best outcome is guaranteed for luck-based effects | |||
|Boolean | |||
|} | |} | ||
|- | |- | ||
| questEnd | |<code>questEnd</code> | ||
| | |When the current [[quest]] ends | ||
|[[w:Unix timestamp|Unix timestamp]] | |||
|- | |- | ||
| | |<code>curseEnd</code> | ||
| | |When the player's [[curse]] ends | ||
|Unix timestamp | |||
|- | |- | ||
| | |<code>mechanicEnd</code> | ||
| | |When the current [[mechanic]] upgrade finishes | ||
|Unix timestamp | |||
|- | |- | ||
| | |<code>questBoosts</code> | ||
| | |Things guaranteed for the current quest | ||
| | |||
{| class="wikitable sortable mw-collapsible" | |||
|+ | |||
!Key | |||
!Explanation | |||
!Data type | |||
|- | |- | ||
| | |<code>rareCurse</code> | ||
| | |Whether [[Safety Pin]] was used | ||
|Boolean | |||
|- | |- | ||
| | |<code>extraRewards</code> | ||
| | |Number of extra rewards guaranteed by [[Telescope]] | ||
|Integer | |||
|- | |- | ||
| | |<code>length</code> | ||
| | |Length increase | ||
|Number of hours | |||
|} | |||
|- | |- | ||
| | |<code>shop</code> | ||
| | |Shop info | ||
| | |||
{| class="wikitable sortable mw-collapsible | |||
|+ | |||
!Key | |||
!Explanation | |||
!Data type | |||
|- | |- | ||
| | |<code>credits</code> | ||
| | |Shop credits | ||
|Integer | |||
|- | |||
|rowspan=2|<code>maxCredits</code> | |||
|rowspan=2|Maximum credits | |||
|<code>6</code> if [[Sack]] is equipped | |||
|- | |||
|<code>4</code> otherwise | |||
|- | |||
|<code>nextCredit</code> | |||
|When the next credit will be given | |||
|Unix timestamp | |||
|- | |||
|<code>lastPurchase | |||
|Time of last purchase | |||
|Unix timestamp | |||
|} | |} | ||
|- | |- | ||
| cooldowns | |<code>cooldowns</code> | ||
| | |Most time-based cooldowns | ||
{| class="wikitable" | | | ||
! | {| class="wikitable sortable mw-collapsible" | ||
! | |+ | ||
!Key | |||
!Explanation | |||
!Data type | |||
|- | |||
|<code>rescue</code> | |||
|Rescue cooldown | |||
|rowspan=7|Unix timestamp | |||
|- | |- | ||
| | |<code>relic</code> | ||
| | |Relic cooldown | ||
|- | |- | ||
| | |<code>leader</code> | ||
| | |Leader cooldown | ||
|- | |- | ||
| | |<code>cardPull</code> | ||
| | |{{cmd|pull}} cooldown | ||
|- | |- | ||
| | |<code>pet</code> | ||
| | |{{cmd|pet}} cooldown | ||
|- | |- | ||
| | |<code>fishy</code> | ||
| | |{{cmd|fishy}} cooldown | ||
|- | |- | ||
| | |<code>sisyphus</code> | ||
| | |{{cmd|sisyphus}} cooldown | ||
|- | |- | ||
| | |rowspan=2|<code>profile</code> | ||
| | |rowspan=2|Profile cooldown | ||
|<code>null</code> if player only has one profile | |||
|- | |- | ||
| | |Unix timestamp otherwise | ||
|} | |} | ||
|- | |- | ||
| terminal | |<code>terminal</code> | ||
| | |[[Terminal]] data | ||
{| class="wikitable" | | | ||
! | {| class="wikitable sortable mw-collapsible" | ||
! | |+ | ||
!Key | |||
!Explanation | |||
!Data type | |||
|- | |- | ||
| directory | |<code>directory</code> | ||
| | |Current directory | ||
|String | |||
|- | |- | ||
| commands | |<code>commands</code> | ||
| | |Commands listed in {{cmd|help}} | ||
|Array | |||
|- | |- | ||
| nextFusion | |<code>nextFusion</code> | ||
| | |{{cmd|fuse}} cooldown | ||
|Number of rescues until {{cmd|fuse}} can be used (<code>0</code> if no cooldown) | |||
|} | |} | ||
|- | |- | ||
| garden | |<code>garden</code> | ||
| | |[[Garden]] data | ||
{| class="wikitable" | | | ||
! | {| class="wikitable sortable mw-collapsible" | ||
! | |+ | ||
!Key | |||
!Explanation | |||
!Data type | |||
|- | |- | ||
| nextPlant | |<code>nextPlant</code> | ||
| | |When the next seedling can be planted | ||
|Unix timestamp | |||
|- | |- | ||
| watered | |rowspan=2|<code>watered</code> | ||
| | |rowspan=2|Whether the garden was watered | ||
|<code>false</code>: A plant can be watered | |||
|- | |- | ||
| | |<code>true</code>: Cannot water until rescuing again | ||
|- | |- | ||
| | |<code>longestPlant</code> | ||
| | |Longest lasting plant | ||
| | |Milliseconds | ||
|} | |} | ||
Revision as of 15:09, 7 April 2024
API Key
|
“Nerd.”
|
API Key is a unique relic unlocked by sending a POST request to a "secret" endpoint.
Obtaining
The player must have at least three other relics in order to obtain API Key.
API Key is obtained by sending a POST request to the following endpoint: https://gdcolon.com/zoo/api/zooKey. This can be done using a desktop browser's developer tools. The request body must contain a JSON object, with the player's Discord ID in a id parameter. The player must also provide their session token, either as a cookie or as a Token header.
The server responds with an error, asking for a piece of trivia (e.g. your favorite color) in the response body. The specific trivia asked is different for each player. When resending the request with the trivia, API Key is granted.
Below is Python code to send the request:
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 and see the response to know which password it wants
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
Effects
Reveals cooldown, timestamps, and other hidden info on the online zoo API.
— In-game description
The player's profile on the Zoo API gains a secretInfo field with the following data:
| Key | Explanation | Data type | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sort
|
How the player's animals is sorted | 0: Sorted by name
| ||||||||||||||||||||||||||||
1: Sorted by amount
| ||||||||||||||||||||||||||||||
color
|
Zoo color | Decimal number representing a hex triplet | ||||||||||||||||||||||||||||
promise
|
Things guaranteed for the next rescue |
| ||||||||||||||||||||||||||||
questEnd
|
When the current quest ends | Unix timestamp | ||||||||||||||||||||||||||||
curseEnd
|
When the player's curse ends | Unix timestamp | ||||||||||||||||||||||||||||
mechanicEnd
|
When the current mechanic upgrade finishes | Unix timestamp | ||||||||||||||||||||||||||||
questBoosts
|
Things guaranteed for the current quest |
| ||||||||||||||||||||||||||||
shop
|
Shop info |
| ||||||||||||||||||||||||||||
cooldowns
|
Most time-based cooldowns |
| ||||||||||||||||||||||||||||
terminal
|
Terminal data |
| ||||||||||||||||||||||||||||
garden
|
Garden data |
HistoryAPI Key was added in RoboTop version 93.22, released on February 2, 2022. API Key was the first relic to have a unique unlock method other than through quests. |
