Warning: This information is for advanced coders building tools like Discord Bots.
DragonFable War Data API
Simple method
Retrieve data for one character:
(replace 99999 with the character ID)
URL: https://account.dragonfable.com/charpage/war?id=99999
There is a limit on how often you can call this web API.
Just use for testing your bot on your own or a few test character IDs.
Advanced Data:
Step 1: Register your player guild:
Call using JSON data in the BODY of your HTTPS request:
POST
URL: https://account.dragonfable.com/api/playerguild/register
BODY:
{
"leader": 100,
"members": [
100,
101,
102
],
"guild": "myguildname",
"secret": "mys3cretpassphrase"
}
Replace all the numbers with the character IDs of the players in your group/guild/etc.
You can register up to 250 characters in your virtual player guild.
You can update your member list by calling register again. Use the same guild name and secret value.
Define the members list with your updated list of char ids.
Important: Be sure all your server calls include setting a UserAgent string.
Step 2: Retrieve War Data
GET
URL: https://account.dragonfable.com/api/playerguild/war
BODY:
{
"guild": "myguildname",
"secret": "mys3cretpassphrase"
}
There is a limit on how often you can call these web APIs.
War data doesn't change too fast. I recommend pulling your info about once every 5 minutes.