> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Получение учётных данных API: client_id и api_key

> GET-запрос для получения client_id и api_key приложения Didit. api_key передаётся в заголовке x-api-key. Оплата по факту использования, без контрактов.



Запрос учетных данных приложения
        Скопировать промпт в буфер обмена



      
      

\<pre>

\`Read one application's full record — including its client_id and api_key (client_secret). Use this to RECOVER an api_key you've misplaced.

Endpoint:
GET https://apx.didit.me/auth/v2/organizations/me/{org_id}/applications/{app_id}/

Authentication:
Authorization: Bearer <access_token>
Get a token via POST /programmatic/login/.

Path parameters:
\- org_id (UUID, required) — Organization that owns the application. Get via GET /organizations/me/.
\- app_id (UUID, required) — Application UUID. Returned by POST /programmatic/verify-email/ (in the application.uuid field), by POST /organizations/me/{org_id}/applications/, or visible in the Didit console.

curl example:
curl "https://apx.didit.me/auth/v2/organizations/me/<ORG_ID>/applications/<APP_ID>/" \
-H "Authorization: Bearer <ACCESS_TOKEN>"

Response (200 OK):
\{
"uuid": "b2c3d4e5-6789-...",
"name": "My App",
"client_id": "S9LIYGSoWNuGMLHsvEt9dQ",
"api_key": "sk_live_example_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"website_url": "https://example.com",
"redirect_uris": ["https://example.com/callback"],
"terms_url": "https://example.com/terms",
"privacy_url": "https://example.com/privacy",
"description": "Production application",
"created_at": "2025-06-01T10:00:00Z",
"data_location": "eu",
"products": [
\{ "product": "identity", "status": "enabled", "modules": { "user_verification": true, "business_verification": true, "case_management": true } },
\{ "product": "transactions", "status": "disabled", "modules": { "travel_rule": true, "case_management": true } },
\{ "product": "authentication", "status": "disabled", "modules": {} }
]
}

How to use the response:
\- api_key → set as the x-api-key header on EVERY call to https://verification.didit.me/v3/... (sessions, workflows, questionnaires, AML monitoring, billing, etc.).
\- client_id → shown alongside api_key for OAuth-style introspection scenarios. Routine verification calls only need api_key.
\- data_location → where the application's verification data is stored and processed: "eu" (European Union, Ireland). Chosen when the application is created; "au" (Australia, Sydney) and "mx" (Mexico) are coming soon.
\- products → read-only. Always all three products in this order: identity, transactions, authentication. Each has a status (enabled, early_access or disabled) and its module switches (true or false). identity modules: user_verification, business_verification, case_management. transactions modules: travel_rule, case_management. authentication has none ({}).

Failure modes:
\- 401: { "detail": "Invalid access token" } or { "detail": "Expired access token" } when the token is malformed or expired.
\- 403: { "detail": "Only organization owners and admins can manage applications." } when you are a member of the organization but not an owner or admin.
\- 403: { "detail": "Your access to this organization is suspended." } when your membership in the organization is suspended.
\- 403: { "detail": "You do not have permission to perform this action." } when the request has no Authorization header.
\- 404: { "detail": "Organization not found." } when the organization does not exist or you are not a member of it, or { "detail": "Application not found." } when the application is not in that organization.

When to call:
\- After programmatic login from a new machine — you have an access_token but not the api_key, and you need x-api-key to start calling verification.didit.me.
\- Auditing your applications — list all apps with GET /organizations/me/{org_id}/applications/, then read each.

Note:
This endpoint does not rotate the credential. It returns the application's current api_key on every GET, so there is no "show api_key once" model.

For end-to-end Didit integration, paste in the full prompt at /integration/integration-prompt.`

\</pre>



      
      

Вставьте в



## OpenAPI

