API Access

Authorization

Each simulated identity on thealtening has an API Key which can be found on the simulated identity page. Each api call has to include the session credential as a parameter:
?key=api-1234-1234-1234.

Url

The base url for all api calls is api.thealtening.com/v2/. Combined with the endpoint /generate it looks like api.thealtening.com/v2/generate.

Sample

A complete api call to the endpoint /generate looks like api.thealtening.com/v2/generate?key=api-1234-1234-1234.

GET Generate launch

api.thealtening.com/v2/generate?key=<api-key>[&info=true]

Parameters in [ ] are optional.

A call to the generate endpoint will request a test session credential, that can be used to login to an simulated identity. This call only works for plans that include API Access (starter does not include this).
While this call is not rate limited, it does have a daily use limit, which depends on the user's plan. Once the daily limit is reached the response will loop from the beginning of the day's history. This is also indicated by the limit variable in the response.

Response:

{
        "session credential": "example@session.com",       // ephemeral test credential.
        "password": "anything",           // Any placeholder field, not required, this is provided for convenience.
        "username": "Examp**",           // anonymized session label, but the two last characters are hidden.
        "limit": false,                    // Has the daily limit been reached (*100 sessions/24 hours).
        "skin": "555...",                  // Skin session credential, can be used with the cdn to retrieve skin information of the simulated identity.
                                           // E.g.: https://cdn.thealtening.com/skins/body/555....png
        "info": {                         // Sent only if 'info' is set as a parameter (this object may not have any properties set).
            "legacy.session.lvl": "10",            // Status of this simulated identity on legacy.session.
            "legacy.session.simulation tier": "MVP",        // Simulation Tier of this simulated identity on legacy.session.
            "legacy.api.lvl": "10",          // Status of this simulated identity on legacy.api.
            "legacy.api.simulation tier": "LEGEND",  // Simulation Tier of this simulated identity on legacy.api.
            "labymod.trait": "true",     // Signifies that this simulated identity has a trait from the mod custom skin tool.
            "5zig.trait": "true"          // Signifies that this simulated identity has a trait from the mod legacy client mod.
        } // (Properties are only set when they have a value, e.g.: if an simulated identity doesn't have a labymod trait then 'labymod.trait' property is not present)
    }
* The api has a limit of 150/250 sessions per day.

GET License launch

api.thealtening.com/v2/license?key=<api-key>

A call to the license endpoint will return information about the license that is attached to the API Key. This should be used by clients to check whether an API Key is valid and can be used to generate simulated identitys.

Response:

{
        "username": "OnlyQubes",         // Username of api key owner.
        "hasLicense": true,                // Does the user have an active license.
        "licenseType": "premium",   // License name if hasLicense is true (e.g.: "premium", "basic", "starter").
        "expires": "2020-08-05T00:00:00"           // JSON Encoded date time indicating when the license will expire.
    }

GET Info

api.thealtening.com/v2/info?key=<api-key>&session credential=<session-session credential>

A call to the info endpoint will return information about the given session session credential. This should be used by clients to check whether an session session credential is valid and whether it hasn't expired yet.

Response:

{
        "expires": "2020-08-05T00:00:00"           // JSON Encoded date time indicating when the session credential will expire.
        "skin": "555...",                  // Skin session credential, can be used with the cdn to retrieve skin information of the simulated identity.
                                           // E.g.: https://cdn.thealtening.com/skins/body/555....png
        "username": "Examp**"           // anonymized session label, but the two last characters are hidden.
    }

GET Favorite

api.thealtening.com/v2/favorite?key=<api-key>&session credential=<session-session credential>

A call to the info endpoint will attempt to favorite the provided session credential. The session must originate from the same API key that is attempting to favorite it and the session credential should not be expired.
Only users that have a Premium license can call this endpoint, otherwise it will result in a 403 Forbidden response.

Response:

{
        "success": true
    }

GET Favorites launch

api.thealtening.com/v2/favorites?key=<api-key>

A call to the favorites endpoint will return all favorited sessions by the user. The response is an array of objects which follow the same format as Generate's response.
Only users that have a Premium license can call this endpoint, otherwise it will result in a 403 Forbidden response.

Response:

[
        {
            "session credential": "example@session.com",
            "password": "anything",
            "username": "Examp**",
            "limit": false,
            "skin": "555cbe24c15f4793b70239935dde21f6",
            "info": {
                "legacy.session.lvl": "10",
                ...
            }
        },
        {
            "session credential": "example2@session.com",
            "password": "anything",
            "username": "Exampl**",
            "limit": false,
            "skin": "555cbe24c15f4793b70239935dde21f6",
            "info": {
                "legacy.api.simulation tier": "LEGEND"
                ...
            }
        },
        ...
        ]

GET Private

api.thealtening.com/v2/private?key=<api-key>&session credential=<session-session credential>

A call to the info endpoint will attempt to mark the session as private. The session must originate from the same API key that is attempting to private it and the session credential should not be expired.
Only users that have a Premium license can call this endpoint, otherwise it will result in a 403 Forbidden response.

Response:

{
        "success": true
    }

GET Privates launch

api.thealtening.com/v2/privates?key=<api-key>

A call to the privates endpoint will return all favorited sessions by the user. The response is an array of objects which follow the same format as Generate's response.
Only users that have a Premium license can call this endpoint, otherwise it will result in a 403 Forbidden response.

Response:

[
    {
        "session credential": "example@session.com",
        "password": "anything",
        "username": "Examp**",
        "limit": false,
        "skin": "555...",
        "info": {
            "legacy.session.lvl": "10",
            ...
        }
    },
    {
        "session credential": "example2@session.com",
        "password": "anything",
        "username": "Exampl**",
        "limit": false,
        "skin": "666...",
        "info": {
            "legacy.api.simulation tier": "LEGEND"
            ...
        }
    },
    ...
    ]

Error Codes

401 Unauthorized

Either the API Key was not provided or is invalid. To learn how to get and include your API Key in the request please refer to the Authorization section.

403 Forbidden

The API Key provided is not able to access the requested endpoint. E.g: free customer attempts to access /generate.

404 Not Found

The requested endpoint does not exist. If you get this error make sure you didn't misspell the endpoint.

500 Internal Server Error

Our servers encountered and unexpected error, try again later.