# Fundamentals

Once you have taken a glance at our API, let's move forward to the next step right now.

## What You Need To Start?

We assume you already have knowledge of RESTful APIs and programming languages such as `Node.js` or `PHP`.

You will need an `API_TOKEN` issued by our administrators, which serves as your identity to bypass our security checks. Please keep your token string confidential to prevent any potential malicious activities. We are not responsible if you expose your token string.

{% hint style="info" %}
API\_TOKEN string looks like this: <mark style="color:red;">`ed45553e-1702-4342-a70d-09bf7ff7f568`</mark>
{% endhint %}

We will provide you with one or more accounts for back office login. You can find your `API_TOKEN` string in the back office. Accounts will be issued based on your currency requirements. If you need support for multiple currencies, you will require separate accounts for each currency, as each account is designated for a single currency.

Please [contact us](https://scorpioplay.com/contact) to obtain your accounts.

## HTTP Headers

All HTTP requests related to API must include the following HTTP headers.

You can check the API\_TOKEN value in the provided manager account's settings and information.

<table><thead><tr><th width="167">Name</th><th width="186">Value</th><th>Example</th></tr></thead><tbody><tr><td>Authorization</td><td>Bearer {API_TOKEN} </td><td><mark style="color:green;"><code>Authorization: Bearer ed45553e-1702-4342-a70d-09bf7ff7f568</code></mark></td></tr><tr><td>Accept</td><td>application/json</td><td><mark style="color:orange;"><code>Accept: application/json</code></mark></td></tr><tr><td>Content-Type</td><td>application/json</td><td><mark style="color:red;"><code>Content-Type: application/json</code></mark></td></tr></tbody></table>

## System Security

In preparation for an attack on this system, simultaneous calls from the same agent are limited to 50 times, and if exceeded, `SERVER_IS_BUSY(1018)` is returned.&#x20;

When this code returns, you must wait for the existing call to complete.

## IP Restriction

The API can only be called from servers with IP addresses specified in the <mark style="color:blue;">\[Settings]</mark> page of our back office. Enter each IP address separated by a space or a new line (e.g., 1.1.1.1 2.2.2.2). If you do not wish to restrict access by IP, leave the \[Allowed IP] field blank.

## Agent Subsystems

The term <mark style="color:red;">**'Agent'**</mark> refers to a single casino website operator. If you manage multiple casinos, you are referred to as an <mark style="color:red;">**'Operator'**</mark>.&#x20;

An Operator can have multiple Agents under their control, forming a hierarchy. Each Agent operates independently and has their own account for our back office.

As an Operator, you can create as many sub-agents as needed and manage all Agents under your supervision. If you are a broker looking to resell our API, you can create multiple Operators under your management.

## Balance System

Each agent in the system is assigned a digital wallet. This wallet functions as a repository for their credits, which are referred to as <mark style="color:red;">**'points'**</mark>. These points are essential for the operation of the agent's casino activities. Without sufficient points in their wallet, an agent cannot run or manage their casino operations effectively.

Points can be acquired from higher-level operators, often referred to as parent operators. These parent operators distribute points to their agents, enabling them to maintain and operate their casinos. Essentially, the flow of points from parent operators to agents is crucial for the continuous functioning of the casino system.


---

# Agent Instructions: 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:

```
GET https://slotcity.gitbook.io/scorpio-play-casino-api-doc/getting-started/publish-your-docs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
