> For the complete documentation index, see [llms.txt](https://the-bet-brothers.gitbook.io/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://the-bet-brothers.gitbook.io/doc/supplier-api/supplier-protocol-api.md).

# Supplier Protocol API

Throughout a gaming session, various interactions take place between Supplier and The Bet Brothers platform, involving seamless data exchange facilitated by an API. This API operates as a REST interface, ensuring that data is conveyed through POST requests and organized in the JSON format. For each method call, specific parameters are passed within the request body to specify the desired action.

A key part of the integration process is the `SUPPLIER_URL`, which will be used for the game launcher, and the `SUPPLIER_API_URL`, which will be used for Free Spins, Bet Levels, and Historical Rounds.

In return, The Bet Brothers platform provides essential details including `WALLET_URL`, `PROVIDER_ID`, `PROVIDER_NAME`, and a `PASSWORD` at the initiation of the integration.

### Security: Request Signing using HMAC-SHA256 Algorithm

Security is a paramount concern, and to uphold the integrity and authenticity of every API request, we employ a request signing mechanism. Each request's signature is computed using the HMAC-SHA256 algorithm, with the request body as the message and a unique password supplied by the platform serving as the encryption key. This generated signature is then included in the HTTP request's `"X-REQUEST-SIGN"` header.

Below, you'll find a PHP example illustrating how to calculate and incorporate the request signature:

```php
    $data = '{
      "provider_name":"test",
      "provider_id":19,
      "game_symbol": "MadMonkey",
      "language": "en",
      "currency_code": "EUR",
      "lobby_url": "https://www.google.com",
      "is_mobile": true,
      "is_demo": true
        }';

    $password = 'password';

    $hash = hash_hmac('sha256', $data, $password);

    Http::withHeaders([
        'Content-Type'   => 'application/json',
        'X-REQUEST-SIGN' => $hash,
    ])->post($uri, $data);
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://the-bet-brothers.gitbook.io/doc/supplier-api/supplier-protocol-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
