What is the API?


The Spotify.gg Reseller API allows our clients to automate the process of upgrading, replacing, and registering Spotify.gg accounts.  


All requests must be authenticated using a central API key which can be generated by contacting support. You must have an active reseller plan on our systems in order to have an API key. Here are the questions you need to answer when requesting a key from support:


- On what type of system will our API be called from? (A server-side framework, client, program, etc)

- Can you link the website or place you will be using our API on?

- Why do you need access to our API instead of using our reseller hosted solution?

- How many requests will you need? (All API requests are rate-limited).


Please note it is not guaranteed that these requests will get approved. Resellers can get more than one API key if the use case needs that. 


Documentation


All API requests need to be authenticated with an API Key that is provided as an HTTP Header. The key for this header is ["API-Key"], and must be provided on all requests.


All POST requests need a JSON encoded body for parameters.


All requests will return a JSON response, with one key being ["success"]. This will either be true or false, depending on if the request had any errors. This is essential to handling errors in your system. Here is an example response with an error:


{
                success: false,
                message: "Missing API Key.",
                code: "1JFU2"
}


Endpoints


/api/countries

Method: "GET"

Parameters: NONE

Example Response:


{
    "success": true,
    "countries": [
        {
            "count": 11,
            "country": "AR",
            "readable": "ARGENTINA"
        },
        {
            "count": 69,
            "country": "AU",
            "readable": "AUSTRALIA"
        },
       ....
    ]
}



/api/upgrade

Method: "POST"

Parameters: {"key": (STRING - PRODUCT KEY), "email": (STRING - EMAIL TO UPGRADE), "country": (STRING - COU NTRY CODE)}

Example Response:


{
    "success": true,
    "new": true,
    "url": "https://www.spotify.com/us/family/join/invite/Y4ZYXCA1c7ybBA",
    "address": "Eucha, OK 74342, USA"
}


/api/replace

Method: "POST"

Parameters: {"email": (STRING - EMAIL TO UPGRADE)}

Example Response:


{
    "success": true,
    "key": "7BU4ICSAGBDNKD8DAXSZ26Z3N"
}


/api/register

Method: "POST"

Parameters: {"key": (STRING)}

Example Response:


{
    "success": true,
    "username": "e3x38htt0qnt6cdmwb6p3wzhj",
    "email": "MRPWAZ81M7LXMX2Q2GE9ER0A2@grr.la",
    "password": "MRPWAZ81M7LXMX2Q2GE9ER0A2"
}