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

# Access and authorization

An application (program, script, or other type of app) sends an API request on behalf of a Yandex Direct user who represents a company or agency to manage this user's data.

The app can access a user's data under the following conditions:

1. The app developer completed the [application registration process](https://yandex.ru/dev/direct/doc/en/concepts/register.md), and the request for access was approved.

1. The user has a Yandex Direct account that represents a company, an agency, or a client of an agency, and was granted access to the agency's data.

    {% note info %}

    - If the agency granted the client read-only access to the web interface, the client's representative can only get data when using the API, as well.

    - If the agency granted the client permission to edit campaigns, the client's representative can use either the web interface or the API for managing the client's campaigns.

    {% endnote %}

1. The user has accepted the user agreement on the [API page for the Yandex Direct service](https://direct.yandex.ru/registered/main.pl?cmd=apiSettings&api_welcome=yes).
1. The user has allowed the app to make requests.

    The app must request permission from the user to access data, get an [access token](https://yandex.ru/dev/direct/doc/en/concepts/auth-token.md), and specify the token in requests.

    To get a token, the application must redirect the user to the access request page. The user logs in to Yandex (using their login for Yandex Direct) and clicks the **Confirm** button. Next, the Yandex server generates a token and sends it to the app.

## Restricting access by IP address {#restrictions}

API access may be restricted by IP address, for increased information security. The user can specify the allowed IP addresses on the **API settings** page under the [Settings](https://direct.yandex.ru/registered/main.pl?cmd=apiSettings) tab.
