{"id":16881938,"url":"https://github.com/thomas-kl1/php-sdk-zoho-desk","last_synced_at":"2025-03-22T07:32:15.346Z","repository":{"id":43163804,"uuid":"271791877","full_name":"thomas-kl1/php-sdk-zoho-desk","owner":"thomas-kl1","description":"PHP SDK for Zoho Desk API v1 integration.","archived":false,"fork":false,"pushed_at":"2024-04-02T19:20:39.000Z","size":82,"stargazers_count":7,"open_issues_count":3,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T09:37:43.764Z","etag":null,"topics":["integration","php","sdk","sdk-php","zoho","zoho-api","zoho-desk","zohodesk","zohodesk-api","zohodesk-api-sdk","zohodesk-sdk"],"latest_commit_sha":null,"homepage":null,"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/thomas-kl1.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://paypal.me/thomaskl1"]}},"created_at":"2020-06-12T12:23:16.000Z","updated_at":"2024-04-02T19:31:45.000Z","dependencies_parsed_at":"2024-10-28T12:33:13.183Z","dependency_job_id":"9b9a7843-7fb0-4731-9bd1-6ca7d1b180ae","html_url":"https://github.com/thomas-kl1/php-sdk-zoho-desk","commit_stats":{"total_commits":30,"total_committers":5,"mean_commits":6.0,"dds":0.3666666666666667,"last_synced_commit":"31330e0b034075f5359dd18bfe52b3c337015477"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-kl1%2Fphp-sdk-zoho-desk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-kl1%2Fphp-sdk-zoho-desk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-kl1%2Fphp-sdk-zoho-desk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-kl1%2Fphp-sdk-zoho-desk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomas-kl1","download_url":"https://codeload.github.com/thomas-kl1/php-sdk-zoho-desk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244925175,"owners_count":20532873,"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":["integration","php","sdk","sdk-php","zoho","zoho-api","zoho-desk","zohodesk","zohodesk-api","zohodesk-api-sdk","zohodesk-sdk"],"created_at":"2024-10-13T16:05:34.428Z","updated_at":"2025-03-22T07:32:14.887Z","avatar_url":"https://github.com/thomas-kl1.png","language":"PHP","funding_links":["https://paypal.me/thomaskl1"],"categories":[],"sub_categories":[],"readme":"# Zoho Desk PHP SDK\n\n[![Latest Stable Version](https://img.shields.io/packagist/v/tklein/php-sdk-zoho-desk.svg?style=flat-square)](https://packagist.org/packages/tklein/php-sdk-zoho-desk)\n[![Codacy Badge](https://img.shields.io/codacy/grade/2b8c15af44ad4dde8686532887dcac0a/master.svg?style=flat-square)](https://app.codacy.com/app/thomas-klein/php-sdk-zoho-desk)\n[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/thomas-kl1/php-sdk-zoho-desk/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/thomas-kl1/php-sdk-zoho-desk/?branch=master)\n[![Code Climate](https://img.shields.io/codeclimate/maintainability/thomas-kl1/php-sdk-zoho-desk.svg?style=flat-square)](https://codeclimate.com/github/thomas-kl1/php-sdk-zoho-desk)\n[![License: MIT](https://img.shields.io/github/license/thomas-kl1/php-sdk-zoho-desk.svg?style=flat-square)](./LICENSE)\n[![Packagist](https://img.shields.io/packagist/dt/tklein/php-sdk-zoho-desk.svg?style=flat-square)](https://packagist.org/packages/tklein/php-sdk-zoho-desk/stats)\n[![Packagist](https://img.shields.io/packagist/dm/tklein/php-sdk-zoho-desk.svg?style=flat-square)](https://packagist.org/packages/tklein/php-sdk-zoho-desk/stats)\n\nThis SDK library \n\n - [Setup](#setup)\n - [Features](#features)\n - [Settings](#settings)\n - [Documentation](#documentation)\n - [Support](#support)\n - [Authors](#authors)\n - [License](#license)\n\n## Setup\n\n```\ncomposer require tklein/php-sdk-zoho-desk\n```\n\n## Features\n\nYou can execute all CRUD actions on all entities available in Zoho Desk.\nPlease check you have the allowed scope of operation with the proper registered OAuth access token.\n\n## Settings\n\n**All the basic constants settings are available in `\\Zoho\\Desk\\Api\\Metadata`.**\n\nFirst you need to have a valid access token. First of all connect to your Zoho developer console from your region of\nsubscription:\n\nfor Europe the url is: [https://api-console.zoho.eu]\n\n- Create or use an existing \"Self Client\" application. You may need these informations:\n- Generate the grant code, with the proper scopes. ***`aaaserver.profile.READ` scope is mandatory***\n  The full list of scopes is availables at: https://desk.zoho.com/DeskAPIDocument#OauthTokens#UsingOAuthtokenAPI\n- Generate the persistence auth token file with the Zoho SDK:\n    - Client ID: you can find it in the Zoho api developer console\n    - Client Secret: you can find it in the Zoho api developer console\n    - Redirect url: this is a dummy url, it's part of the oauth standaard but not actively used\n    - Current User Email: this is the user email used to create the self client integration (https://accounts.zoho.\u003cdomain from were you registered to\u003e/oauth/user/info)\n    - Org ID: this is your organization ID in your Zoho Desk application: Setup and Configuration -\u003e DEVELOPER SPACE -\u003e API -\u003e Zoho Desk API -\u003e OrgId (Orgnization ID) field value\n\n```php\ninclude __DIR__ . /* Relative path to the vendor autoloader */ '/vendor/autoload.php';\n\nuse Zoho\\Desk\\Api\\Metadata;\nuse Zoho\\Desk\\Client\\ConfigProviderBuilder;\nuse Zoho\\OAuth\\ZohoOAuth;\n\n$configBuilder = ConfigProviderBuilder::getInstance();\n$configBuilder-\u003esetClientId(/* Client ID */)\n    -\u003esetClientSecret(/* Client Secret */)\n    -\u003esetRedirectUrl(/* Redirect Url */)\n    -\u003esetCurrentUserEmail(/* User Email */)\n    -\u003esetApiBaseUrl(/* API Endpoint by region */)\n    -\u003esetApiVersion(Metadata::API_VERSION)\n    -\u003esetOrgId(/* Org ID */)\n    -\u003esetIsSandbox(/* Sandbox Status */)\n    -\u003esetAccountsUrl(/* Accounts Url */)\n    -\u003esetTokenPersistencePath(/* Persistence Path */);\n\n// Add php code if the zcrm_oauthtokens.txt to create the file if it does not already exists.\n\nZohoOAuth::initialize($configBuilder-\u003ecreate()-\u003eget());\nZohoOAuth::getClientInstance()-\u003egenerateAccessToken($grantCode);\n```\n\nCreate the configuration object with your API details and credentials.\n\n```php\ninclude __DIR__ . /* Relative path to the vendor autoloader */ '/vendor/autoload.php';\n\nuse Zoho\\Desk\\Api\\Metadata;\nuse Zoho\\Desk\\Client\\ConfigProviderBuilder;\n\n$configBuilder = ConfigProviderBuilder::getInstance();\n$configBuilder-\u003esetClientId(/* Client ID */)\n    -\u003esetClientSecret(/* Client Secret */)\n    -\u003esetRedirectUrl(/* Redirect Url */)\n    -\u003esetCurrentUserEmail(/* User Email */)\n    -\u003esetApiBaseUrl(/* API Endpoint by region */)\n    -\u003esetApiVersion(Metadata::API_VERSION)\n    -\u003esetOrgId(/* Org ID */)\n    -\u003esetIsSandbox(/* Sandbox Status */)\n    -\u003esetAccountsUrl(/* Accounts Url */)\n    -\u003esetTokenPersistencePath(/* Persistence Path */);\n```\n\nYou can use the following pre-defined values from the `Metadata` class:\n\n```php\nfinal class Metadata\n{\n    public const API_FIELD_CURRENT_USER_EMAIL = 'currentUserEmail';\n    public const API_FIELD_BASE_URL = 'apiBaseUrl';\n    public const API_FIELD_VERSION = 'apiVersion';\n    public const API_ENDPOINT_US = 'desk.zoho.com/api';\n    public const API_ENDPOINT_AU = 'desk.zoho.com.au/api';\n    public const API_ENDPOINT_EU = 'desk.zoho.eu/api';\n    public const API_ENDPOINT_IN = 'desk.zoho.in/api';\n    public const API_ENDPOINT_CN = 'desk.zoho.com.cn/api';\n    public const API_VERSION = 'v1';\n    public const ACCESS_TYPE = 'offline';\n    public const ORG_ID = 'orgId';\n    public const API_ACCOUNTS_US = 'https://accounts.zoho.com';\n    public const API_ACCOUNTS_AU = 'https://accounts.zoho.com.au';\n    public const API_ACCOUNTS_EU = 'https://accounts.zoho.eu';\n    public const API_ACCOUNTS_IN = 'https://accounts.zoho.in';\n    public const API_ACCOUNTS_CN = 'https://accounts.zoho.com.cn';\n}\n```\n\n## Documentation\n\nThe entry point of the SDK is the gateway facade:\n\n```php\nuse Zoho\\Desk\\Gateway;\n\n$gateway = new Gateway($configBuilder-\u003ecreate());\n```\n\nThe facade is easy to use:\n\n```php\nuse Zoho\\Desk\\Exception\\CouldNotDeleteException;\nuse Zoho\\Desk\\Exception\\CouldNotReadException;\nuse Zoho\\Desk\\Exception\\CouldNotSaveException;\nuse Zoho\\Desk\\Model\\ListCriteriaBuilder;\n\n$ticketDataObject = $gateway-\u003egetDataObjectFactory()-\u003ecreate('tickets', /* Entity values */);\n\ntry {\n    $ticketDataObject = $gateway-\u003egetOperationPool()-\u003egetCreateOperation('tickets')-\u003ecreate($ticketDataObject);\n} catch (CouldNotSaveException $e) {\n    // Handle the exception...\n}\n\ntry {\n    $ticketDataObject = $gateway-\u003egetOperationPool()-\u003egetReadOperation('tickets')-\u003eget(1234);\n} catch (CouldNotReadException $e) {\n    // Handle the exception...\n}\n\ntry {\n    $criteriaBuilder = new ListCriteriaBuilder();\n    // $criteriaBuilder-\u003esetFields()-\u003esetFilters()...\n    $ticketList = $gateway-\u003egetOperationPool()-\u003egetListOperation('tickets')-\u003egetList($criteriaBuilder-\u003ecreate());\n    $ticketList = $gateway-\u003egetOperationPool()-\u003egetListOperation('tickets')-\u003egetByIds([1,2,3]);\n} catch (CouldNotReadException $e) {\n    // Handle the exception...\n}\n\ntry {\n    $ticketDataObject = $gateway-\u003egetOperationPool()-\u003egetUpdateOperation('tickets')-\u003eupdate($ticketDataObject);\n} catch (CouldNotSaveException $e) {\n    // Handle the exception...\n}\n\ntry {\n    $gateway-\u003egetOperationPool()-\u003egetDeleteOperation('tickets', ['resolution'])-\u003edelete(1234);\n} catch (CouldNotDeleteException $e) {\n    // Handle the exception...\n}\n\n```\n\n## Support\n\nRaise a new [request](https://github.com/thomas-kl1/php-sdk-zoho-desk/issues) to the issue tracker.\n\n## Authors\n\n- **Thomas Klein** - *Maintainer* - [![GitHub followers](https://img.shields.io/github/followers/thomas-kl1.svg?style=social)](https://github.com/thomas-kl1)\n- **Contributors** - *Contributor* - [![GitHub contributors](https://img.shields.io/github/contributors/thomas-kl1/php-sdk-zoho-desk.svg?style=flat-square)](https://github.com/thomas-kl1/php-sdk-zoho-desk/graphs/contributors)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) details.\n\n***That's all folks!***\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomas-kl1%2Fphp-sdk-zoho-desk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomas-kl1%2Fphp-sdk-zoho-desk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomas-kl1%2Fphp-sdk-zoho-desk/lists"}