Apps & integrations

Connect an app

Connect an app or AI agent to your ACDN account. Sign in yourself and approve the access it requests.

Only enter a code from an app you have just asked to connect. Never approve a code sent by someone else.

OAuth 2.0 · Device flow

For app developers

Contact ACDN to register your application and receive a permanent Client ID. Use the same ID for all users and installations. Each user approves access separately; no client secret is required for device authorization.

Access tokens last one hour. The application can renew access until you revoke it or its refresh token expires after 30 days without renewal.

1. Request an authorization code

Send your registered client_id and scope=account in a form-encoded POST to the device endpoint. The approval screen uses the registered application name. Invalid input returns 422, an unknown Client ID returns 401, and a disabled application returns 403. Access follows the approving user’s current permissions.

curl --request POST 'https://acdn.uz/api/oauth/device/code' \
  --header 'Accept: application/json' \
  --data-urlencode 'client_id=YOUR_CLIENT_ID' \
  --data-urlencode 'scope=account'

2. Wait for approval and get a token

Open verification_uri_complete in the user’s browser. Wait for explicit approval. Poll the token endpoint at the returned interval using the device_code grant. Handle authorization_pending and increase the interval by 5 seconds on slow_down.

curl --request POST 'https://acdn.uz/api/oauth/token' \
  --header 'Accept: application/json' \
  --data-urlencode 'grant_type=urn:ietf:params:oauth:grant-type:device_code' \
  --data-urlencode 'client_id=YOUR_CLIENT_ID' \
  --data-urlencode 'device_code=DEVICE_CODE'

3. Call the API

Send the access token as Authorization: Bearer <token>. Use grant_type=refresh_token, client_id and refresh_token to renew it, and replace both saved tokens with the returned values.

Authorization: Bearer ACCESS_TOKEN
Accept: application/json

Call routes with the Python CLI

Requires Python 3 and curl. The CLI uses the registered ACDN Agent application by default; use --client-id for another registered application. It asks for approval on first use and renews expired access tokens. Arguments after -- are passed directly to curl: use --json for JSON requests, --form for uploads, --header to choose a response format, and --output to save any response to a file. Responses and curl exit codes are returned unchanged.

python3 acdn-agent.py call /api/user/domains
python3 acdn-agent.py call /api/user/domains -- --output domains.json

Access within your permissions

account — Act on your behalf within your account permissions, including purchases, payments from your balance, deletion, and administrative actions available to you.

The app can only act within your account’s permissions. This approval does not grant additional privileges.