Some constants
secret: "sR6qEPgsf97y"
username: "tickaroo"
password: "eksarb"
basepath: "/API/android/1.0/"
host: "ovsyndication.kicker.de"
Making API Requests
Making requests is not an easy task. Every request requires a querytoken that you can generate like this:
Start with an empty string. The first thing to add to it is an Access-Token. I’ll go over how to generate one in a bit.
The next thing you need to add to the string is the method name. Because the SHA1 algorithm generates a different hash for lower- and uppercase letters, the method name is case sensitive.
After that you add the parameters to it. The parameters are in a format similar to the querystrings from HTTP requests. Example: resid=0;live=0. As you can see, I replaced the ampersand with a semicolon.
If you concatenated all these things together it’s time for the most important part; Generating the Hash-based message authentication code (HMAC). The kicker API uses a SHA1 hash for this. You now generate the hex representation of the hash using the secret as key. Example:
auth_string = "2abc1a1d543eeafa99128d052eba5ba11a346ed2" + "LiveMatches" + "spoid=1;"; //becomes "2abc1a1d543eeafa99128d052eba5ba11a346ed2LiveMatchesspoid=1;" query_token = getHmacSha1(auth_string, secret);
You’re now ready for the request part. Your request needs the following headers:
querytoken: query_token Host: ovsyndication.kicker.de Connection: Keep-Alive User-Agent: httpkit/1.1 Accept-Encoding: gzip
The request has to be made to the following address:
"http://" + host + basepath + method_name + "/3" + params + ".json"
host and basepath are constants defined above. method_name is the case-sensitive name of the method. params is a string containing the parameters and the arguments in a order-sensitive manner seperated by slashes. Example:
"http://ovsyndication.kicker.de/API/android/1.0/LiveMatches/3/spoid/1.json"
Generating an Access-Token
To generate an Access-Token you only need one ingredient: The current time in the GMT+0 timezone formatted in the German format;
DD.MM.YYYY HH:mm:ss
DD = day of the month. Example: 01, 05, 15, 31 MM = month of the year. Example: 01, 06, 10, 12 YYYY = the year. Example: 0001, 1901, 2014 HH = hour of the day. Example: 00, 05, 13, 24 mm = minute of the hour. Example: 00, 21, 48, 59 ss = second of the minute. Example: 00, 21, 48, 59
This is all you need! You can now generate your auth code like this:
str = "3" + username + password + current_time; //example: "3tickarooeksarb20.04.2014 13:37:42" auth_code = getHmacSha1(str, secret);
Now make your request. The headers are nearly identical to normal API requests, except for the querytoken which is replaced by the time.
time: current_time Host: ovsyndication.kicker.de //see above
The major difference is the path this request goes to:
"http://" + host + "/AUTH/3/" + auth_code + ".json"
This request returns a JSON encoded answer, which follows this format:
{ auth: { status: <string> accessToken: <string> expires: <ger_date> serverTime: <ger_date> } }
API Methods
Catalogue
Response
{ catalogue: { countries: { country: [ { id: shortName: longName: isoName: iconSmall: } ] } sports: { sport: [ { id: shortName: longName: imId: } ] } ivwVariants: { ivwVariant: [ { type: sportId: ivw: } ] } imVariants: { imVariant: [ { ctrl: alias: [ressortId]: [keywords]: } ] } } }
Params:
None
LiveMatches
Response
{ leagues: { league: [ id: <int> shortName: <string> longName: <string> [iconSmall]: <string> countryId: <string> countryIconSmall: <string> matches: { match: [ { id: <int> state: <string> leagueId: <int> seasonId: <string> roundId: <int> date: <date> completed: <bool> currentPeriod: <int> currentMinute: <int> approvalId: <int> sportId: <int> displayKey: <int> homeTeam: { id: <int> shortName: <string> longName: <string> token: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> } guestTeam: { id: <int> shortName: <string> longName: <string> token: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> } results: { hergAktuell: <int> aergAktuell: <int> hergHz: <int> aergHz: <int> hergEnde: <int> aergEnde: <int> } } ] banner: [ type: <string> keywords: <string> hootAtPosition: <int> sort: <string> height: <int> ] } ] } }
Params
- spoid
-
Sports Id
Navigation
Response
{ navigation: { ressortgroup: [ { title: ivw: ressort: [ { title: [leagueId]: ressortId: iconSmall: ivw: subressorts: { subressort: [ { type: title: [leagueId]: [ressortId]: [sportId]: [tag]: ivw: } ] } } ] } ] } }
Params
None
LeagueList
Response
{ leagues: { league: [ { id: shortName: longName: [iconSmall]: currentSeasonId: currentRoundId: displayKey: displayKey2: [associationId]: [stateId]: [levelId]: [ressortId]: countryId: sportId: table: [imId]: } ] } }
Params
None
RessortMatches
Response
{ matches: { match: [ { id: <int> state: <string> leagueId: <int> seasonId: <string> roundId: <int> date: <date> completed: <bool> currentPeriod: <int> currentMinute: <int> approvalId: <int> sportId: <int> displayKey: <int> homeTeam: { id: <int> shortName: <string> longName: <string> token: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> } guestTeam: { id: <int> shortName: <string> longName: <string> token: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> } } ] } }
Params
- resid
-
ressortId I guess
- live
-
0 or 1 I guess
RessortPage
Response
{ modules: { module: [ { id: <int> typId: <int> typName: <string> orderBy: <int> boxtypId: <int> boxtypName: <string> title: <string> boxtitle: <string> / <null> leagueId: <int> ressortId: <int> sportId: <int> sportName: <string> objects: { document: [ { id: <int> date: <date> title: <string> header: <string> imageModul: <string> imageModulWidth: <int> imageModulHeigh: <int> imageText: <string> typId: <int> typName: <string> orderBy: <int> ressortId: <int> } ] [link]: [ { id: <int> title: <string> url: <string> orderBy: <int> } ] [match]: [ { id: <int> leagueId: <int> orderBy: <int> } ] } } ] } }
Params
- resid
-
ressortId I guess
CurrentIssue
Response
{ kicker: { kickerIssue: { title: <string> newsid: <int> image_portrait: <string> year: <int> number: <int> } } }
Params
None
GameDay
Response
{ matches: { match: [ { id: <int> state: <string> leagueId: <int> seasonId: <string> roundId: <int> date: <date> completed: <bool> currentPeriod: <int> approvalId: <int> sportId: <int> displayKey: <int> homeTeam: { id: <int> shortName: <string> longName: <string> token: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> } guestTeam: { id: <int> shortName: <string> longName: <string> token: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> } stadium: { city: <string> } results: [optional] { hergAktuell: <int> aergAktuell: <int> hergHz: <int> aergHz: <int> hergEnde: [int] aergEnde: [int] } } ] } }
Params
- ligid
-
Liga ID
- spieltag
-
Gameday
- saison
-
idk
LeagueSeasonInfo
Response
{ league: { id: <int> shortName: <int> longName: <int> teamType: <string> iconSmall: <string> currentSeasonId: <string> currentRoundId: <int> newResId: <int> country: { id: <string> shortName: <string> longName: <string> isoName: <string> iconSmall: <string> } teams: { team: [ id: <int> countryId: <string> shortName: <string> longName: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> lat: <float> lng: <float> stadium: { id: <int> name: <string> city: <string> lat: <float> lng: <float> } ] } gamedays: { gameday: [ { id: <int> title: <string> dateFrom: <date> dateTo: <date> } ] } } }
Params
- ligid
-
Liga ID
- saison
-
idk
Standing
Response
{ table: { id: <int> leagueId: <int> name: <string> seasonId: <string> roundId: <int> isLive: <bool> line1: <int> line2: <int> line3: <int> line4: <int> line5: <int> text: <string> teams: { team: [ { id: <int> shortName: <string> longName: <string> sortName: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> direction: <string> rank: <int> games: <int> goalsFor: <int> goalsAgainst: <int> wins: <int> ties: <int> lost: <int> points: <int> pointsNegativ: <int> winsOvertime: <int> winsPenalty: <int> lostOvertime: <int> lostPenalty: <int> groupId: ??? groupName: ??? divisionId: ??? divisionName: ??? conferenceId: ??? conferenceName: ??? lsLive: <bool> home_rank: <int> home_games: <int> home_goalsFor: <int> home_goalsAgainst: <int> home_wins: <int> home_ties: <int> home_lost: <int> home_points: <int> home_pointsNegativ: <int> home_winsOvertime: <int> home_winsPenalty: <int> home_lostOvertime: <int> home_lostPenalty: <int> away_rank: <int> away_games: <int> away_goalsFor: <int> away_goalsAgainst: <int> away_wins: <int> away_ties: <int> away_lost: <int> away_points: <int> away_pointsNegativ: <int> away_winsOvertime: <int> away_winsPenalty: <int> away_lostOvertime: <int> away_lostPenalty: <int> } ] } } }
Params
- ligid
-
Liga ID
- spieltag
-
Gameday
- saison
-
idk
TeamInfo
Response
{ team: { id: <int> shortName: <string> longName: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> defaultLeagueDisplayKey: <int> gruendung: <date> anschrift: <string> mitglieder: <int> mitgliederStand: <int> farben: <string> url: <url> sportId: <int> coach: { id: <int> shortName: <string> longName: <string> iconSmall: <string> birthday: <date> countryId: <char> country: <string> } captain: { id: <int> shortName: <string> longName: <string> iconSmall: <string> birthday: <date> countryId: <char> country: <string> teamMemberSince: <int> } } }
Params
- vrnid
-
Team ID
TeamNews
Response
{ team: { id: <int> shortName: <string> longName: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> sportId: <int> news: { document: [ id: <int> date: <date> title: <string> header: <string> imageTeamNews: <string> imageText: <string> typId: <int> typName: <string> linkUrl: [string] ressortId: <int> ] } } }
Params
- vrnid
-
Team ID
TeamRoster
Response
{ team: { id: <int> shortName: <string> longName: <string> defaultLeagueId: <int> players: { player: [ { squadPositionId: <int> squadPosition: <string> id: <int> shortName: <string> longName: <string> iconSmall: [string] countryId: <string> countryLongName: <string> countryIconSmall: <string> number: <int> birthday: <date> spiele: [int] tore: [int] notenschnitt: [int] } ] } } }
Params
- vrnid
-
Team ID
- ligid
-
Liga ID
TeamSchedule
Response
{ matches: { match: [ { id: <int> state: <string> leagueId: <int> seasonId: <string> roundId: <int> date: <date> completed: <bool> currentPeriod: <int> approvalId: <int> approvalName: [string] sportId: <int> displayKey: <int> homeTeam: { id: <int> shortName: <string> longName: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> } guestTeam: { id: <int> shortName: <string> longName: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> } league: { id: <int> shortName: <string> longName: <string> iconSmall: <string> } results: [optional] { hergAktuell: <int> aergAktuell: <int> hergHz: <int> aergHz: <int> hergEnde: <int> aergEnde: <int> } } ] } }
Params
- vrnid
-
Team ID
Transfers
Response
{ transfers: { transfer: [ { date: <date> statusId: <int> statusName: <string> title: <string> teaser: <string> documentId: [int] player: { id: <int> shortName: <string> longName: <string> iconSmall: [string] } teamOld: [optional] { id: <int> shortName: <string> longName: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> } teamNew: [optional] { id: <int> shortName: <string> longName: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> } } ] } }
Params
- ligid
-
Liga ID
- vrnid
-
Team ID
LeagueStatistics
Response
{ statistics: { stat: [ { type: <string> name: <string> sort: <int> {IF type IN [hometable, awaytable] } team: { id: <int> shortName: <string> longName: <string> sortName: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> groupId: ??? groupName: ??? divisionId: ??? divisionName: ??? conferenceId: ??? conferenceName: ??? home_rank: <int> home_games: <int> home_goalsFor: <int> home_goalsAgainst: <int> home_wins: <int> home_ties: <int> home_lost: <int> home_points: <int> home_pointsNegativ: <int> home_winsOvertime: <int> home_winsPenalty: <int> home_lostOvertime: <int> home_lostPenalty: <int> } {ENDIF} {IF type IN [torjaeger, scorer, topspieler, karten] } player: { id: <int> shortName: <string> longName: <string> iconSmall: <string> teamId: <int> teamShortName: <string> teamLongName: <string> spiele: <int> tore: <int> spielebenotet: [int] notenschnitt: [int] assists: [int] summe: [int] rot: [int] gelbrot: [int] geld: [int] platz: <int> teamIconSmall: <string> teamIconBig: <string> } {ENDIF} } ] } }
Params
- ligid
-
Liga ID
- saison
-
idk
MatchInfos
Response
{ match: { id: <int> state: <string> leagueId: <int> leagueLongName: <string> seasonId: <string> roundId: <int> roundName: <string> date: <date> completed: <bool> currentPeriod: <int> approvalName: <string> timeConfirmed: <int> sportId: <int> displayKey: <int> homeTeam: { id: <int> shortName: <string> longName: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> coach: { id: <int> shortName: <string> longName: <string> iconSmall: <string> function: <string> } } guestTeam: { id: <int> shortName: <string> longName: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> coach: { id: <int> shortName: <string> longName: <string> iconSmall: <string> function: <string> } } stadium: { id: <int> name: <string> city: <string> lat: <float> lng: <float> spectators: <int> } referee: { id: <int> shortName: <string> longName: <string> iconSmall: <string> city: <string> assi1: { id: <int> shortName: <string> longName: <string> } assi2: { id: <int> shortName: <string> longName: <string> } fourth: { id: <int> shortName: <string> longName: <string> } } results: { hergAktuell: <int> aergAktuell: <int> hergHz: <int> aergHz: <int> hergEnde: [int] aergEnde: [int] } document: { id: <int> } events: { event: [ { id: <int> eventtypeId: <int> gameMinute: <int> date: <date> score: "<int>:<int>" teamId: <int> player1Id: <int> player1shortName: <string> player1iconSmall: [string] player2Id: [int] player2shortName: [string] player2iconSmall: [string] state1Id: <int> state2Id: [int] state3Id: [int] state3Name: [string] } ] } stats: { hPlace: <int> aPlace: <int> hPoints: <int> aPoints: <int> hPointsAvg: <float-comma> aPointsAvg: <float-comma> hGoals: "<int>:<int>" aGoals: "<int>:<int>" hGoalsAvg: "<float-comma>:<float-comma>" aGoalsAvg: "<float-comma>:<float-comma>" hDuellWon: <int> aDuellWon: <int> hDuellDraw: <int> aDuellDraw: <int> hDuellLost: <int> aDuellLost: <int> } } }
Params
sppid: Match ID
Events
Response
{ match: { id: <int> state: <string> leagueId: <int> leagueLongName: <string> seasonId: <string> roundId: <int> roundName: <string> date: <date> completed: <bool> currentPeriod: <int> approvalName: <string> timeConfirmed: <int> sportId: <int> displayKey: <int> homeTeam: { id: <int> shortName: <string> longName: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> } guestTeam: { id: <int> shortName: <string> longName: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> } results: { hergAktuell: <int> aergAktuell: <int> hergHz: <int> aergHz: <int> hergEnde: [int] aergEnde: [int] } events: { event: [ { id: <int> eventtypeId: <int> text: <string> gameMinute: <int> gameMinuteExtratime: [int] date: <date> score: "<int>:<int>" teamId: <int> player1Id: <int> player1shortName: <string> player1iconSmall: [string] player2Id: [int] player2shortName: [string] player2iconSmall: [string] player3Id: [int] player3shortName: [string] player3iconSmall: [string] state1Id: <int> state2Id: [int] state3Id: [int] state3Name: [string] } ] banner: [ { type: <string> keywords: <string> hookAtPosition: <int> sort: <string> height: <int> } ] } }
Params
- sppid
-
Match ID
MatchLineup
Response
{ match: { id: <int> state: <string> leagueId: <int> leagueLongName: <string> seasonId: <string> roundId: <int> roundName: <string> date: <date> completed: <bool> currentPeriod: <int> approvalName: <string> timeConfirmed: <int> sportId: <int> displayKey: <int> homeTeam: { id: <int> shortName: <string> longName: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> players: { player: [ { id: <int> shortName: <string> shirtNumber: <int> actions: ??? substitude: <string> iconSmall: <string> position: [int] outMinute: [int] inMinute: [int] } ] } coach: { id: <int> shortName: <string> longName: <string> iconSmall: <string> function: <string> } } guestTeam: { id: <int> shortName: <string> longName: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> coach: { id: <int> shortName: <string> longName: <string> iconSmall: <string> function: <string> } } results: { hergAktuell: <int> aergAktuell: <int> hergHz: <int> aergHz: <int> hergEnde: [int] aergEnde: [int] } events: { event: [ { id: <int> eventtypeId: <int> gameMinute: <int> date: <date> score: "<int>:<int>" teamId: <int> player1Id: <int> player1shortName: <string> player1iconSmall: [string] player2Id: [int] player2shortName: [string] player2iconSmall: [string] player3Id: [int] player3shortName: [string] player3iconSmall: [string] state1Id: <int> state2Id: [int] state3Id: [int] state3Name: [string] } ] } } }
Params
- sppid
-
Match ID
LiveConference
Response
{ league: { id: <int> shortName: <string> longName: <string> priority: <int> iconSmall: <string> currentSeasonId: "<int>/<int>" currentRoundId: <int> displayKey: <int> displayKey2: <int> friendlyName: <string> newsResId: <int> matches: { match: [ { id: <int> state: <string> leagueId: <int> seasonId: "<int>/<int>" roundId: <int> date: <date> completed: <bool> currentMinute: <int> currentPeriod: <int> approvalId: <int> approvalName: <string> sportId: <int> displayKey: <int> homeTeam: { id: <int> shortName: <string> longName: <string> token: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> } guestTeam: { id: <int> shortName: <string> longName: <string> token: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> } results: { hergAktuell: <int> aergAktuell: <int> hergHz: <int> aergHz: <int> hergEnde: [int] aergEnde: [int] } } ] } events: { event: [ { id: <int> eventtypeId: <int> gameMinute: <int> date: <date> score: "<int>:<int>" teamId: <int> player1Id: <int> player1shortName: <string> player1iconSmall: [string] player2Id: [int] player2shortName: [string] player2iconSmall: [string] player3Id: [int] player3shortName: [string] player3iconSmall: [string] state1Id: <int> state2Id: [int] state3Id: [int] state3Name: [string] } ] banner: [ { type: <string> keywords: <string> hookAtPosition: <int> sort: <string> height: <int> } ] } } }
Params
- ligid
-
Liga ID
PlayerInfo
Response
{ player: { id: <int> sortName: <string> shortName: <string> name: <string> iconBig: <string> shirtNumber: <int> squadPositionID: <int> squadPosition: <string> birthday: <date> height: <int> weight: <int> teamMemberSince: <int> countryId: <string> countryLongName: <string> team: { id: <int> longName: <string> iconSmall: <string> iconBig: <string> defaultLeagueId: <int> } stats: { bl2Matches: <int> bl2Goals: <int> nationalCountryID: <string> nationalCountryLongName: <string> } teamHistory: { teamHistoryElement: [ id: <int> shortName: <string> longName: <string> iconBig: [string] defaultLeagueId: <int> dateFrom: <date> dateTo: <date> orderBy: <int> leagueMatches: [int] goals: [int] assists: [int] ] } seasonStats: { seasonStat: [ { leagueId: <int> leagueLongName: <string> seasonId: "<int>/<int>" matches: <int> gradedMatches: <int> grade: <float_ger> goals: <int> penalties: "<int>/<int>" assists: <int> scoring: <int> subIn: <int> subOut: <int> red: <int> yellowred: <int> yellow: <int> matchStats: { matchStat: [ { round: <int> location: <string> opponentId: <int> opponentLongName: <string> matchId: <int> matchResult: "<int>:<int>" grade: [float_ger] gloals: <int> penalties: "<int>/<int>" assists: <int> scoring: <int> subIn: [int] subOut: [int] red: <int> yellowred: <int> yellow: <int> } ] } } ] } } }
Params
- splid
-
Player ID
- vrnid
-
Team ID
- saison
-
idk