From 05bb5d972d5359f7d324dc06e67990cb4048d80e Mon Sep 17 00:00:00 2001 From: Mykhailo Rohalskyy Date: Thu, 30 Jul 2026 20:11:09 +0300 Subject: [PATCH] docs(developer): document new AP.getContext fields - Add user_login, project_identifier, organization_domain, and user_id to the Get Context response reference - Update the example payload and note that unavailable values are omitted rather than set to null --- .../docs/developer/crowdin-apps/apps-js.mdx | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/src/content/docs/developer/crowdin-apps/apps-js.mdx b/src/content/docs/developer/crowdin-apps/apps-js.mdx index 75f98d6d..0f652900 100644 --- a/src/content/docs/developer/crowdin-apps/apps-js.mdx +++ b/src/content/docs/developer/crowdin-apps/apps-js.mdx @@ -36,7 +36,8 @@ These methods allow your app to get essential information about its environment, Retrieves a `ContextDataObject` containing key information about the environment where the app is currently running (e.g., project ID, user, and file data). **Example:** @@ -69,10 +70,14 @@ AP.getContext(function(contextData) { ##### Response Payload Example -```json collapse={12-21,25-59,62-64} +```json collapse={16-25,29-63,66-68} { + "user_id": 15, + "user_login": "john.smith", "project_id": 123, + "project_identifier": "docs-portal", "organization_id": 100001, + "organization_domain": "acme", "editor": { "mode": "translate", "theme": "dark", @@ -144,6 +149,20 @@ AP.getContext(function(contextData) { + + + + + + + + + + + + + + + +
user_id +

Type: integer

+

Description: The unique numeric ID of the user the app is currently displayed to. Present only for authenticated users.

+
user_login +

Type: string

+

Description: The username of the user the app is currently displayed to. Present only for authenticated users.

+
project_id @@ -151,6 +170,13 @@ AP.getContext(function(contextData) {

Description: The unique numeric ID of the current project.

project_identifier +

Type: string

+

Description: The identifier of the project the module is opened in. Present when the module runs in a project context and the identifier is available.

+
organization_id @@ -158,6 +184,13 @@ AP.getContext(function(contextData) {

Description: The unique numeric ID of the organization (Crowdin Enterprise only).

organization_domain +

Type: string

+

Description: The domain of the organization the app is installed in (Crowdin Enterprise only).

+
editor