لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/folders/access-levels.md فهرس التوثيق — /llms.txt

مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.

Folder access levels

GET /v1/folders/access-levels

Returns the folder access levels configured on the Bitrix24 account: the level ID, its system code and its name in the account language.

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/folders/access-levels" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl "https://vibecode.bitrix24.com/v1/folders/access-levels" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/folders/access-levels', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})
const body = await res.json()
if (!body.success) throw new Error(body.error.code)
for (const level of body.data) console.log(level.code, level.title)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/folders/access-levels', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})
const body = await res.json()
if (!body.success) throw new Error(body.error.code)
for (const level of body.data) console.log(level.code, level.title)

Response fields

Field Type Description
Fieldsuccess Typeboolean Descriptiontrue on success
Fielddata Typearray DescriptionAccess levels of the Bitrix24 account
Fielddata[].id Typenumber DescriptionLevel ID on the Bitrix24 account. Not needed to grant access: POST /v1/folders/:id/shares takes the level by name in the access field
Fielddata[].code Typestring DescriptionSystem code of the level: disk_access_full — full access, disk_access_edit — edit, disk_access_read — read
Fielddata[].title Typestring DescriptionLevel name in the Bitrix24 account language

Response example

JSON
{
  "success": true,
  "data": [
    {
      "id": 79,
      "code": "disk_access_full",
      "title": "Full access"
    },
    {
      "id": 75,
      "code": "disk_access_edit",
      "title": "Edit"
    },
    {
      "id": 71,
      "code": "disk_access_read",
      "title": "Read"
    }
  ]
}

Error response example

403 — the key lacks the disk scope:

JSON
{
  "success": false,
  "error": {
    "code": "SCOPE_DENIED",
    "message": "API key requires \"disk\" scope.",
    "hint": "This request needs the 'disk' scope, which the calling key does not carry. Add 'disk' to this key in the developer cabinet (or through the management API), then repeat the call.",
    "cause": "key_scope_missing",
    "requiredScope": "disk",
    "keyScopes": ["task", "im"],
    "fix": {
      "action": "edit_key_scopes",
      "via": "cabinet"
    },
    "userMessage": "The app's API key lacks the “Drive” permission. You can add it in the key settings in the developer cabinet."
  }
}

Errors

HTTP Code Description
HTTP401 CodeTOKEN_MISSING DescriptionThe key's portal has no authorization tokens
HTTP403 CodeSCOPE_DENIED DescriptionThe key lacks the disk scope
HTTP422 CodeDISK_ACCESS_LEVELS_REFUSED DescriptionBitrix24 returned the list of levels in an unexpected form
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 rejected the request; the reason is in message
HTTP429 CodeRATE_LIMITED DescriptionRequest limit exceeded — wait 1-2 seconds and retry
HTTP502 CodeBITRIX_UNAVAILABLE DescriptionBitrix24 is unavailable. The method only reads data, so the call can be retried

Full list of common API errors — Errors.

Known specifics

The add level is not in the list. The method returns three levels, while folder access can be granted at four levels: read, add, edit, full.

Match levels by code. The id value is assigned by the Bitrix24 account. The title value depends on the account language: on an English-language account it is "Full access"; on an account in another language, the name is in that language.

Read-only key. The method only reads data, so a key in read-only mode calls it without restrictions.

See also