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

# Quick start

## App registration{#connection}

1. Create an account in Yandex Direct that you will use as an application developer:
    1. If you don't have a Yandex username, [register](https://passport.yandex.com/registration?mode=register).

    1. In the Yandex Direct web interface, [create an account ](https://direct.yandex.com/registered/main.pl?cmd=advertize): enter a valid email address, choose your country and currency, and click **Get started**.
    1. On the [API Settings](https://direct.yandex.com/registered/main.pl?cmd=apiSettings) page, click **Get API access** and accept the user agreement.

1.  [Register](https://yandex.ru/dev/direct/doc/en/concepts/register.md#oauth) your app on the Yandex.OAuth server.
1.  [Submit a request](https://yandex.ru/dev/direct/doc/en/concepts/register.md#request) for test access for your application.  Wait for your request to be approved.

## Debugging with test data{#sandbox}

You can use your developer account as a test user. You can also create a special test user (repeat steps above).

1. Get a [debugging OAuth token](https://yandex.com/dev/id/doc/ru/access) on behalf of the test user.
1. Enable the [Sandbox](https://yandex.ru/dev/direct/doc/en/concepts/sandbox-init.md), which is an application debugging environment where you can manage test campaigns without actual impressions and spending.
1. Send HTTP POST requests to the Sandbox using the debugging token. Request example:
    ```curl \
     -H 'Authorization: Bearer 0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f' \
     -H 'Accept-Language: en' \
     -d '
       {
         "method":"get",
         "params": {
           "SelectionCriteria": {},
           "FieldNames": [
             "Name",
             "DailyBudget",
             "Funds",
             "Statistics",
             "Type"
           ],
           "TextCampaignFieldNames": [
             "CounterIds",
             "RelevantKeywords",
             "Settings",
             "BiddingStrategy"
           ]
         }
       }' \
     "https://api-sandbox.direct.yandex.com/json/v5/campaigns"
    ```


## Switching to using real user data{#real-world}

1. In your application, implement a [way to get a token](https://yandex.ru/dev/direct/doc/en/concepts/auth-token.md#get-token) that is convenient for your users.

1. [Switch](https://yandex.ru/dev/direct/doc/en/concepts/register.md#modify) the request for test access to full access.  Wait for your request to be approved.

1. In your application, replace the sandbox addresses with the real addresses.  The address for each service is provided in the service description.
