---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://yandex.ru/dev/direct/doc/en/sandbox.md
sourcePath: en/start/sandbox.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/direct/doc/en/llms.txt

# Lesson 5. How to enable Sandbox



In this lesson, you will learn how to use the Yandex Direct API without accidentally launching a live campaign or spending a real budget.

## What is Sandbox? {#sandbox_whats_sandbox}

_Sandbox_ is a test environment used to debug apps accessing Yandex Direct API. In Sandbox, you can make requests, get responses, and monitor status of campaigns and ads. However, in Sandbox, you're working with the **test data only**, and your actions won't affect your actual campaigns. Test ads are never served, the test budget does not affect your real account in Yandex Direct, while the statistical report contains some pseudorandom data.

![](_assets/sandbox_whats_sandbox1.png)

Your app's requests to the Sandbox must be in the same format as your real data requests. Sandbox uses real OAuth tokens. The only difference between the Sandbox requests and real data requests are the URLs they use.

The Sandbox **has no web interface**, so you can't see the test clients or test campaigns in the interface. You can only work with the Sandbox by calling API methods.

## How to enable {#sandbox_connect}

To enable Sandbox for your account, do the following:

1. In the Yandex Direct web interface, open the **API** section and go to the [Sandbox](https://direct.yandex.ru/registered/main.pl?cmd=apiSandboxSettings) tab.
1. Click the **Launch sandbox** link.

    ![](_assets/sandbox_connect1.png)

1. Choose a role: "Client" (direct advertiser) or "Agency" (advertising agency with its clients). Specify the currency for the test account. Select the **Create test campaigns** checkbox.

    ![](_assets/sandbox_connect2.png)

1. Click the **Continue**  button.

    Depending on the role you have selected, three test campaigns or three test clients are created immediately in Sandbox. Virtual money will be credited to one of the campaigns.

## Working with Sandbox {#sandbox_feachures}

- The Sandbox is active while you are using it. If no requests have been sent to the Sandbox over a month, your test accounts and all their settings are deleted. You will have to set up the test data again.
- If you want to disable the Sandbox, click the **Stop using Sandbox** link.
- If you switch the role, the test data is deleted and the Sandbox is created from scratch.

## Task {#sandbox_task}

Enable Sandbox with the "Client" role, creating the client account in rubles with preset test campaigns.

[Complete a task](https://direct.yandex.ru/registered/main.pl?cmd=apiSandboxSettings&tab=apiSandboxSettings)

## What's next {#sandbox_whats_now}

So you have completed all the preparation steps and are ready to start working with Yandex Direct API. In the next lesson, you will make your first request to the API.

## Useful links {#sandbox_usfull_links}

- [Sandbox](https://direct.yandex.ru/registered/main.pl?cmd=apiSandboxSettings) tab in the Yandex Direct interface

<!--
## Вопросы {#sandbox_questions}

1. **Зачем нужна Песочница?**

    {% list tabs radio %}

    - Для отладки приложений на реальных данных.

      ![](_assets/incorrect.png) Неверно.

    - Для общения с другими разработчиками.

      ![](_assets/incorrect.png) Неверно.

    - Для отладки приложений на тестовых данных.

      ![](_assets/correct.png) Верно!

    {% endlist %}

1. **Как посмотреть, какие рекламные кампании есть в Песочнице?**

    {% list tabs radio %}

    - Зайти в специальный веб-интерфейс Песочницы, там отобразятся все кампании.

      ![](_assets/incorrect.png) Неверно.

    - Выполнить запрос соответствующим методом API к серверу Песочницы.

      ![](_assets/correct.png) Верно!

    - Нажать кнопку **Посмотреть кампании Песочницы** в веб-интерфейсе Директа.

      ![](_assets/incorrect.png) Неверно.

    {% endlist %}

1. **Что произойдет, если запустить рекламную кампанию в Песочнице?**

    {% list tabs radio %}

    - Изменения коснутся только данных в Песочнице, на реальные кампании они не повлияют.

      ![](_assets/correct.png) Верно!

    - Начнутся показы объявлений, деньги за клики будут списаны с реального счета.

      ![](_assets/incorrect.png) Неверно.

    - Начнутся показы объявлений, деньги за клики списываться не будут.

      ![](_assets/incorrect.png) Неверно.

    - Запущенная кампания будет преобразована в реальную кампанию.

      ![](_assets/incorrect.png) Неверно.

    {% endlist %}
-->
