papergamesio

FREEMIUM
By papergamesio | Updated a month ago | Gaming
Popularity

7.4 / 10

Latency

78ms

Service Level

100%

Followers: 2
Resources:
Product Website
API Creator:
avatar
papergamesio
papergamesio
Rate API:
Log In to Rate API

README

Goal

This API aims to allow third-party applications to initiate one-on-one game sessions on the online gaming platform papergames.io.

In a nutshell, your server calls the API and retrieves an URL that can be embedded into an iframe to empower your application with online game sessions.

Use-cases examples

  • Educative platforms wanting to enhance the interactivity of one-to-one sessions with a student.
  • Telemedicine platforms using games on one-on-one therapy sessions with children.
  • Teambuilding platforms wishing to add games to their activities.
  • Chat applications aiming to empower interaction with online gaming.

Supported games

API

The endpoint POST /api/room/embedded creates a room session and returns iframe URLs that can be used by your application to connect two remote players.
Please refer to the endpoints section for usage instructions.

Pricing

Please refer to the pricing section to see our rates.

Quotas
The Requests represent a single call to the API. If two players are connected and play 10 rounds of Tic-Tac-Toe, you’ll be charged for one game session.

API Response

The playUrl field contains an embeddable URL that can be integrated into an iframe for a user to play.
The watchUrl field contains an embeddable URL that can be integrated into an iframe for a user to watch the game as a spectator.

On your application, you should display to the players an iframe containing the playUrl field as src attribute along with the username.
When the iframe is displayed on your FrontEnd, it automatically initiates a connection with papergames.io. The first player will have a message “Waiting for player”. The game session begins as soon as the iframe is displayed to the second player. The players can play together as many rounds as they want without creating extra charges.

URL to play

https://papergames.io/en/r/{roomUid}/embed/play?username=John Doe

The parameter username needs to be provided as GET parameter in the iframe src attribute to set the payer’s name.

URL to spectate

https://papergames.io/en/r/{roomUid}/embed

Playground

You can use our sample codepen to test the result of this API:
https://codepen.io/gazeau/pen/PoQvbPz
Important: to emulate the second player, you must open the codepen on a private navigation window.

Integration flow

Integration flow

Rating: 5 - Votes: 1