{"id":48236004,"url":"https://github.com/beeper/desktop-api-php","last_synced_at":"2026-04-16T00:33:28.540Z","repository":{"id":339610229,"uuid":"1162666761","full_name":"beeper/desktop-api-php","owner":"beeper","description":"PHP SDK for Beeper Desktop API","archived":false,"fork":false,"pushed_at":"2026-04-01T02:22:34.000Z","size":224,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-01T04:53:01.228Z","etag":null,"topics":[],"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/beeper.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":"2026-02-20T14:47:51.000Z","updated_at":"2026-02-20T14:48:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/beeper/desktop-api-php","commit_stats":null,"previous_names":["beeper/desktop-api-php"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beeper/desktop-api-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeper%2Fdesktop-api-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeper%2Fdesktop-api-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeper%2Fdesktop-api-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeper%2Fdesktop-api-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beeper","download_url":"https://codeload.github.com/beeper/desktop-api-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeper%2Fdesktop-api-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31866347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"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":[],"created_at":"2026-04-04T20:00:26.649Z","updated_at":"2026-04-16T00:33:28.523Z","avatar_url":"https://github.com/beeper.png","language":"PHP","funding_links":[],"categories":["📦 Official SDKs"],"sub_categories":[],"readme":"# Beeper Desktop PHP API library\n\nThe Beeper Desktop PHP library provides convenient access to the Beeper Desktop REST API from any PHP 8.1.0+ application.\n\n## Documentation\n\nThe REST API documentation can be found on [developers.beeper.com](https://developers.beeper.com/desktop-api/).\n\n## Installation\n\nTo use this package, install via Composer by adding the following to your application's `composer.json`:\n\n\u003c!-- x-release-please-start-version --\u003e\n\n```json\n{\n  \"repositories\": [\n    {\n      \"type\": \"vcs\",\n      \"url\": \"git@github.com:beeper/desktop-api-php.git\"\n    }\n  ],\n  \"require\": {\n    \"beeper/desktop-api-php\": \"dev-main\"\n  }\n}\n```\n\n\u003c!-- x-release-please-end --\u003e\n\n## Usage\n\nThis library uses named parameters to specify optional arguments.\nParameters with a default value must be set by name.\n\n```php\n\u003c?php\n\nuse BeeperDesktop\\Client;\n\n$client = new Client(\n  accessToken: getenv('BEEPER_ACCESS_TOKEN') ?: 'My Access Token'\n);\n\n$page = $client-\u003echats-\u003esearch(includeMuted: true, limit: 3, type: 'single');\n\nvar_dump($page-\u003eid);\n```\n\n### Value Objects\n\nIt is recommended to use the static `with` constructor `Dog::with(name: \"Joey\")`\nand named parameters to initialize value objects.\n\nHowever, builders are also provided `(new Dog)-\u003ewithName(\"Joey\")`.\n\n### Pagination\n\nList methods in the Beeper Desktop API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```php\n\u003c?php\n\nuse BeeperDesktop\\Client;\n\n$client = new Client(\n  accessToken: getenv('BEEPER_ACCESS_TOKEN') ?: 'My Access Token'\n);\n\n$page = $client-\u003emessages-\u003esearch(\n  accountIDs: ['local-telegram_ba_QFrb5lrLPhO3OT5MFBeTWv0x4BI'],\n  limit: 10,\n  query: 'deployment',\n);\n\nvar_dump($page);\n\n// fetch items from the current page\nforeach ($page-\u003egetItems() as $item) {\n  var_dump($item-\u003eid);\n}\n// make additional network requests to fetch items from all pages, including and after the current page\nforeach ($page-\u003epagingEachItem() as $item) {\n  var_dump($item-\u003eid);\n}\n```\n\n### Handling errors\n\nWhen the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `BeeperDesktop\\Core\\Exceptions\\APIException` will be thrown:\n\n```php\n\u003c?php\n\nuse BeeperDesktop\\Core\\Exceptions\\APIConnectionException;\nuse BeeperDesktop\\Core\\Exceptions\\RateLimitException;\nuse BeeperDesktop\\Core\\Exceptions\\APIStatusException;\n\ntry {\n  $accounts = $client-\u003eaccounts-\u003elist();\n} catch (APIConnectionException $e) {\n  echo \"The server could not be reached\", PHP_EOL;\n  var_dump($e-\u003egetPrevious());\n} catch (RateLimitException $e) {\n  echo \"A 429 status code was received; we should back off a bit.\", PHP_EOL;\n} catch (APIStatusException $e) {\n  echo \"Another non-200-range status code was received\", PHP_EOL;\n  echo $e-\u003egetMessage();\n}\n```\n\nError codes are as follows:\n\n| Cause            | Error Type                     |\n| ---------------- | ------------------------------ |\n| HTTP 400         | `BadRequestException`          |\n| HTTP 401         | `AuthenticationException`      |\n| HTTP 403         | `PermissionDeniedException`    |\n| HTTP 404         | `NotFoundException`            |\n| HTTP 409         | `ConflictException`            |\n| HTTP 422         | `UnprocessableEntityException` |\n| HTTP 429         | `RateLimitException`           |\n| HTTP \u003e= 500      | `InternalServerException`      |\n| Other HTTP error | `APIStatusException`           |\n| Timeout          | `APITimeoutException`          |\n| Network error    | `APIConnectionException`       |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\n\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, \u003e=500 Internal errors, and timeouts will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n```php\n\u003c?php\n\nuse BeeperDesktop\\Client;\n\n// Configure the default for all requests:\n$client = new Client(requestOptions: ['maxRetries' =\u003e 0]);\n\n// Or, configure per-request:\n$result = $client-\u003eaccounts-\u003elist(requestOptions: ['maxRetries' =\u003e 5]);\n```\n\n## Advanced concepts\n\n### Making custom or undocumented requests\n\n#### Undocumented properties\n\nYou can send undocumented parameters to any endpoint, and read undocumented response properties, like so:\n\nNote: the `extra*` parameters of the same name overrides the documented parameters.\n\n```php\n\u003c?php\n\n$accounts = $client-\u003eaccounts-\u003elist(\n  requestOptions: [\n    'extraQueryParams' =\u003e ['my_query_parameter' =\u003e 'value'],\n    'extraBodyParams' =\u003e ['my_body_parameter' =\u003e 'value'],\n    'extraHeaders' =\u003e ['my-header' =\u003e 'value'],\n  ],\n);\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request, as seen in the examples above.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints while retaining the benefit of auth, retries, and so on, you can make requests using `client.request`, like so:\n\n```php\n\u003c?php\n\n$response = $client-\u003erequest(\n  method: \"post\",\n  path: '/undocumented/endpoint',\n  query: ['dog' =\u003e 'woof'],\n  headers: ['useful-header' =\u003e 'interesting-value'],\n  body: ['hello' =\u003e 'world']\n);\n```\n\n## Versioning\n\nThis package follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions. As the library is in initial development and has a major version of `0`, APIs may change at any time.\n\nThis package considers improvements to the (non-runtime) PHPDoc type definitions to be non-breaking changes.\n\n## Requirements\n\nPHP 8.1.0 or higher.\n\n## Contributing\n\nSee [the contributing documentation](https://github.com/beeper/desktop-api-php/tree/main/CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeper%2Fdesktop-api-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeeper%2Fdesktop-api-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeper%2Fdesktop-api-php/lists"}