{"id":44634,"library":"coze-workload-identity","title":"Coze Workload Identity","description":"Python SDK for Coze workload identity authentication. Version 0.1.13 is current. Enables non-interactive authentication using workload identities (e.g., service account keys) for Coze API access. Rapid release cadence.","status":"active","version":"0.1.13","language":"python","source_language":"en","source_url":"https://github.com/coze-dev/coze-workload-identity","tags":["coze","workload-identity","auth","sdk"],"install":[{"cmd":"pip install coze-workload-identity","lang":"bash","label":"Latest"}],"dependencies":[],"imports":[{"wrong":"from coze_workload_identity import WorkloadIdentity","symbol":"WorkloadIdentity","correct":"from coze_workload_identity import WorkloadIdentityError"},{"symbol":"Client","correct":"from coze_workload_identity import Client"},{"symbol":"load_skill_env","correct":"from coze_workload_identity import load_skill_env"}],"quickstart":{"code":"import os\nfrom coze_workload_identity import WorkloadIdentity, WorkloadIdentityAuth\n\n# Use environment variables for credentials\nclient_id = os.environ.get('COZE_CLIENT_ID', '')\nclient_secret = os.environ.get('COZE_CLIENT_SECRET', '')\n\n# Create identity\nidentity = WorkloadIdentity(client_id=client_id, client_secret=client_secret)\n\n# Authenticate\nauth = WorkloadIdentityAuth(identity)\ntoken = auth.get_token()\nprint(f'Access token: {token}')","lang":"python","description":"Simple authentication using environment variables."},"warnings":[{"fix":"Pin exact version and test upgrades.","message":"Version 0.1.x is pre-1.0. API may change without notice. Use with caution for production.","severity":"breaking","affected_versions":"all < 1.0.0"},{"fix":"Always set credentials via arguments or ensure env vars are present.","message":"Environment variables COZE_CLIENT_ID and COZE_CLIENT_SECRET are not always documented. They must be set explicitly or passed as arguments.","severity":"gotcha","affected_versions":"all"},{"fix":"Treat token as opaque string; don't parse its contents.","message":"The get_token() method may return different token types depending on the identity provider. Relying on token format can cause issues.","severity":"gotcha","affected_versions":"all"},{"fix":"Use pattern: auth = WorkloadIdentityAuth(identity); token = auth.get_token()","message":"Some older examples use 'WorkloadIdentityAuth' incorrectly. Always call get_token() after construction.","severity":"deprecated","affected_versions":"0.1.0 - 0.1.10"}],"env_vars":null,"search_vec":"'0.1.13':12 'access':30 'account':25 'api':29 'auth':38 'authent':10,19 'cadenc':33 'coze':1,7,28,34 'current':14 'e.g':23 'enabl':15 'ident':3,9,22,37 'interact':18 'key':26 'non':17 'non-interact':16 'python':4 'rapid':31 'releas':32 'sdk':5,39 'servic':24 'use':20 'version':11 'workload':2,8,21,36 'workload-ident':35","created_at":"2026-06-07T12:51:05.988461+00:00","updated_at":"2026-06-07T12:51:05.988461+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}