# Introduction

This is the introduction for the API.

Interaction with the API occurs via the HTTPS protocol.

### To make a request, use the following URL structure:

```html
https://api.cheatchecker.net/{section}?{parameters}
```

Replace `{section}` with the specific API section you wish to access and `{parameters}` with the required parameters for your request.

### Example

To retrieve all temporary tokens, make a GET request to the following endpoint:

```
/alltemptokens?token=xqe82uqs9l1pgvwmln2zpwpigijupa
```

### Response

Upon successful request, you will receive a JSON response outlining the status and details of each temporary token available. An example of the successful JSON response is as follows:

```json
{
  "status": "success",
  "tokens": [
    { 
      "id": 1,
      "tempToken": "471739244f81853c2a03857f71e64f",
      "duration": 3600,
      "created at": "2024-02-14 12:00:56"
    },
    {
      "id": 2,
      "tempToken": "f0ad2231e4261401a23b1e54ae72b4",
      "duration": 3600,
      "created at": "2024-02-14 12:00:58"
    }
  ]
}
```

### Required parameters

* Token - your authentication token

### Processing the Answer

If the request is successful, the field has a value of **success**. Every response from the API has a **status** field, which contains the status of the request.

```html
{
    "status": "success",
}
```

If the request ends with an error, the `status` field will have the value **error**. In this case, next to this field will be the `message` field containing the error message:

```html
{
    "status":"failed",
    "message":"Token is not specified in the URL parameter."
}
```


# Temporary Tokens


# Get All Temporary Tokens

/alltemptokens

Method for obtaining all temporary tokens in JSON format

### Get Request:

{% code fullWidth="false" %}

```
https://api.cheatchecker.net/alltemptokens?token=token
```

{% endcode %}

### Example answer:

```
{
    "status":"success",
    "tokens":
    [
        {
            "id":131,"tempToken":"471739244f81853c2a03857f71e64f",
            "duration":3600,
            "created at":"2024-02-14 12:00:56"
        },
        {
            "id":132,"tempToken":"f0ad2231e4261401a23b1e54ae72b4",
            "duration":3600,
            "created at":"2024-02-14 12:00:58"
        }
    ]
}
```


# Generate Temporary Token

/temp

Method to make temporary token with a duration.

### Post Request:

{% code fullWidth="false" %}

```
https://api.cheatchecker.net/temp?token=token&duration=3600 
```

{% endcode %}

### Example answer:

```
{
    "status":"success",
    "message":"The record was successfully added to the table.",
    "tempToken":"f0ad2231e4261401a23b1e54ae72b4",
    "duration":"3600"
}
```


# Expire


# Panel expire

/panelexp

Method to make temporary token with a duration.

### Get Request:

{% code fullWidth="false" %}

```
https://api.cheatchecker.net/panelexp?token=xqe82uqs9l1pgvwmln2zpwpigijupa
```

{% endcode %}

### Example answer:

```
{
    "status":"success",
    "expire":"2024-02-29 11:52:16"
}
```


