├── README.md ├── doodles.md ├── field-offices.md ├── invasions.md ├── local.md ├── login.md ├── population.md └── silly-meter.md /README.md: -------------------------------------------------------------------------------- 1 | Toontown Rewritten API Documentation 2 | ------------------------------------ 3 | 4 | Read more about Toontown Rewritten at our website: https://www.toontownrewritten.com 5 | 6 | -------------------------------------------------------------------------------- /doodles.md: -------------------------------------------------------------------------------- 1 | # Toontown Rewritten Doodles API 2 | 3 | ## Overview 4 | 5 | This API provides a listing of all Doodles currently available to purchase from the Pet Shops around Toontown. 6 | 7 | **Note:** The header Access-Control-Allow-Origin is set to * on this API. 8 | 9 | ## Requests 10 | 11 | An HTTP GET to the Doodles API endpoint, https://www.toontownrewritten.com/api/doodles, will return the latest JSON response. No parameters are required, however, if you are frequently making calls to this API, we'd appreciate it if you set a descriptive User-Agent. 12 | 13 | ## Response 14 | 15 | The response consists of a dictionary of Districts each containing a dictionary of Playgrounds. 16 | 17 | Each Playground entry contains an array of currently available [Doodles](#doodle-data). 18 | 19 | ### Doodle data 20 | 21 | | Name | Details | 22 | |--------|---------| 23 | | dna | A string form of the DNA that makes up the Doodle, used when requesting an image of the Doodle from [Rendition](#rendition). | 24 | | traits | An array of the traits for the Doodle, as visible in the Pet Shop. | 25 | | cost | An integer of the cost of the Doodle in Jellybeans. | 26 | 27 | ## Rendition 28 | 29 | Rendition is our rendering service for Toon and Doodle images, an example of the images produced being used in production can be found at [Toon HQ](https://toonhq.org). 30 | 31 | ### Requests 32 | 33 | URLs for Doodles on Rendition are formatted like so: 34 | > rendition.toontownrewritten.com/render/**{dna}**/doodle/**{width}**x**{height}**.**{extension}** 35 | 36 | #### Parameters 37 | 38 | | Name | Details | Valid Options | 39 | |-----------|---------|---------------| 40 | | dna | The DNA string from the API response. | Any valid Doodle DNA string. | 41 | | width | The requested width of the output. | `>=128` and `<=2048` | 42 | | height | The requested height of the output. | `>=128` and `<=2048` | 43 | | extension | The format to encode the rendered image to. | `.webp`, `.png` | 44 | 45 | **Note:** It's preferable to stick to requesting images with the width and height the same value, and the value being 256 or 512. -------------------------------------------------------------------------------- /field-offices.md: -------------------------------------------------------------------------------- 1 | # Toontown Rewritten Field Offices API 2 | 3 | ## Overview 4 | 5 | Field Offices were added to the game as part of the Sellbot Task Force expansion on [December 3, 2021](https://toontownrewritten.com/taskforce/fieldoffices). 6 | 7 | This API provides information about all active Field Offices in the game. 8 | 9 | ## Requests 10 | 11 | An HTTP GET to the Field Office API endpoint, https://www.toontownrewritten.com/api/fieldoffices, will return the latest JSON response. No parameters are required. However, if you are frequently making calls to this API, we would appreciate it if you set a descriptive User-Agent. 12 | 13 | ## Response 14 | 15 | | Name | Details | 16 | |-------------|---------| 17 | | lastUpdated | The epoch timestamp of when the web layer last queried for data. | 18 | | fieldOffices | A dictionary of Zone IDs (4-digit integers) to Field Office data. | 19 | 20 | ## Field Office Data 21 | 22 | | Name | Details | 23 | |-------------|---------| 24 | | department | A string containing a single letter that corresponds to the Cog Department that this Field Office belongs to. | 25 | | difficulty | The number of Stars for this Field Office (zero-indexed). | 26 | | annexes | The number of Annexes remaining until this Field Office is defeated. | 27 | | open | A boolean that notes whether this Field Office is open for Toons to enter. A Field Office will close its elevator doors if there are roughly more groups of Toons inside than the number of Annexes. | 28 | | expiring | After the last Annex of a Field Office has been defeated, this will provide the epoch timestamp in seconds of when all groups inside will be kicked from the Field Office. | 29 | 30 | ## Zone ID Lookup 31 | 32 | | Zone ID | Street Name | 33 | |---------|-------------| 34 | | 3100 | Walrus Way | 35 | | 3200 | Sleet Street | 36 | | 3300 | Polar Place | 37 | | 4100 | Alto Avenue | 38 | | 4200 | Baritone Boulevard | 39 | | 4300 | Tenor Terrace | 40 | | 5100 | Elm Street | 41 | | 5200 | Maple Street | 42 | | 5300 | Oak Street | 43 | | 9100 | Lullaby Lane | 44 | | 9200 | Pajama Place | -------------------------------------------------------------------------------- /invasions.md: -------------------------------------------------------------------------------- 1 | # Toontown Rewritten Invasions API 2 | 3 | ## Overview 4 | APIs about the current status of the game world are always fun, so TTR has published our internal invasion tracker to the world via a publicly consumable API. 5 | 6 | The design for this API is driven by the implementation of actual invasion tracking on TTR servers. Each district periodically sends current invasion data to a central server (though that server isn't our web server), where it is stored in memory. On a separate timer, the TTR web layer periodically queries this central server for the latest invasion data, which is then cached and returned to everyone who queries the invasions API. This design is flexible and requires few extra resources to operate, though the data isn't as fresh as a result. 7 | 8 | **Note:** The header Access-Control-Allow-Origin is set to * on this API. 9 | 10 | ## Requests 11 | 12 | An HTTP GET to the invasions API endpoint, https://www.toontownrewritten.com/api/invasions, will return the latest JSON response. No parameters are required, however, if you are frequently making calls to this API, I'd appreciate it if you set a descriptive User-Agent. 13 | 14 | ## Response 15 | 16 | | Name | Details | 17 | |-------------|---------| 18 | | error | When data is present, `error` will be set to null. If `error` isn't null, then no other fields will be present, and `error` will be set to an error message | 19 | | invasions | A dictionary of district names to invasion data. | 20 | | lastUpdated | The epoch timestamp of when the web layer last queried for data. | 21 | 22 | ### Invasion data 23 | | Name | Details | 24 | |------|---------| 25 | | type | The name of the invading cog. The localized name will always be in English, and will always be the singular form of the cog. If the cog is a skelecog, ` (Skelecog)` will be appended. If the cog is version 2.0, `Version 2.0 ` will be prepended. | 26 | | asOf | The epoch timestamp of when the district last reported its invasion status. | 27 | | progress | A string, of the form `%d/%d`, where the first number represents the number of cogs already despawned during the invasion and the second number represents the total size of the invasion. | -------------------------------------------------------------------------------- /local.md: -------------------------------------------------------------------------------- 1 | # Toontown Rewritten Local (Companion App) API 2 | 3 | ## Requests 4 | 5 | All requests must be submitted via HTTP GET to `localhost` with a default port of `1547`, this port is incremented if already in use to allow for multitoons (from `1547` through to `1552`). 6 | 7 | All requests must ensure compliance with the following: 8 | 9 | - Must have the `Host` header set as `localhost:1547` (or other port as mentioned above). 10 | - Must have the `User-Agent` header set descriptively, this will be shown on the in-game consent prompt. 11 | - Must set the `Authorization` header to a random value unique to each session of the application. 12 | 13 | Requests which do not honour these requirements will be rejected by the API server. 14 | 15 | When possible the API server listens on both `127.0.0.1` and `::1`, with a bias towards IPv6. 16 | 17 | ## GET `/all.json` 18 | 19 | | Name | Details | 20 | |------|---------| 21 | | [toon](#get-toonjson) | Toon details. | 22 | | [laff](#get-laffjson) | Toon laff. | 23 | | [location](#get-locationjson) | Toon location and District. | 24 | | [gags](#get-gagsjson) | Toon Gag details. | 25 | | [tasks](#get-tasksjson) | Toon Task details. | 26 | | [invasion](#get-invasionjson) | District invasion details, or `null` if no invasion active. | 27 | | [fish](#get-fishjson) | Toon Fish details. | 28 | | [flowers](#get-flowersjson) | Toon Flower details. | 29 | | [cogsuits](#get-cogsuitsjson) | Toon Cogsuit details. | 30 | | [golf](#get-golfjson) | Toon Golf details. | 31 | | [racing](#get-racingjson) | Toon Racing details. | 32 | | [beans](#get-beansjson) | Toon Beans details. | 33 | | [rewards](#get-rewardsjson) | Toon Rewards details. | 34 | | [cattlelog](#get-cattlelogjson) | Toon Cattlelog details. | 35 | 36 | ## GET `/info.json` 37 | 38 | | Name | Details | 39 | |------|---------| 40 | | [toon](#get-toonjson) | Toon details. | 41 | | [laff](#get-laffjson) | Toon laff. | 42 | | [location](#get-locationjson) | Toon location and District. | 43 | | [gags](#get-gagsjson) | Toon Gag details. | 44 | | [tasks](#get-tasksjson) | Toon Task details. | 45 | | [invasion](#get-invasionjson) | District invasion details, or `null` if no invasion active. | 46 | 47 | ## GET `/toon.json` 48 | 49 | | Name | Description | 50 | |------|-------------| 51 | | name | Toon name. | 52 | | species | Toon species name. | 53 | | headColor | Toon head color in hex format. | 54 | | style | Toon DNA string for use with Rendition. | 55 | 56 | ## GET `/laff.json` 57 | 58 | | Name | Description | 59 | |------|-------------| 60 | | current | Current Toon laff. | 61 | | max | Maximum Toon laff. | 62 | 63 | ## GET `/location.json` 64 | 65 | | Name | Description | 66 | |------|-------------| 67 | | zone | Zone as a string, for example `Silly Street`. | 68 | | neighborhood | Neighborhood as a string, for example `Toontown Central`. | 69 | | district | District as a string, for example `Zapwood`. | 70 | 71 | ## GET `/gags.json` 72 | 73 | `gags` contains a dictionary of Gags with the value being either `null` if the Toon does not have access to that track, or an object with the following values if they do. 74 | 75 | | Name | Description | 76 | |------|-------------| 77 | | gag | `gag` object | 78 | | organic | `gag` object or `null` if no organic Gags in the track. | 79 | | experience | `experience` object. | 80 | 81 | ### `gag` Values 82 | 83 | | Name | Description | 84 | |------|-------------| 85 | | level | Level as an integer of the highest Gag unlocked/organic in the track, starting at 1. | 86 | | name | Localised name of the highest Gag unlocked/organic in the track. | 87 | 88 | ### `experience` Values 89 | 90 | | Name | Description | 91 | |------|-------------| 92 | | current | Current experience as an integer. | 93 | | next | Next milestone as an integer. | 94 | 95 | ## GET `/tasks.json` 96 | 97 | `tasks` is an array of `task` objects. 98 | 99 | ### `task` Values 100 | 101 | | Name | Description | 102 | |------|-------------| 103 | | objective | `objective` object. | 104 | | from | `npc` object containing the NPC the task was accepted from. | 105 | | to | `npc` object containing the NPC the task will be turned in to. | 106 | | reward | Localised reward text for the task or `null` if there is no reward. | 107 | | type | Localised flavor text describing the task, for example `Just for fun!`. If there is no flavor text, this will be `null`. | 108 | | deletable | Boolean indicating if the task can be deleted from the Shticker book. | 109 | 110 | #### `objective` Values 111 | 112 | | Name | Description | 113 | |------|-------------| 114 | | text | Localised objective text for the task. | 115 | | where | Localised location name for the task criteria or `"Anywhere"`. | 116 | | progress | `progress` object. | 117 | 118 | #### `progress` Values 119 | 120 | | Name | Description | 121 | |------|-------------| 122 | | text | Localised progress text for the task. | 123 | | current | Current task progress as an integer. | 124 | | target | Target task progress as an integer. | 125 | 126 | #### `npc` Values 127 | 128 | | Name | Description | 129 | |------|-------------| 130 | | name | Localised name of the NPC. | 131 | | building | Localised building name where the NPC is situated, or an empty string. | 132 | | zone | Localised zone name where the NPC is situated. | 133 | | neighborhood | Localised neighborhood name where the NPC is situated. | 134 | 135 | ## GET `/invasion.json` 136 | 137 | | Name | Description | 138 | |------|-------------| 139 | | cog | Name of invading Cog, for example `Version 2.0 Flunky`. | 140 | | quantity | The total amount of Cogs invading the District. | 141 | | mega | Boolean value indicating if it's a mega-invasion. | 142 | 143 | ## GET `/fish.json` 144 | 145 | | Name | Description | 146 | |------------|-------------| 147 | | rod | `rod` object containing details about the fishing rod. | 148 | | collection | Dictionary where keys are fish IDs and values are `fish` objects. | 149 | 150 | ### `rod` Values 151 | 152 | | Name | Description | 153 | |------|-------------| 154 | | id | Identifier for the fishing rod. | 155 | | name | Localised name of the fishing rod. | 156 | 157 | #### `fish` Values 158 | 159 | | Name | Description | 160 | |-----------|-------------| 161 | | name | Localised name of the fish species. | 162 | | album | Dictionary where keys are subspecies IDs and values are subspecies objects. | 163 | 164 | #### `subspecies` Values 165 | 166 | | Name | Description | 167 | |--------|-------------| 168 | | name | Localised name of the fish variant. | 169 | | weight | Weight of the fish variant in ounces. | 170 | 171 | ## GET `/flowers.json` 172 | 173 | | Name | Description | 174 | |---------------|-------------| 175 | | shovel | `shovel` object containing details about the player's shovel. | 176 | | wateringCan | `wateringCan` object containing details about the player's watering can. | 177 | | collection | Dictionary where keys are flower IDs and values are `flower` objects. | 178 | 179 | ### `shovel` Values 180 | 181 | | Name | Description | 182 | |-----------|-------------| 183 | | id | Identifier for the shovel. | 184 | | name | Localised name of the shovel. | 185 | | curSkill | Current skill level for the shovel. | 186 | | maxSkill | Maximum skill level for the shovel. | 187 | 188 | ### `wateringCan` Values 189 | 190 | | Name | Description | 191 | |-----------|-------------| 192 | | id | Identifier for the watering can. | 193 | | name | Localised name of the watering can. | 194 | | curSkill | Current skill level for the watering can. | 195 | | maxSkill | Maximum skill level for the watering can. | 196 | 197 | ### `flower` Values 198 | 199 | | Name | Description | 200 | |-----------|-------------| 201 | | name | Localised name of the flower species. | 202 | | album | Dictionary where keys are variant IDs and values are localised variant names. | 203 | 204 | ## GET `/cogsuits.json` 205 | 206 | `cogsuits` contains a dictionary where the keys represent the Cog departments (`c`, `l`, `m`, `s` for Bossbot, Lawbot, Cashbot, and Sellbot). Each value is an object with the following values. 207 | 208 | ### `cogsuit` Values 209 | 210 | | Name | Description | 211 | |--------------|-------------| 212 | | department | The name of the Cog department | 213 | | hasDisguise | Boolean indicating if the Toon has a disguise for this department. | 214 | | suit | `suit` object containing details about the Cog suit, or omitted if `hasDisguise` is false. | 215 | | version | Version of the Cog suit as an integer, or omitted if `hasDisguise` is false. | 216 | | level | Current level of the Cog suit as an integer, or omitted if `hasDisguise` is false.| 217 | | promotion | `promotion` object. Omitted if no promotion is available or `hasDisguise` is false. | 218 | 219 | #### `suit` Values 220 | 221 | | Name | Description | 222 | |------|-------------| 223 | | id | Identifier for the Cog suit. | 224 | | name | Localised name of the Cog suit. | 225 | 226 | #### `promotion` Values 227 | 228 | | Name | Description | 229 | |---------|-------------| 230 | | current | Current promotion progress as an integer. | 231 | | target | Target promotion progress as an integer. | 232 | 233 | ## GET `/golf.json` 234 | 235 | `golf` is an array of `stats` objects. 236 | 237 | | Name | Description | 238 | |------|-------------| 239 | | name | Localised name of the golf statistic. | 240 | | num | Numeric value representing the statistic. | 241 | 242 | ## GET `/racing.json` 243 | 244 | `racing` is an array of `stats` objects. 245 | 246 | | Name | Description | 247 | |------|-------------| 248 | | name | Localised name of the racing statistic. | 249 | | num | Numeric value representing the statistic. | 250 | 251 | ## GET `/beans.json` 252 | 253 | | Name | Description | 254 | |------|-------------| 255 | | jar | `jar` object containing details about the Toon's jellybean jar. | 256 | | bank | `bank` object containing details about the Toon's jellybean bank. | 257 | 258 | ### `jar` Values 259 | 260 | | Name | Description | 261 | |---------|-------------| 262 | | current | Current amount of jellybeans in the jar. | 263 | | max | Maximum amount of jellybeans the jar can hold. | 264 | 265 | ### `bank` Values 266 | 267 | | Name | Description | 268 | |---------|-------------| 269 | | current | Current amount of jellybeans in the bank. | 270 | | max | Maximum amount of jellybeans the bank can hold. | 271 | 272 | ## GET `/rewards.json` 273 | 274 | | Name | Description | 275 | |-----------|-------------| 276 | | [sos](#get-sosjson) | Toon SOS cards details. | 277 | | [unites](#get-unitesjson) | Toon Unites details. | 278 | | [summons](#get-summonsjson) | Toon summons details. | 279 | | [pinkslips](#get-pinkslipsjson) | Toon pinkslips details. | 280 | | [remotes](#get-remotesjson) | Toon remotes details. | 281 | 282 | ## GET `/sos.json` 283 | 284 | `sos` contains a dictionary where keys are SOS toon names and values are their quantity. 285 | 286 | ## GET `/unites.json` 287 | 288 | `unites` contains a dictionary where keys are Unite types, for example `Gag-Up`. Values are nested dictionaries where keys are Unite variants, for example `Gag-Up Squirt`, and values are their quantity. 289 | 290 | ## GET `/summons.json` 291 | 292 | `summons` contains a dictionary where keys are Cog identifiers and values are `summon` objects. 293 | 294 | ### `summon` Values 295 | 296 | | Name | Description | 297 | |----------|-------------| 298 | | name | Localised name of the Cog summon. | 299 | | single | Boolean indicating if a single Cog summon is available. | 300 | | building | Boolean indicating if a building summon is available. | 301 | | invasion | Boolean indicating if an invasion summon is available. | 302 | 303 | ## GET `/pinkslips.json` 304 | 305 | `pinkslips` contains the Toon's current quantity of pink slips. 306 | 307 | ## GET `/remotes.json` 308 | 309 | `remotes` contains a dictionary where keys are remote types (`Damage Remote`, `Healing Remote`). Values are nested dictionaries, where keys are the levels (`1`, `2`, `3`) and values are their quantity. 310 | 311 | ## GET `/cattlelog.json` 312 | 313 | | Name | Description | 314 | |--------|-------------| 315 | | series | Current series of the Cattlelog. | 316 | | issue | Current issue of the Cattlelog. | 317 | -------------------------------------------------------------------------------- /login.md: -------------------------------------------------------------------------------- 1 | # Toontown Rewritten Login API 2 | 3 | 4 | ## Basic Login Flow 5 | * Launcher submits request to https://www.toontownrewritten.com/api/login 6 | * Web layer responds with key=value\n response 7 | * Client uses playcookie from response to launch game, client also connects to the IP provided in the response 8 | * Gameserver checks with web layer to find out which account is playing 9 | 10 | **Note:** Responses will be provided in JSON by POSTing to the URL https://www.toontownrewritten.com/api/login?format=json 11 | 12 | ## Calling the API 13 | All calls to the Login API should be made via a POST to the full TTR API endpoint (www and https will be added via a redirect if they are not present). Be sure to include the proper headers in your request: 14 | ``` 15 | "Content-type": "application/x-www-form-urlencoded" 16 | ``` 17 | The API responds with a set of key value pairs. All keys and values will be strings. 18 | 19 | ## Detailed Overview 20 | Launcher begins by collecting a username and password from the user. 21 | 22 | ### Request 23 | | Name | Details | 24 | |----------|--------------------------------------| 25 | | username | The username collected from the user | 26 | | password | The password collected from the user | 27 | 28 | API responds in one of four ways, see below. 29 | ### Failure response 30 | ``` 31 | success=false 32 | banner=Your account has not yet been activated or is disabled. 33 | ``` 34 | ```json 35 | {"success":"false","banner":"Your account has not yet been activated or is disabled."} 36 | ``` 37 | The launcher should alert the client whatever the message is in the banner field. The attempt to login is now over. 38 | ### Partially-authenticated response 39 | ``` 40 | success=partial 41 | banner=Please enter an authenticator token. 42 | responseToken=deadbeef0x321 43 | ``` 44 | ```json 45 | {"success":"partial","banner":"Please enter an authenticator token.","responseToken":"deadbeef0x321"} 46 | ``` 47 | The user is using two-factor authentication. The username and password combination checked out, but you can't login just yet. Display the prompt in the banner from the user, and collect a token from them. Make another request: 48 | #### Partially-authenticated request 49 | | Name | Details | 50 | |-----------|--------------------------------------------------------| 51 | | appToken | The token collected from the user | 52 | | authToken | The token sent in the partially authenticated response | 53 | 54 | This subsequent request will either result in another success=partial with a different banner, or result in a success={true,delayed}. 55 | 56 | ### Non-queued response 57 | ``` 58 | success=true 59 | gameserver=gameserver-alpha.toontownrewritten.com 60 | cookie=deadbeefdeafbeef0x123 61 | manifest=/content/patchmanifest.txt 62 | ``` 63 | ```json 64 | {"success":"true","gameserver":"gameserver-alpha.toontownrewritten.com","cookie":"deadbeefdeafbeef0x123","manifest":"/content/patchmanifest.txt"} 65 | ``` 66 | The user can now login! Set the environment variable TTR_GAMESERVER to the value of the gameserver key, and the environment variable TTR_PLAYCOOKIE to the value of the cookie key, then boot the game. 67 | 68 | The manifest should be appended to `https://cdn.toontownrewritten.com` to form the URL for the patch manifest to be used for updating. 69 | 70 | ### Queued response 71 | ``` 72 | success=delayed 73 | eta=60 74 | position=15 75 | queueToken=deafbeefdeafbeef0x321 76 | ``` 77 | ```json 78 | {"success":"delayed","eta":"60","position":"15","queueToken":"deafbeefdeafbeef0x321"} 79 | ``` 80 | A delayed response from /api/login indicates that the servers are full, and the player who wants to login must first wait for space to free up on the gameserver. 81 | 82 | Periodically (no more than 30 second intervals), the launcher should POST again: 83 | #### Queued request 84 | | Name | Details | 85 | |------------|-------------------------------------------------| 86 | | queueToken | The token given in the initial delayed response | 87 | 88 | The queueToken update request will result in either a success=delayed, or a success=true/false. 89 | A sample response: 90 | ``` 91 | success=delayed 92 | eta=30 93 | position=7 94 | ``` 95 | This response indicates that the user has approximately 30 seconds until they may enter the game, and they are 7th in line. The launcher should continue checking /api/login and updating the user on its status. 96 | 97 | Eventually, the launcher will get back from /api/login a success=true response (unless something goes wrong and success=false), and the game should be booted with the provided credentials. 98 | -------------------------------------------------------------------------------- /population.md: -------------------------------------------------------------------------------- 1 | # Toontown Rewritten Population API 2 | 3 | ## Requests 4 | 5 | An HTTP GET to the population API endpoint, https://www.toontownrewritten.com/api/population, will return the latest JSON response. No parameters are required, however, if you are frequently making calls to this API, I'd appreciate it if you set a descriptive User-Agent. 6 | 7 | ## Response 8 | 9 | | Name | Details | 10 | |-------------|---------| 11 | | error | When data is present, `error` will be set to null. If `error` isn't null, then no other fields will be present, and `error` will be set to an error message | 12 | | totalPopulation | The total population of Toontown Rewritten. | 13 | | populationByDistrict | A dictionary of district names to population values. | 14 | | statusByDistrict | A dictionary of district names to [status values](#status-values). | 15 | | lastUpdated | The epoch timestamp of when the web layer last queried for data. | 16 | 17 | ### Status Values 18 | 19 | | Name | Description | 20 | |------------|-------------| 21 | | offline | District is in the process of starting up and will become `online` shortly. | 22 | | online | District is online and open to players | 23 | | draining | District is undergoing a drain (unintrusively migrating players to another district) and cannot be entered via the district list. Usually takes place when the district is being restarted for fixes. | 24 | | closed | District is closed to players. Usually happens after a drain has completed but some players have not yet finished activites. | -------------------------------------------------------------------------------- /silly-meter.md: -------------------------------------------------------------------------------- 1 | # Toontown Rewritten Silly Meter API 2 | 3 | ## Overview 4 | The Silly Meter was a major update added to the game on [March 6th, 2019](https://www.toontownrewritten.com/news/item/541/introducing-the-silly-meter). 5 | 6 | This API provides insights into the current state of the feature in-game. 7 | 8 | ## Requests 9 | 10 | An HTTP GET to the Silly Meter API endpoint, https://www.toontownrewritten.com/api/sillymeter, will return the latest JSON response. No parameters are required, however, if you are frequently making calls to this API, I'd appreciate it if you set a descriptive User-Agent. 11 | 12 | ## Response 13 | 14 | | Name | Details | 15 | |-------------|---------| 16 | | state | The current state of the Silly Meter. Valid options are `Active` (currently accumulating Silly Particles), `Reward` (currently providing rewards to all of Toontown), or `Inactive` (currently cooling down).| 17 | | hp | The current HP of the Silly Meter. Silly Meter HP ranges from 0 to 5,000,000. | 18 | | rewards | A list of three strings, which are the current Silly Teams that players are eligible to join. These are re-rolled every time the silly meter exits the `Reward` state. | 19 | | rewardDescriptions | A list of three strings, which are the current Silly Team's descriptions. These are updated depending on the current Silly Teams. | 20 | | winner | The winning Silly Team whose reward is currently active. This field will be `null` when the `state` is not set to `Reward`. | 21 | | rewardPoints | The points that each Silly Team has acquired. Points range from 0 to 5,000,000. This field will be `null` when the `state` is not set to `Reward`. | 22 | | nextUpdateTimestamp | The epoch timestamp in seconds of when the Silly Meter will next update itself. In the `Active` state, this means the next time that Silly Points will be calculated and added in to the current HP. In the `Reward` state, this timestamp will indicate when the rewards end. In the `Inactive` state, this timestamp will indicate when the Silly Meter will re-enter the `Active` state. | 23 | | asOf | The epoch timestamp at which the Silly Meter server generated this data. Multiple layers of caching are used in the implementation, so this timestamp is provided by the Silly Meter Gameserver itself. | 24 | | error | (optional) Present iff the web server has no cached response to serve. | 25 | --------------------------------------------------------------------------------