API Key: Difference between revisions

From Zoo Wiki
No edit summary
Fixed up the page and added a list of properties found in API Key.
Line 1: Line 1:
== 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. API Key has a description of "Reveals cooldown, timestamps, and other hidden info on the online zoo API."
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.
 
== Use ==
Provides access to secretInfo on the Zoo API, which has multiple kinds of stats within it.
 
{| class="sortable wikitable mw-collapsible mw-collapsed"
|+ secretInfo
! 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
{| class="wikitable"
! Promise
! Information
|-
| type
| Promises a specific type of animal on the next rescue.
|-
| pair
| Promises a pair on the next rescue.
|-
| animal
| Promises a specific animal on the next rescue.
|}
|-
| 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
{| class="wikitable"
! Property Name
! Information
|-
| credits
| The amount of shop purchases remaining.
|-
| nextCredit
| Shows the exact unix timestamp of when you get another credit.
|-
| maxCredits
| Shows the maximum amount of shop purchases that you can get at maximum.
|-
| lastPurchase
| Shows the exact unix timestamp of your last purchase in the shop.
|}
|-
| cooldowns
| Shows the unix timestamp of when all of your current cooldowns expire.
{| class="wikitable"
{| class="wikitable"
|+
! Cooldowns
!Emoji
! Information
!Name
|-
!Description
| rescue
| The exact unix timestamp of when you can rescue.
|-
| relic
| The exact unix timestamp of when you can switch relics.
|-
| leader
| The exact unix timestamp of when you can switch leaders.
|-
| profile
| The exact unix timestamp of when you can switch or create profiles.
|-
| cardPull
| The exact unix timestamp of when you can pull a card.
|-
| pet
| The exact unix timestamp of when you can pet roboturt.
|-
| fishy
| The exact unix timestamp of when you can fish with the $ fishy command.
|-
| sisyphus
| The exact unix timestamp of when you can roll a boulder with the $ sisyphus command.
|}
|-
|-
![[File:API Key.png|center|frameless|36x36px]]
| terminal
! API Key
| Shows different information about the terminal.
!
{| class="wikitable"
{| class="wikitable"
| colspan="2" rowspan="1" |Reveals cooldown, timestamps, and other hidden info on the online zoo API.
! Property Name
! Information
|-
| directory
| Shows the current directory of the user.
|-
| commands
| Shows every command that the user has discovered. The current discoverable commands are "adminunlock", "dirwarp", "nick", "repaircmd", "give", "inventory", "pull", "show", "fuse", "fusions", "nfbs", "tokenshop", "unfuse", "wanted", "countxp", "button", "cowsay", "egg", "node", "pet", "pray", "sisyphus", "testconnection", "vim", "yes", "8ball", "dunsparce", "penguin", "percent", "ping", "random", "complete", "defer", "fishy", "fullzoo", "garden", "loop", "murphypoints", "nomnomnom", "pride", "todo", "zoo", "cd", "echo",  "help", "ls", "neofetch"
|-
| nextFusion
| Shows how many rescues remain until you can fuse again.
|}
|-
| garden
| Shows different information about the garden.
{| class="wikitable"
! Property Name
! Information
|-
| nextPlant
| Shows the exact unix timestamp until you can plant again.
|-
| watered
| If the user has already watered a plant in their garden. true being that they have watered.
|-
| longestPlant
| How long have you kept a plant alive for.
|-
| sprinkler
| What slot does the user have the sprinkler on.
|}
|}
|}
|}
== 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 ==
== 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.
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.
 
⚠️You cannot get this relic if you don't own at least three other relics.


API Key sample code (written with Python)
API Key sample code (written with Python)
Line 40: Line 147:
</syntaxhighlight>
</syntaxhighlight>


The authentication token is obtained as follows:
The authentication token is obtained by


"Go to gdcolon.com/zoo and log in.
1. Logging into gdcolon.com/zoo
On your zoo profile, press F12 on your keyboard.
2. Going into the Application tab in the Developer Tools
Go to 'Application'.
3. Finding https://gdcolon.com under 'Cookies', which is located in 'Storage'.
Find https://gdcolon.com under 'Cookies', which is located in 'Storage'.
4. Find the Cookie Value for 'zoo', which is the authentication token.
Find the Cookie Value for 'zoo', which is the authentication token."


An online website for running Python code:
An online website for running Python code:

Revision as of 16:06, 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.

secretInfo
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
Promise Information
type Promises a specific type of animal on the next rescue.
pair Promises a pair on the next rescue.
animal Promises a specific animal on the next rescue.
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
Property Name Information
credits The amount of shop purchases remaining.
nextCredit Shows the exact unix timestamp of when you get another credit.
maxCredits Shows the maximum amount of shop purchases that you can get at maximum.
lastPurchase Shows the exact unix timestamp of your last purchase in the shop.
cooldowns Shows the unix timestamp of when all of your current cooldowns expire.
Cooldowns Information
rescue The exact unix timestamp of when you can rescue.
relic The exact unix timestamp of when you can switch relics.
leader The exact unix timestamp of when you can switch leaders.
profile The exact unix timestamp of when you can switch or create profiles.
cardPull The exact unix timestamp of when you can pull a card.
pet The exact unix timestamp of when you can pet roboturt.
fishy The exact unix timestamp of when you can fish with the $ fishy command.
sisyphus The exact unix timestamp of when you can roll a boulder with the $ sisyphus command.
terminal Shows different information about the terminal.
Property Name Information
directory Shows the current directory of the user.
commands Shows every command that the user has discovered. The current discoverable commands are "adminunlock", "dirwarp", "nick", "repaircmd", "give", "inventory", "pull", "show", "fuse", "fusions", "nfbs", "tokenshop", "unfuse", "wanted", "countxp", "button", "cowsay", "egg", "node", "pet", "pray", "sisyphus", "testconnection", "vim", "yes", "8ball", "dunsparce", "penguin", "percent", "ping", "random", "complete", "defer", "fishy", "fullzoo", "garden", "loop", "murphypoints", "nomnomnom", "pride", "todo", "zoo", "cd", "echo", "help", "ls", "neofetch"
nextFusion Shows how many rescues remain until you can fuse again.
garden Shows different information about the garden.
Property Name Information
nextPlant Shows the exact unix timestamp until you can plant again.
watered If the user has already watered a plant in their garden. true being that they have watered.
longestPlant How long have you kept a plant alive for.
sprinkler What slot does the user have the sprinkler on.

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.

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