Skip to content

backupGJAccountNew.php

Saves account data

NOTE

This page is under the database/accounts directory.

NOTE

This page is on the account server. You can find the domain name by sending a request to /database/getAccountURL.php (currently https://www.robtopgames.org)

Parameters

ParameterExplanationRequired
accountIDThe player's account ID (not to be confused with user ID). Used for authorizationYes
gjp2The player's account password, encoded with GJP2. Used for authorizationYes
gameVersionA number representing the game's version. The current value is 22 for 2.2Yes
binaryVersionA number representing the game's small version. The current value is 47 for 2.2081 on PC and 48 for 2.2082 on mobileYes
udidThe player's UDID (Unique Device Identifier). Used to identify unregistered usersYes
uuidThe player's user ID. See the previous format hereYes
dvsA number representing the OS platform the player is using. Corresponds to the Cocos2d CC_TARGET_PLATFORM macro: 1 for iOS, 2 for Android, 3 for Windows, 8 for macOS
saveDataThe save data for CCGameManager.dat compressed with gzip, then a semicolon ; and the save data for CCLocalLevels.dat compressed with gzipYes
secretAccount Secret: Wmfv3899gc9Yes

Response

1 if data was saved.

If the response was not successful, there are several different error codes that can be returned:

CodeNameDescription
-1Generic errorDisplays a generic "Backup failed." message along with the save sizes of GameManager and LocalLevelManager, if they are over 32mb combined.
-2Login FailedYour login credentials were wrong and you need to log back in, prompts the user to login and verify their account
-3Generic errorUnlike code -1 (or any other unknown codes), this error code displays -3 alongside the backup failed message
-4Request is too largeYour request to the server was too large
-5Bad login infoInvalid login info was provided
-6Something went wrongSomething went wrong on the servers' end

Example

Python

py
import requests

data = {
    "accountId": "23590959",
    "gjp2": "********", # This would be APIAccount's password encrypted with GJP2
    "gameVersion": 21,
    "binaryVersion": 35,
    "saveData": "H4sIAAAAAAAAA8VaWXObSBD-K1Se7ZhrOKocpWRLzubwJrVK8kphNJYICFSAHOvf74yYA6ZHgq1daatcFnzTDD1fH_Qct-9fN7nxgqs6LYt3b6y35pv3k9ttntZNHzVWv8j9uzc2uZ7cLtOkmdxmk5c43-HPGG9xdXuTEZyCq5fINE3rANQT8ltL1NahtqNFPS3q61BHK-sEOtTVvs11tai2XzdkqNdFkclQm6FphJSn00jtL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lsXqMq4wcVOt-QZM8pR_E-TI9FBOy4YnUF9X-Z3uujSdpnv_JZJuciGpky3Wb42_aw243h0Nxk78BpH5jdTEnAAA=;H4sIAAAAAAAAA7Oxr8jNUShLLSrOzM-zVTLUM1Cyt7MpyMksLkEVVUjPAvJtlYyAbDublMzkEjubbDsfH994A0Mb_WygEIgfn1nsWFQE5pco6NvZ6INFwaqMwKKZdsamNvqZIBmwEfpgq-wAmIGBy4cAAAA=",
    "secret": "Wmfv3899gc9"
}

req = requests.post("https://www.robtopgames.org/database/accounts/backupGJAccountNew.php", data=data)
print(req.text)

Response

py
1

Changelog

2.2

In 2.2, the userName and password fields were replaced with accountID and gjp2.