{"id":21744054,"url":"https://github.com/telefonica/latch-sdk-php","last_synced_at":"2025-04-13T05:07:49.533Z","repository":{"id":12430672,"uuid":"15086683","full_name":"Telefonica/latch-sdk-php","owner":"Telefonica","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-24T08:22:49.000Z","size":95,"stargazers_count":17,"open_issues_count":1,"forks_count":14,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-13T05:07:44.832Z","etag":null,"topics":["dir-cto","org-cdo","public","srv-latch","srv-livingapps"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Telefonica.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2013-12-10T19:13:04.000Z","updated_at":"2025-01-24T12:35:05.000Z","dependencies_parsed_at":"2024-07-18T10:52:49.885Z","dependency_job_id":"fc4fd4be-ea4b-4a6a-bf3e-497b4c0b0da0","html_url":"https://github.com/Telefonica/latch-sdk-php","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Telefonica%2Flatch-sdk-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Telefonica%2Flatch-sdk-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Telefonica%2Flatch-sdk-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Telefonica%2Flatch-sdk-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Telefonica","download_url":"https://codeload.github.com/Telefonica/latch-sdk-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665747,"owners_count":21142123,"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":["dir-cto","org-cdo","public","srv-latch","srv-livingapps"],"created_at":"2024-11-26T07:09:51.825Z","updated_at":"2025-04-13T05:07:49.505Z","avatar_url":"https://github.com/Telefonica.png","language":"PHP","readme":"### LATCH PHP SDK ###\n\n\n#### PREREQUISITES ####\n\n* PHP 8.2 or above.\n\n* Read API documentation (https://latch.tu.com/www/developers/doc_api).\n\n* To get the \"Application ID\" and \"Secret\", (fundamental values for integrating Latch in any application), it’s necessary to register a developer account in Latch's website: https://latch.tu.com. On the upper right side, click on \"Login\".\n\n\n#### USING THE SDK IN PHP ####\n\n* Require \"latch\" sdk. Keep in mind to set the path properly according to your server.\n```\n\trequire_once(\"latch/Latch.php\");\n     require_once(\"latch/LatchResponse.php\");\n     require_once(\"latch/Error.php\");\n```\n\n* Create a Latch object with the \"Application ID\" and \"Secret\" previously obtained.\n```\n\t$api = new Latch(APP_ID, APP_SECRET);\n```\n\n* Optional settings:\n```\n\t$api-\u003esetProxy(YOUR_PROXY);\n```\n\n* Call to Latch Server. Pairing will return an account id that you should store for future api calls\n```\n     $pairResponse = $api-\u003epair(\"PAIRING_CODE_HERE\");\n     $statusResponse = $api-\u003estatus(ACCOUNT_ID_HERE);\n     $unpairResponse = $api-\u003eunpair(ACCOUNT_ID_HERE);\n```\n\n* After every API call, get Latch response data and errors and handle them.\n```\n     $pairResponse-\u003egetData();\n     $pairResponse-\u003egetError();\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelefonica%2Flatch-sdk-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftelefonica%2Flatch-sdk-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelefonica%2Flatch-sdk-php/lists"}