````yaml ru/openapi-auth.json GET /organizations/me/{org_id}/applications/{app_id}/
openapi: 3.0.0
info:
  version: 1.0.0
  title: Didit Auth API
  description: >-
    API программной регистрации и аутентификации для разработчиков и AI-агентов.
    Регистрация за 2 вызова API: без использования браузера. Самая удобная для
    агентов платформа верификации личности.


    ## Базовый URL


    Все endpoint в этой спецификации размещены по адресу
    `https://apx.didit.me/auth/v2`. Это другой хост, отличный от API верификации
    (`https://verification.didit.me/v3`). Не путайте их: этот хост
    аутентификации выдаёт ваши **токены доступа JWT** и позволяет просматривать
    список и управлять вашими **организациями** и **приложениями**. На хосте
    верификации вы вызываете сессии, сценарии, AML и т. д., аутентифицируясь с
    помощью **`api_key`**, возвращаемого этим API.


    ## Как устроен процесс аутентификации


    1. `POST /programmatic/register/`: отправьте email + пароль.

    2. Получите 6-значный буквенно-цифровой код по электронной почте.

    3. `POST /programmatic/verify-email/`: отправьте код. Вы получите обратно
    JWT `access_token`, `refresh_token`, организацию и стандартное приложение с
    `client_id` + `api_key`.

    4. Сохраните `api_key`. Используйте его в качестве `x-api-key` для каждого
    вызова к `https://verification.didit.me/v3/...`.

    5. В дальнейшем с любой машины `POST /programmatic/login/` обменивает ваши
    email + пароль на свежий JWT, после чего вызовите `GET /organizations/me/` и
    endpoint приложений для восстановления или ротации учётных данных.


    JWT требуется только для endpoint **Управления аккаунтом** в этой
    спецификации; трафик к API верификации использует долгоживущий `api_key`, а
    не JWT.


    ## Соглашения


    - Все тела запросов и ответов представляют собой JSON (`Content-Type:
    application/json`).

    - **Используйте реальный, доставляемый адрес электронной почты при
    тестировании `POST /programmatic/register/`.** Endpoint отправляет код
    подтверждения синхронно, поэтому адреса на зарезервированных тестовых
    доменах (`@example.com`, `@example.org`, `@*.test`, `@*.example`,
    `@*.invalid`) отклоняются службой доставки почты, и запрос возвращает `500`.
    Замените плейсхолдер `you@yourdomain.com` в примерах на почтовый ящик,
    который вы действительно можете прочитать.

    - Ошибки валидации возвращают HTTP `400` в одном из двух форматов:
    `{"field": ["message", ...]}` для проблем на уровне полей или `{"detail":
    "message"}` для ошибок бизнес-правил. Некоторые валидаторы (сложность пароля
    при регистрации, истечение срока действия кода при проверке email) в
    настоящее время возвращают простой массив `["message"]` вместо структуры с
    ключами полей - это известная несогласованность на стороне сервера, поэтому
    клиентский код должен принимать оба формата.

    - Ошибки аутентификации возвращаются в виде `{"detail": "..."}` с кодом HTTP
    `401` (недействительный bearer token) или `403` (отсутствует bearer token /
    недостаточно прав).

    - Ответы с ограничением частоты запросов содержат поле `wait` с временем
    задержки в секундах.
servers:
  - url: https://apx.didit.me/auth/v2
    description: Продакшн-сервер аутентификации
security: []
tags:
  - name: Programmatic Auth
    description: >-
      Жизненный цикл аккаунта с электронной почтой и паролем: регистрация,
      подтверждение, вход. Возвращает JWT `access_token`, который вы используете
      для endpoint'ов управления аккаунтом, а также (при подтверждении)
      `client_id` и `api_key` вашего первого приложения.
  - name: Account Management
    description: >-
      Аутентифицированные endpoint (JWT bearer), которые возвращают список
      организаций и позволяют создавать, получать или обновлять приложения.
      Используйте их для восстановления или ротации `api_key`, с помощью
      которого вы аутентифицируете вызовы API верификации.
