Game Launch HTML Scheme Integration API PG Soft Slots games

1. Integration API
1.1 API Formats
Request
The API uses HTTP form methods and a RESTful endpoint structure. PGSoft will send requests in the
following content type:
Content-Type: application/x-www-form-urlencoded
Response
For successful request, system returns HTML-formatted response with HTTP status code 200:
Content-Type: text/html
Example:
Successful Response
<html>
<body>
[HTML Codes]
</body>
</html>
Failed/Error Response
System returns non-200 HTTP status code.
2 Launch Game
2.1 Launch Game Methods
2.1.1 HTML Scheme
• Note:The old launch game method (URL Scheme) will be deprecated on December 31, 2023.
The HTML scheme is the conventional method for launching the game. Players need to log in through the
operator's website and start the game via the game lobby.
1. Players access the operator's website and click on the PG SOFT game.
2. The operator's frontend calls the backend service to obtain the HTML code.
3. After receiving the frontend request, the backend service calls the PG SOFT GetLaunchURLHTML
API.
4. PG SOFT API returns the HTML code.
5. The backend sends the HTML code back to the frontend*.
6. The frontend receives the HTML code and executes it, displaying the HTML content on the player's
browser (running PG SOFT game).
*Note: Operator should include the following (headers) to prevent the response from being stored
in the cache:
Cache-Control: no-cache, no-store, must-revalidate
The Advantage:
PG SOFT will automatically detect and use the best game server address based on the player's location,
ensuring optimal game loading speed and enhancing the gaming experience. In the event of domain name
issues, PG SOFT can unilaterally switch the game server address without requiring cooperation from the
operator, thus reducing the time needed for configuration and changing to a new game domain.
2.1.2 Implementation
STEP 1
The operator needs to call the PG SOFT GetLaunchURLHTML API through its own backend to obtain the
HTML page code.
Note: Operator should include the following (headers) to prevent the response from being stored in
the cache:
Cache-Control: no-cache, no-store, must-revalidate
STEP 2
After obtaining the HTML page code, execute the HTML code through a web browser.
Please refer to the following operator's lobby example:
2.1.3 GetLaunchURLHTML API
The operator's backend service will call this API to obtain the HTML code for running the game.
Request
API URL : {PgSoftAPIDomain}/external-game-launcher/api/v1/GetLaunchURLHTML
HTTP Method : POST
Example:
Body:
operator_token=xxxx&path=%2F1%2Findex.html&extra_args=btt%3D1%26ops%3D12345-abcd1234-abcd-12345&url_type=game-entry&client_ip=1.1.1.1
Response
<HTML Codes>
2.1.4 API Test
2.1.4.1 Sample Request
Method 1: POSTMAN (RAW body)
Below is an example of calling PG SOFT GetLaunchURLHTMLAPI through Postman to obtain the HTML
code.
Request:
Headers:
Content-Type: application/x-www-form-urlencoded
Body (raw):
operator_token=xxxx&path=%2F1%2Findex.html&extra_args=btt%3D1%26ops%3D12345-abcd1234-abcd-12345&url_type=game-entry&client_ip=1.1.1.1
Method 2: CURL command
Below is an example of calling PG SOFT GetLaunchURLHTMLAPI through CURL command to obtain the
HTML code.

Spain
Portugal

