Crowdin API Client
raw JSON → 1.26.0 verified Fri May 01 auth: no python
Python client library for the Crowdin API v2. Currently at version 1.26.0, it provides a convenient interface for managing translations, files, projects, and reports. Released under MIT license, with regular updates.
pip install crowdin-api-client Common errors
error crowdin_api.exceptions.CrowdinApiError: 401 Client Error: Unauthorized for url ↓
cause Missing or invalid token, or missing organization domain for org tokens.
fix
Ensure CROWDIN_TOKEN is set, and if using organization, set CROWDIN_ORGANIZATION and pass it to CrowdinClient.
error crowdin_api.exceptions.CrowdinApiError: 404 Not Found ↓
cause Wrong project ID or file ID, or insufficient permissions.
fix
Check that the project ID exists and your token has access to it.
error TypeError: __init__() missing 1 required positional argument: 'token' ↓
cause CrowdinClient requires 'token' as a parameter.
fix
Provide a token: client = CrowdinClient(token='your_token')
Warnings
gotcha Using an organization token? You must pass 'organization' to CrowdinClient. Without it, you'll get 401 errors if your account belongs to an organization. ↓
fix Pass organization='your-domain' (without .api.crowdin.com) when creating the client.
gotcha Many API responses are paginated. Forgetting to handle pagination leads to incomplete data. ↓
fix Use the .all() method on list endpoints, e.g., client.projects.list_projects().all()
breaking In v1.14.0, the 'change' and 'update' methods for storage were removed. Use 'add_storage' and 'update_or_restore_storage'. ↓
fix Replace storage.change() and storage.update() with storage.add_storage() and storage.update_or_restore_storage().
deprecated The deprecated 'User-Agent' header style was changed. If you relied on the old format, you may need to update custom middleware. ↓
fix Use the default User-Agent or override via CrowdinClient(user_agent='...').
Imports
- crowdin_api
import crowdin_api - CrowdinClient wrong
from crowdin.client import CrowdinClientcorrectfrom crowdin_api import CrowdinClient
Quickstart
import os
from crowdin_api import CrowdinClient
client = CrowdinClient(
token=os.environ.get('CROWDIN_TOKEN', ''),
organization=os.environ.get('CROWDIN_ORGANIZATION', '')
)
print(client.projects.list_projects())