Authentication. With developer-config.json on hands you'll be able to authenticate your Game API server or Game Client in OKLP API.
Create Match flow.
Players registered in OKLP service select a game, invite players in order to create a match.
Once enough players have joined and paid entry fees (if any) the match is started. OKLP API will notify Game API about a new match has started by pushing match info updates.
Play Match flow.
Player’s Browser obtains a unique Game Client URL with a match-token. Game Client will be opened in the Players Browser. See how we direct players to the game.
Game Client must verify the match-token by requesting match, user infofrom the OKLP API to make sure the match-token is not expired.
Once the Game Client verifies the match-token users can start playing the match.
The OKLP API will store the results and payout winnings (if any).
2. Game API and Game Client TODOs
You must provide the following information prior your game registration:
Match info webhook URL. It will be used to notify your Game API about a new OKLP match started. 2.3.1 item below.
Game client base URL. It will be used to redirect users to your Game Client once players start playing a match. 2.3.2 item below.
Obtain developer-config.json from our support team once your game is registered. Store it securely, as it will be used to obtain OKLP API Authentication token.
Implement:
HTTP PUT {your-match-info-url} endpoint. OKLP sends requests to Game API. Should return HTTP 200 status. No retries are implemented at the moment. See Receiving push updates
Once the match is finished, report match results to the OKLP API. Your Game API must send a request to HTTP POST ${config.okletsplay_url}/api/games/v1/finish with appropriate body.
3. Next Steps
By following this short guide you’ll be able to start working with OKLP API and engage your players to play matches. Explore docs, to make sure you’ve implemented everything required for your game. Continue reading about developer config and authentication.
Each game may have individual peculiarities, if you have any questions regarding the integration contact us.