Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
docs: add credential masking section to connected accounts page
Sushmithamallesha098b1fee54a
diff --git a/docs/content/docs/auth-configuration/connected-accounts.mdx b/docs/content/docs/auth-configuration/connected-accounts.mdxindex 23c456c09..f4561a80a 100644--- a/docs/content/docs/auth-configuration/connected-accounts.mdx+++ b/docs/content/docs/auth-configuration/connected-accounts.mdx@@ -110,12 +110,6 @@ if (account.state) {</Tab></Tabs>-<Callout type="warn">-If credentials return as `REDACTED` instead of actual values, the **Mask Connected Account Secrets** setting is enabled on your account. This setting redacts all sensitive credential data (tokens, secrets, API keys) for security purposes.--To view actual credentials, navigate to **Settings → Project Settings → Project Configuration** and disable "Mask Connected Account Secrets".-</Callout>-## Refresh credentialsManually refresh credentials for a connected account:@@ -220,6 +214,42 @@ console.log('Account deleted successfully');Deletion is permanent. Users must re-authenticate to reconnect.</Callout>+## Credential masking++By default, sensitive fields in connected account responses are partially masked for security. This affects fields like `access_token`, `refresh_token`, `api_key`, `bearer_token`, `password`, and other secrets.++Instead of returning full values, the API returns the first 4 characters followed by `...`:++```json+{+ "access_token": "gho_...",+ "refresh_token": "ghr_...",+ "api_key": "sk-l..."+}+```++Values shorter than 4 characters are replaced with `REDACTED`.++This applies to the [Get Connected Account](/rest-api/connected-accounts/get-connected-accounts-by-nanoid) and [List Connected Accounts](/rest-api/connected-accounts/get-connected-accounts) endpoints.++### Disabling masking++If you need full credential values (e.g., to use tokens in your own API calls), disable masking via either:++1. **Dashboard**: Go to **Settings → Project Settings → Project Configuration** and turn off "Mask Connected Account Secrets"+2. **API**: Use the [Patch Project Config](/rest-api/projects/patch-org-project-config) endpoint:++```bash+curl -X PATCH https://backend.composio.dev/api/v3/org/project/config \+ -H "x-api-key: YOUR_API_KEY" \+ -H "Content-Type: application/json" \+ -d '{"mask_secret_keys_in_connected_account": false}'+```++<Callout type="warn">+Disabling masking exposes full credentials in API responses. Only disable this if your application needs direct access to tokens and you have appropriate security measures in place.+</Callout>+## Multiple accountsUsers can connect multiple accounts for the same toolkit (e.g., personal and work Gmail).