{"id":18821153,"url":"https://github.com/compwright/oauth2-servicetitan","last_synced_at":"2026-02-25T05:32:31.703Z","repository":{"id":57673667,"uuid":"482073911","full_name":"compwright/oauth2-servicetitan","owner":"compwright","description":"ServiceTitan OAuth 2.0 Client Provider for The PHP League OAuth2-Client","archived":false,"fork":false,"pushed_at":"2024-12-03T18:52:52.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-03T19:36:38.094Z","etag":null,"topics":["oauth2-client","servicetitan"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/compwright.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"compwright"}},"created_at":"2022-04-15T20:14:52.000Z","updated_at":"2024-12-03T18:52:57.000Z","dependencies_parsed_at":"2022-08-31T11:50:39.014Z","dependency_job_id":null,"html_url":"https://github.com/compwright/oauth2-servicetitan","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Foauth2-servicetitan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Foauth2-servicetitan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Foauth2-servicetitan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Foauth2-servicetitan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compwright","download_url":"https://codeload.github.com/compwright/oauth2-servicetitan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231810500,"owners_count":18430000,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["oauth2-client","servicetitan"],"created_at":"2024-11-08T00:34:40.841Z","updated_at":"2025-10-25T23:10:15.444Z","avatar_url":"https://github.com/compwright.png","language":"PHP","funding_links":["https://github.com/sponsors/compwright"],"categories":[],"sub_categories":[],"readme":"# ServiceTitan Provider for OAuth 2.0 Client\n\n[![Latest Version](https://img.shields.io/github/release/compwright/oauth2-servicetitan.svg?style=flat-square)](https://github.com/compwright/oauth2-servicetitan/releases)\n[![Total Downloads](https://img.shields.io/packagist/dt/compwright/oauth2-servicetitan.svg?style=flat-square)](https://packagist.org/packages/compwright/oauth2-servicetitan)\n\nThis package provides ServiceTitan OAuth 2.0 support for the PHP League's [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client).\n\n## Installation\n\nTo install, use composer:\n\n```\ncomposer require compwright/oauth2-servicetitan league/oauth2-client\n```\n\n## Usage\n\nCreate the provider instance using the `\\Compwright\\OAuth2\\Servicetitan\\ServicetitanProviderFactory` factory class.\n\n### Example: Authorization Code Flow\n\n```php\n$factory = new Compwright\\OAuth2\\Servicetitan\\ServicetitanProviderFactory();\n$provider = $factory-\u003enew(\n    clientId: null,     // optional, recommended to pass as an option to getAccessToken()\n    clientSecret: null, // optional, recommended to pass as an option to getAccessToken()\n    sandbox: false,     // enable for sandbox environment\n    enterprise: false   // enable for Enterprise Hub clients\n);\n\n// Get an access token using the authorization code grant\n$token = $provider-\u003egetAccessToken('client_credentials', [\n    'client_id'     =\u003e '{servicetitan-client-id}',\n    'client_secret' =\u003e '{servicetitan-client-secret}',\n\n    // required for Enterprise Hub clients:\n    'tenant'        =\u003e '{servicetitan-tenant-id}',\n]);\n\n// Use the token to interact with an API on the users behalf\necho $token-\u003egetToken();\n```\n\n## Testing\n\n``` bash\n$ make test\n```\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/compwright/oauth2-servicetitan/blob/master/CONTRIBUTING.md) for details.\n\n\n## Credits\n\n- [Jonathon Hill](https://github.com/compwright), [CompWright Enterprises, LLC](https://compwright.com)\n\n\n## License\n\nThe MIT License (MIT). Please see [License File](https://github.com/compwright/oauth2-servicetitan/blob/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompwright%2Foauth2-servicetitan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompwright%2Foauth2-servicetitan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompwright%2Foauth2-servicetitan/lists"}