{"id":30958707,"url":"https://github.com/zitadel/zitadel-node","last_synced_at":"2026-03-02T10:06:17.561Z","repository":{"id":311583711,"uuid":"991909802","full_name":"zitadel/zitadel-node","owner":"zitadel","description":"Official Zitadel SDK for Node. Authenticate and access Zitadel's authentication and management APIs in Node.","archived":false,"fork":false,"pushed_at":"2026-02-20T01:00:22.000Z","size":2128,"stargazers_count":8,"open_issues_count":12,"forks_count":2,"subscribers_count":0,"default_branch":"beta","last_synced_at":"2026-02-20T04:34:07.925Z","etag":null,"topics":["client-lib","iam","sdk","sdk-javascript","sdk-node","sdk-nodejs","sdk-typescript","zitadel","zitadel-sdk"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/search?q=%40zitadel","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zitadel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-28T10:30:37.000Z","updated_at":"2026-02-20T00:58:06.000Z","dependencies_parsed_at":"2025-08-25T11:41:05.721Z","dependency_job_id":"d3da55a4-da5a-4426-bcc1-1fa1cb87e966","html_url":"https://github.com/zitadel/zitadel-node","commit_stats":null,"previous_names":["zitadel/zitadel-node"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/zitadel/zitadel-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fzitadel-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fzitadel-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fzitadel-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fzitadel-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zitadel","download_url":"https://codeload.github.com/zitadel/zitadel-node/tar.gz/refs/heads/beta","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fzitadel-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29998169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T09:59:02.300Z","status":"ssl_error","status_checked_at":"2026-03-02T09:59:02.001Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client-lib","iam","sdk","sdk-javascript","sdk-node","sdk-nodejs","sdk-typescript","zitadel","zitadel-sdk"],"created_at":"2025-09-11T15:08:55.468Z","updated_at":"2026-03-02T10:06:17.552Z","avatar_url":"https://github.com/zitadel.png","language":"TypeScript","readme":"# Node.js SDK for Zitadel\n\nThis is the Zitadel Node.js SDK, designed to provide a convenient and idiomatic\nway to interact with the Zitadel APIs in Node.js. The SDK provides a seamless\nwrapping of the Zitadel API, making it easy to authenticate service users and\nperform API operations.\n\nThe SDK enables efficient integration with the Zitadel API, allowing you to\nmanage resources and execute actions. However, it's important to note that\nthis SDK is tailored for service users and is not intended for user\nauthentication scenarios. It does not support authentication mechanisms\nlike OAuth2, OIDC, or SAML for client applications, including web, mobile,\nor other environments. For these types of user authentication, you should\nuse other libraries that are designed for the specific platform and\nauthentication method.\n\n**Disclaimer**: This SDK is not suitable for implementing user authentication.\nIt does not handle authentication for client applications using OAuth2, OIDC,\nor SAML and should not be used for scenarios requiring such functionality.\nFor those use cases, consider using other solutions that are designed for\nuser authentication across various platforms like web, mobile, or other\nclient environments.\n\n\u003e [!IMPORTANT]\n\u003e Please be aware that this SDK is currently in an incubating stage. We are releasing it to the community to gather\n\u003e feedback and learn how it is being used. While you are welcome to use it, please note that the API and functionality may\n\u003e evolve based on community input. We encourage you to try it out and share your experiences, but advise caution when\n\u003e considering it for production environments as future updates may introduce changes.\n\n## Getting Started\n\n### Sign up for Zitadel\n\nTo use this SDK, you need a Zitadel account. Sign up at the official\nZitadel website and obtain the necessary credentials to access the API.\n\n### Minimum Requirements\n\nEnsure you have Node.js 20 or higher installed. You also need npm to\ninstall dependencies.\n\n## Using the SDK\n\n### Installation\n\nInstall the SDK by running one of the following commands:\n\n```bash\nnpm install @zitadel/sdk\n```\n\n## Authentication Methods\n\nYour SDK offers three ways to authenticate with Zitadel. Each method has its\nown benefits—choose the one that fits your situation best.\n\n#### 1. Private Key JWT Authentication\n\n**What is it?**\nYou use a JSON Web Token (JWT) that you sign with a private key stored in a\nJSON file. This process creates a secure token.\n\n**When should you use it?**\n\n- **Best for production:** It offers strong security.\n- **Advanced control:** You can adjust token settings like expiration.\n\n**How do you use it?**\n\n1. Save your private key in a JSON file.\n2. Use the provided method to load this key and create a JWT-based\n   authenticator.\n\n**Example:**\n\n```ts\nimport Zitadel, { ApiException } from '@zitadel/sdk';\n\nconst zitadel = await Zitadel.withPrivateKey(\n  'https://example.us1.zitadel.cloud',\n  'path/to/jwt-key.json',\n);\n\ntry {\n  const response = await zitadel.users.addHumanUser({\n    userServiceAddHumanUserRequest: {\n      username: 'john.doe',\n      profile: {\n        givenName: 'John',\n        familyName: 'Doe',\n      },\n      email: {\n        email: 'john@doe.com',\n      },\n    },\n  });\n  console.log('User created: ' + JSON.stringify(response, null, 2));\n} catch (e) {\n  if (e instanceof ApiException) {\n    console.log('Error: ' + e.message);\n  }\n}\n```\n\n#### 2. Client Credentials Grant\n\n**What is it?**\nThis method uses a client ID and client secret to get a secure access token,\nwhich is then used to authenticate.\n\n**When should you use it?**\n\n- **Simple and straightforward:** Good for server-to-server communication.\n- **Trusted environments:** Use it when both servers are owned or trusted.\n\n**How do you use it?**\n\n1. Provide your client ID and client secret.\n2. Build the authenticator\n\n**Example:**\n\n```ts\nimport Zitadel, { ApiException } from '@zitadel/sdk';\n\nconst zitadel = await Zitadel.withClientCredentials(\n  'https://example.us1.zitadel.cloud',\n  'id',\n  'secret',\n);\n\ntry {\n  const response = await zitadel.users.addHumanUser({\n    userServiceAddHumanUserRequest: {\n      username: 'john.doe',\n      profile: {\n        givenName: 'John',\n        familyName: 'Doe',\n      },\n      email: {\n        email: 'john@doe.com',\n      },\n    },\n  });\n  console.log('User created: ' + JSON.stringify(response, null, 2));\n} catch (e) {\n  if (e instanceof ApiException) {\n    console.log('Error: ' + e.message);\n  }\n}\n```\n\n#### 3. Personal Access Tokens (PATs)\n\n**What is it?**\nA Personal Access Token (PAT) is a pre-generated token that you can use to\nauthenticate without exchanging credentials every time.\n\n**When should you use it?**\n\n- **Easy to use:** Great for development or testing scenarios.\n- **Quick setup:** No need for dynamic token generation.\n\n**How do you use it?**\n\n1. Obtain a valid personal access token from your account.\n2. Create the authenticator with: `PersonalAccessTokenAuthenticator`\n\n**Example:**\n\n```ts\nimport Zitadel, { ApiException } from '@zitadel/sdk';\n\nconst zitadel = Zitadel.withAccessToken(\n  'https://example.us1.zitadel.cloud',\n  'token',\n);\n\ntry {\n  const response = await zitadel.users.addHumanUser({\n    userServiceAddHumanUserRequest: {\n      username: 'john.doe',\n      profile: {\n        givenName: 'John',\n        familyName: 'Doe',\n      },\n      email: {\n        email: 'john@doe.com',\n      },\n    },\n  });\n  console.log('User created: ' + JSON.stringify(response, null, 2));\n} catch (e) {\n  if (e instanceof ApiException) {\n    console.log('Error: ' + e.message);\n  }\n}\n```\n\n---\n\nChoose the authentication method that best suits your needs based on your\nenvironment and security requirements. For more details, please refer to the\n[Zitadel documentation on authenticating service users](https://zitadel.com/docs/guides/integrate/service-users/authenticate-service-users).\n\n## Design and Dependencies\n\nThis SDK is designed to be lean and efficient, focusing on providing a\nstreamlined way to interact with the Zitadel API. It relies on standard\nHTTP libraries for making requests, which ensures that\nthe SDK integrates well with other libraries and provides flexibility\nin terms of request handling and error management.\n\n## Versioning\n\nA key aspect of our strategy is that the SDK's major version is synchronized with the ZITADEL core project's major\nversion to ensure compatibility. For a detailed explanation of this policy and our release schedule, please see\nour [Versioning Guide](VERSIONING.md).\n\n## Contributing\n\nThis repository is autogenerated. We do not accept direct contributions.\nInstead, please open an issue for any bugs or feature requests.\n\n## Reporting Issues\n\nIf you encounter any issues or have suggestions for improvements, please\nopen an issue in the [issue tracker](https://github.com/zitadel/client-nodejs/issues).\nWhen reporting an issue, please provide the following information to help\nus address it more effectively:\n\n- A detailed description of the problem or feature request\n- Steps to reproduce the issue (if applicable)\n- Any relevant error messages or logs\n- Environment details (e.g., OS version, relevant configurations)\n\n## Support\n\nIf you need help setting up or configuring the SDK (or anything\nZitadel), please head over to the [Zitadel Community on Discord](https://zitadel.com/chat).\n\nThere are many helpful people in our Discord community who are ready to\nassist you.\n\nCloud and enterprise customers can additionally reach us privately via our\n[support communication channels](https://zitadel.com/docs/legal/service-description/support-services).\n\n## License\n\nThis SDK is distributed under the Apache 2.0 License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzitadel%2Fzitadel-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzitadel%2Fzitadel-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzitadel%2Fzitadel-node/lists"}