FANDOM



Overview Edit

The Alliance Members API can be used to access information about your alliance's member information. It displays information found in the Alliance Control panel, along with extra information. Use of this API requires your API key.

Access URL Edit

baseurl/alliance-members/?allianceid={id}&key={api key}

Alliance Member Resource Information Edit

Nations in alliances have a setting on the account page to prevent alliances from having access to their money and resource information. If they prevent access, values returned by the API for all money and resources are -1.

Returned JSON Edit

With the following request

accessurl/?allianceid=790&apikey=897sfn72e7xhh0u
{
    'success': True, 
    'nations': [
        {
            'nationid': 390, 
            'nation': 'Gran Pulse', 
            'leader': 'Clarke', 
            'war_policy': 'Pirate', 
            'color': 'pink', 
            'alliance': 'Rose', 
            'allianceid': 790, 
            'allianceposition': 0, 
            'cities': 0, 
            'offensivewars': 0, 
            'defensivewars': 0, 
            'score': '4694.36', 
            'vacmode': '0', 
            'minutessinceactive': 1705, 
            'infrastructure': '21146.33', 
            'cityprojecttimerturns': 0, 
            'bauxiteworks': '1', 
            'ironworks': '0', 
            'armsstockpile': '1', 
            'emgasreserve': '1', 
            'massirrigation': '1', 
            'inttradecenter': '1', 
            'missilepad': '1', 
            'nuclearresfac': '1', 
            'irondome': '1', 
            'vitaldefsys': '1', 
            'intagncy': '1', 
            'uraniumenrich': '0', 
            'propbureau': '1', 
            'cenciveng': '1', 
            'money': '0', 
            'food': '0', 
            'coal': '0', 
            'oil': '0', 
            'uranium': '0', 
            'bauxite': '0', 
            'iron': '0', 
            'lead': '0', 
            'gasoline': '0', 
            'munitions': '0', 
            'aluminum': '0', 
            'steel': '0', 
            'credits': 0, 
            'soldiers': '0', 
            'tanks': '0', 
            'aircraft': '0', 
            'ships': '0', 
            'missiles': '0', 
            'nukes': '0', 
            'spies': '0'
        }, 
        // other nations
    ]
}


Error JSON Edit

With an incorrect key

{
    "success": false, 
    "general_message": "Invalid API key."
}

Both an incorrect alliance id and having no bank access returns this

{
    "success": false, 
    "general_message": "Unable to access. You are not in this alliance."
}
Community content is available under CC-BY-SA unless otherwise noted.