paths:
  /organizations/me/{org_id}/applications/{app_id}/:
    get:
      tags:
        - Account Management
      summary: Получить учетные данные приложения
      description: >-
        Получить полную запись одного приложения, включая `client_id` и
        `api_key`. Используйте это для восстановления утерянного `api_key`.
      operationId: get_application_credentials
      parameters:
        - name: org_id
          in: path
          required: true
          description: UUID организации, владеющей приложением.
          schema:
            type: string
            format: uuid
            example: a1b2c3d4-5678-90ab-cdef-111111111111
        - name: app_id
          in: path
          required: true
          description: UUID приложения, учётные данные которого вы хотите прочитать.
          schema:
            type: string
            format: uuid
            example: b2c3d4e5-6789-01bc-defg-222222222222
      responses:
        '200':
          description: Запись приложения, включая его `client_id` и `api_key`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Application'
              examples:
                Success:
                  value:
                    uuid: b2c3d4e5-6789-01bc-defg-222222222222
                    name: My App
                    client_id: S9LIYGSoWNuGMLHsvEt9dQ
                    api_key: sk_live_example_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                    website_url: https://example.com
                    redirect_uris:
                      - https://example.com/callback
                    terms_url: https://example.com/terms
                    privacy_url: https://example.com/privacy
                    description: Production application
                    created_at: '2025-06-01T10:00:00Z'
                    data_location: eu
                    products:
                      - product: identity
                        status: enabled
                        modules:
                          user_verification: true
                          business_verification: true
                          case_management: true
                      - product: transactions
                        status: disabled
                        modules:
                          travel_rule: true
                          case_management: true
                      - product: authentication
                        status: disabled
                        modules: {}
        '401':
          description: >-
            Токен доступа некорректен, недействителен или истёк. Получите новый
            с помощью `POST /programmatic/login/`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
              examples:
                InvalidToken:
                  value:
                    detail: Invalid access token
                ExpiredToken:
                  value:
                    detail: Expired access token
        '403':
          description: >-
            Вы не можете читать это приложение. Участник организации, не
            являющийся владельцем или администратором, получает `Only
            organization owners and admins can manage applications.` Владелец
            или администратор, чей доступ к организации приостановлен, получает
            `Your access to this organization is suspended.` Запрос без
            заголовка `Authorization` получает `You do not have permission to
            perform this action.`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
              examples:
                NotOwnerOrAdmin:
                  summary: Участник, не являющийся владельцем или администратором
                  value:
                    detail: >-
                      Only organization owners and admins can manage
                      applications.
                Suspended:
                  summary: Членство приостановлено
                  value:
                    detail: Your access to this organization is suspended.
                MissingToken:
                  summary: Отсутствует заголовок Authorization
                  value:
                    detail: You do not have permission to perform this action.
        '404':
          description: >-
            Организация не существует, вы не являетесь ее участником либо
            приложение не существует в этой организации.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
              examples:
                OrganizationNotFound:
                  summary: Организация не найдена, или вы не являетесь её участником
                  value:
                    detail: Organization not found.
                ApplicationNotFound:
                  summary: Такое приложение отсутствует в этой организации
                  value:
                    detail: Application not found.
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl
            "https://apx.didit.me/auth/v2/organizations/me/$ORG_ID/applications/$APP_ID/"
            \
              -H "Authorization: Bearer $ACCESS_TOKEN"
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Use the access token that account.login returns.
            client = Didit(account_token="YOUR_ACCESS_TOKEN")

            result = client.account.applications.retrieve(
                "a1b2c3d4-5678-90ab-cdef-111111111111",
                "b2c3d4e5-6789-01bc-defg-222222222222",
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Use the access token that account.login returns.
            const didit = new Didit({ accountToken: "YOUR_ACCESS_TOKEN" });

            const result = await didit.account.applications.retrieve(
              "a1b2c3d4-5678-90ab-cdef-111111111111",
              "b2c3d4e5-6789-01bc-defg-222222222222",
            );
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Use the access token that account.login returns.\nclient := didit.NewClient(option.WithAccountToken(\"YOUR_ACCESS_TOKEN\"))\n\nresult, err := client.Account.Applications.Retrieve(ctx, \"a1b2c3d4-5678-90ab-cdef-111111111111\", \"b2c3d4e5-6789-01bc-defg-222222222222\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;


            // Use the access token that account.login returns.

            Didit client =
            Didit.builder().accountToken("YOUR_ACCESS_TOKEN").build();


            var result =
            client.account().applications().retrieve("a1b2c3d4-5678-90ab-cdef-111111111111",
            "b2c3d4e5-6789-01bc-defg-222222222222");

            System.out.println(result);
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Use the access token that account.login returns.

            $didit = new DiditClient(accountToken: 'YOUR_ACCESS_TOKEN');


            $result =
            $didit->account->applications->retrieve('a1b2c3d4-5678-90ab-cdef-111111111111',
            'b2c3d4e5-6789-01bc-defg-222222222222');

            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Use the access token that account.login returns.
            didit = Didit::Client.new(account_token: "YOUR_ACCESS_TOKEN")

            result = didit.account.applications.retrieve(
              "a1b2c3d4-5678-90ab-cdef-111111111111",
              "b2c3d4e5-6789-01bc-defg-222222222222"
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Use the access token that account.login returns.

            using var client = new DiditClient(new DiditClientOptions {
            AccountToken = "YOUR_ACCESS_TOKEN" });


            var result = await
            client.Account.Applications.RetrieveAsync("a1b2c3d4-5678-90ab-cdef-111111111111",
            "b2c3d4e5-6789-01bc-defg-222222222222");

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    Application:
      type: object
      description: >-
        Полная запись приложения. `uuid`, `client_id` и `api_key` никогда не
        меняются после создания. `data_location` также не меняется, за
        исключением одного раза для продакшн-приложения, созданного вместе с
        вашей организацией, до начала его использования (см. запрос на
        обновление).
      properties:
        uuid:
          type: string
          format: uuid
          description: UUID приложения. Используйте как `{app_id}` в последующих вызовах.
          example: b2c3d4e5-6789-01bc-defg-222222222222
        name:
          type: string
          description: Отображаемое имя приложения, показываемое в консоли Didit.
          example: Acme Production App
        client_id:
          type: string
          description: >-
            Публичный идентификатор клиента, безопасный для встраивания в
            сценарии авторизации наподобие OAuth.
          example: S9LIYGSoWNuGMLHsvEt9dQ
        api_key:
          type: string
          description: >-
            Долгоживущий секрет (также называемый `client_secret`). Используйте
            в качестве заголовка `x-api-key` для каждого вызова к
            `https://verification.didit.me/v3/...` (сессии, сценарии, AML и т.
            д.). Относитесь к нему как к конфиденциальным данным; никогда не
            раскрывайте на стороне клиента. Новые ключи начинаются с `sk_live_`
            (продакшн-приложение) или `sk_test_` (приложение в песочнице), за
            которыми следуют 43 URL-безопасных символа (буквы, цифры, `-` и
            `_`). Ключи, созданные до ввода этого формата, не имеют префикса и
            продолжают работать без изменений. В течение 72 часов после
            восстановления аккаунта запросы на получение списка, просмотр и
            обновление возвращают здесь пустую строку вместо ключа.
          example: sk_live_example_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        website_url:
          type: string
          nullable: true
          description: URL веб-сайта или приложения, связанный с этим приложением.
          example: https://acme.example
        redirect_uris:
          type: array
          items:
            type: string
          description: >-
            Разрешённые URI перенаправления для потоков перенаправления OAuth и
            верификации.
          example:
            - https://acme.example/callback
        terms_url:
          type: string
          nullable: true
          description: URL условий использования, отображаемый в процессе верификации.
          example: https://acme.example/terms
        privacy_url:
          type: string
          nullable: true
          description: >-
            URL политики конфиденциальности, отображаемый в процессе
            верификации.
          example: https://acme.example/privacy
        description:
          type: string
          nullable: true
          description: >-
            Внутреннее описание приложения (не отображается конечным
            пользователям).
        created_at:
          type: string
          format: date-time
          example: '2025-06-01T10:00:00Z'
        data_location:
          $ref: '#/components/schemas/ApplicationDataLocation'
        products:
          type: array
          readOnly: true
          description: >-
            Продукты приложения. Всегда все три в следующем порядке: `identity`,
            `transactions`, `authentication`. В новом приложении включён продукт
            `identity` со всеми активными модулями, а `transactions` и
            `authentication` отключены. Только для чтения: ключ `products` в
            теле создания или обновления игнорируется.
          items:
            $ref: '#/components/schemas/ApplicationProduct'
          example:
            - product: identity
              status: enabled
              modules:
                user_verification: true
                business_verification: true
                case_management: true
            - product: transactions
              status: disabled
              modules:
                travel_rule: true
                case_management: true
            - product: authentication
              status: disabled
              modules: {}
    AuthError:
      type: object
      description: Оболочка ошибки аутентификации, авторизации или отсутствия ресурса.
      properties:
        detail:
          type: string
          example: Invalid access token
    ApplicationDataLocation:
      type: string
      enum:
        - eu
        - au
        - mx
      description: >-
        Место хранения и обработки данных верификации приложения выбирается при
        создании приложения. `eu`: Европейский союз (Ирландия), по умолчанию.
        `au` (Австралия, Сидней) и `mx` (Мексика) станут доступны в ближайшее
        время: запрос с их указанием возвращает 400 `This data location is not
        available yet.` Приложение песочницы организации всегда располагается в
        Европейском союзе.
      example: eu
    ApplicationProduct:
      type: object
      description: >-
        Один продукт приложения и его состояние. Только для чтения: endpoints
        приложения возвращают его и игнорируют в теле запроса.
      properties:
        product:
          type: string
          enum:
            - identity
            - transactions
            - authentication
          description: >-
            `identity` (Верификация личности), `transactions` (Мониторинг
            транзакций) или `authentication` (Аутентификация).
          example: identity
        status:
          type: string
          enum:
            - enabled
            - early_access
            - disabled
          description: >-
            Включён ли продукт для этого приложения. `early_access` применяется
            только к `authentication`, которую Didit включает для вас.
          example: enabled
        modules:
          type: object
          additionalProperties:
            type: boolean
          description: >-
            Переключатели модулей продукта, каждый со значением `true` или
            `false`. `identity` включает `user_verification`,
            `business_verification` и `case_management`. `transactions` включает
            `travel_rule` и `case_management`. `authentication` не содержит
            модулей (`{}`). `case_management` представляет собой одну настройку,
            отображаемую как в `identity`, так и в `transactions`, поэтому она
            имеет одинаковое значение в обоих разделах.
          example:
            user_verification: true
            business_verification: true
            case_management: true
      required:
        - product
        - status
        - modules
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Подписанный по алгоритму RS256 JWT `access_token`, возвращаемый вызовами
        `POST /programmatic/login/` или `POST /programmatic/verify-email/`.
        Передавайте как `Authorization: Bearer <access_token>`. Срок действия по
        умолчанию составляет 86400 секунд (24 часа). Этот token действителен
        только для endpoints управления аккаунтом на `apx.didit.me/auth/v2`. API
        верификации (`verification.didit.me/v3`) использует вместо него
        долгоживущий `api_key` в заголовке `x-api-key`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.