# SMS Code - авторизация sms

Запросы выполняются методом **POST** или **GET** на URL:&#x20;

**<https://api.telefon-ip.ru/api/v1/authcalls/{token}/{action}/{params}>**  где:&#x20;

**token  -** ключ доступа к API, который можете получить в личном кабинете или по запросу на <support@telefon-ip.ru>.&#x20;

**action** - вызываемые функции API описанные ниже в документации

**params** - передаваемые параметры в зависимости от метода вызова, обычно для GET запроса

{% hint style="info" %}
Подпись в тексте sms согласовывается по адресу <support@telefon-ip.ru>
{% endhint %}

***

## get\_sms\_code - запрос sms с кодом авторизации

<mark style="color:blue;">`GET`</mark> `https://api.telefon-ip.ru/api/v1/authcalls/{{token}}/get_sms_code/{{phone}}/`

Отправка кода авторизации через смс. Генерируется случайный четырех значный код. Если нужно отправить свой код, необходимо его передать в параметре code

#### Path Parameters

| Name                                    | Type   | Description                                                                                                            |
| --------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------- |
| token<mark style="color:red;">\*</mark> | String | Ключ доступа                                                                                                           |
| phone<mark style="color:red;">\*</mark> | String | <p>Номер телефона вызываемого абонента. </p><p><em>Ограничение на количество отправок в сутки (опционально).</em> </p> |

#### Query Parameters

| Name | Type   | Description                                                                                     |
| ---- | ------ | ----------------------------------------------------------------------------------------------- |
| code | String | Код авторизации, если указан отправляется данный код. Длина кода не должна превышать 4 символа. |

{% tabs %}
{% tab title="200: OK Код авторизации" %}

```
{
    "success": true,
    "error": "",
    "data": {
        "phone": "79244501003",
        "code": "1003",
        "id": 168
    }
}
```

{% endtab %}
{% endtabs %}


---

# 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://docs.telefon-ip.ru/reference/api-reference/sms-code-avtorizaciya-sms.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.
