{"id":28891686,"url":"https://github.com/zitadel/client-php","last_synced_at":"2026-03-02T10:06:04.471Z","repository":{"id":290700119,"uuid":"955845863","full_name":"zitadel/client-php","owner":"zitadel","description":"Official Zitadel SDK for PHP. Authenticate and access Zitadel's authentication and management APIs in PHP.","archived":false,"fork":false,"pushed_at":"2026-03-02T08:22:30.000Z","size":2727,"stargazers_count":5,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"beta","last_synced_at":"2026-03-02T09:20:12.575Z","etag":null,"topics":["client-lib","client-library","iam","sdk","sdk-php","zitadel","zitadel-sdk"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/zitadel/client","language":"PHP","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-03-27T09:40:23.000Z","updated_at":"2026-03-02T08:21:10.000Z","dependencies_parsed_at":"2026-01-28T13:02:58.648Z","dependency_job_id":null,"html_url":"https://github.com/zitadel/client-php","commit_stats":null,"previous_names":["zitadel/client-php"],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/zitadel/client-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fclient-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fclient-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fclient-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fclient-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zitadel","download_url":"https://codeload.github.com/zitadel/client-php/tar.gz/refs/heads/beta","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitadel%2Fclient-php/sbom","scorecard":{"id":1237753,"data":{"date":"2025-07-06T05:18:59Z","repo":{"name":"github.com/zitadel/client-php","commit":"8ae5383791e8b9658b7d10efb46890f17e495f86"},"scorecard":{"version":"v5.1.1","commit":"cd152cb6742c5b8f2f3d2b5193b41d9c50905198"},"score":7,"checks":[{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#dependency-update-tool"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#code-review"}},{"name":"Security-Policy","score":9,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#security-policy"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/commitlint.yml:16","Info: jobLevel 'pull-requests' permission set to 'read': .github/workflows/commitlint.yml:17","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/linting.yml:24","Info: jobLevel 'contents' permission set to 'read': .github/workflows/scorecard.yml:16","Info: topLevel 'contents' permission set to 'read': .github/workflows/autofix.yml:16","Info: topLevel 'contents' permission set to 'read': .github/workflows/commitlint.yml:11","Info: topLevel 'contents' permission set to 'read': .github/workflows/depcheck.yml:7","Info: topLevel 'contents' permission set to 'read': .github/workflows/docker.yml:14","Info: topLevel 'contents' permission set to 'read': .github/workflows/integration.yml:14","Info: topLevel 'contents' permission set to 'read': .github/workflows/linting.yml:19","Warn: topLevel 'contents' permission set to 'write': .github/workflows/pipeline.yml:10","Info: topLevel 'actions' permission set to 'read': .github/workflows/pipeline.yml:11","Warn: topLevel 'checks' permission set to 'write': .github/workflows/pipeline.yml:12","Warn: no topLevel permission defined: .github/workflows/qodana.yml:1","Info: topLevel 'checks' permission set to 'read': .github/workflows/release.yml:12","Warn: topLevel 'contents' permission set to 'write': .github/workflows/release.yml:9","Warn: topLevel 'packages' permission set to 'write': .github/workflows/release.yml:10","Info: topLevel 'contents' permission set to 'read': .github/workflows/scorecard.yml:9","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/typecheck.yml:15"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":9,"reason":"dependency not pinned by hash detected -- score normalized to 9","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/commitlint.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/zitadel/client-php/commitlint.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/zitadel/client-php/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/zitadel/client-php/test.yml/main?enable=pin","Info:  18 out of  18 GitHub-owned GitHubAction dependencies pinned","Info:  24 out of  27 third-party GitHubAction dependencies pinned","Info:   1 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#cii-best-practices"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#packaging"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#signed-releases"}},{"name":"SAST","score":10,"reason":"SAST tool detected","details":["Info: SAST configuration detected: Qodana","Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#sast"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#branch-protection"}},{"name":"Contributors","score":3,"reason":"project has 1 contributing companies or organizations -- score normalized to 3","details":["Info: found contributions from: semantic-release"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#contributors"}},{"name":"CI-Tests","score":10,"reason":"6 out of 6 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#ci-tests"}}]},"last_synced_at":"2025-09-16T08:29:27.099Z","repository_id":290700119,"created_at":"2025-09-16T08:29:27.099Z","updated_at":"2025-09-16T08:29:27.099Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29998153,"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","client-library","iam","sdk","sdk-php","zitadel","zitadel-sdk"],"created_at":"2025-06-21T01:05:19.587Z","updated_at":"2026-03-02T10:06:04.462Z","avatar_url":"https://github.com/zitadel.png","language":"PHP","readme":"# PHP SDK for Zitadel\n\nThis is the Zitadel PHP SDK, designed to provide a convenient and idiomatic\nway to interact with the Zitadel APIs in PHP. 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 PHP 8.0 or higher installed. You also need Composer 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\ncomposer require zitadel/client\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```php\nuse \\Zitadel\\Client\\Zitadel;\n\n$zitadel = Zitadel::withPrivateKey(\"https://example.us1.zitadel.cloud\", \"path/to/jwt-key.json\");\n\ntry {\n    $response = $zitadel-\u003eusers-\u003eaddHumanUser((new UserServiceAddHumanUserRequest())\n        -\u003esetUsername('john.doe')\n        -\u003esetProfile(\n            (new UserServiceSetHumanProfile())\n                -\u003esetGivenName('John')\n                -\u003esetFamilyName('Doe')\n        )\n        -\u003esetEmail(\n            (new UserServiceSetHumanEmail())\n                -\u003esetEmail('john@doe.com')\n        ));\n    echo \"User created: \" . print_r($response, true);\n} catch (ApiException $e) {\n    echo \"Error: \" . $e-\u003egetMessage();\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```php\nuse Zitadel\\Client\\Zitadel;\nuse Zitadel\\Client\\Model\\UserServiceAddHumanUserRequest;\nuse \\Zitadel\\Client\\Model\\UserServiceAddHumanUserRequest;\nuse \\Zitadel\\Client\\Model\\UserServiceSetHumanProfile;\nuse \\Zitadel\\Client\\Model\\UserServiceSetHumanEmail;\n\n$zitadel = Zitadel::withClientCredentials(\"https://example.us1.zitadel.cloud\", \"id\", \"secret\");\n\ntry {\n    $response = $zitadel-\u003eusers-\u003eaddHumanUser((new UserServiceAddHumanUserRequest())\n        -\u003esetUsername('john.doe')\n        -\u003esetProfile(\n            (new UserServiceSetHumanProfile())\n                -\u003esetGivenName('John')\n                -\u003esetFamilyName('Doe')\n        )\n        -\u003esetEmail(\n            (new UserServiceSetHumanEmail())\n                -\u003esetEmail('john@doe.com')\n        ));\n    echo \"User created: \" . print_r($response, true);\n} catch (ApiException $e) {\n    echo \"Error: \" . $e-\u003egetMessage();\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```php\nuse \\Zitadel\\Client\\Zitadel;\nuse Zitadel\\Client\\Zitadel;\nuse Zitadel\\Client\\Model\\UserServiceAddHumanUserRequest;\nuse \\Zitadel\\Client\\Model\\UserServiceAddHumanUserRequest;\nuse \\Zitadel\\Client\\Model\\UserServiceSetHumanProfile;\nuse \\Zitadel\\Client\\Model\\UserServiceSetHumanEmail;\n\n$zitadel = Zitadel::withAccessToken(\"https://example.us1.zitadel.cloud\", \"token\");\n\ntry {\n    $response = $zitadel-\u003eusers-\u003eaddHumanUser(\n        (new UserServiceAddHumanUserRequest())\n            -\u003esetUsername('john.doe')\n            -\u003esetProfile(\n                (new UserServiceSetHumanProfile())\n                    -\u003esetGivenName('John')\n                    -\u003esetFamilyName('Doe')\n            )\n            -\u003esetEmail(\n                (new UserServiceSetHumanEmail())\n                    -\u003esetEmail('john@doe.com')\n            )\n    );\n    echo \"User created: \" . print_r($response, true);\n} catch (ApiException $e) {\n    echo \"Error: \" . $e-\u003egetMessage();\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 Guzzle's\nPSR-7 compliant HTTP transport 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-php/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%2Fclient-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzitadel%2Fclient-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzitadel%2Fclient-php/lists"}