jCOC (Java Clash of Clans API) jCOC is an open-source Java API designed to provide developers with easy access to Clash of Clans game data and statistics. Whether you're building a Clash of Clans companion app, a clan management tool, or simply want to explore the game's data programmatically, jCOC simplifies the process.
JCoc jcoc = new JCoc("API_TOKEN"); //If you have an API_TOKEN
//Use it
jcoc.clanWar();
or
JCoc jcoc = new JCoc("username", "password"); //If you want generate a new API_TOKEN with the host ip address
//Use it
jcoc.clanWar();
Before to test is needed to add your credentials in the application.properties file. Create the application.properties file in
username=yourClashOfClansDeveloperEmail
password=yourClashOfClansDeveloperPassword
By default this file is ignored from GIT