MyComm docs
Menu

SDKs

SDKs and packages

The official PHP SDK, Laravel package, Node.js SDK and browser widget, with install commands and what each one adds.

You do not need an SDK: the API is plain JSON over HTTPS, and the OpenAPI documents import into Postman, Insomnia and any code generator. The official packages save you the parts everyone writes: retries that cannot double-send, checks of your arguments before a request, typed results and errors, and webhook signature verification.

Package Install Version Guide
PHP SDK composer require mycomm/mycomm-php 2.0.0 Read
Laravel package composer require mycomm/mycomm-laravel 2.0.0 Read
Node.js SDK npm install @mycomm/node 2.0.0 Read
Connect widget npm install @mycomm/connect 1.1.0 Read

Which one do I need#

You build Use
A PHP application (any framework) PHP SDK
A Laravel application Laravel package; it installs the PHP SDK
A Node.js or TypeScript server (Express, NestJS, Next.js, serverless, edge) Node.js SDK
A page where your users pair their own phone Connect widget, with a hosted link created by your server
Anything else (Python, Go, Java, ...) The API reference and its OpenAPI document

What the packages share#

  • Versions follow the API. The packages are 1.x for the 1.0.0 contract and follow semver: a minor release adds what the API added, and nothing breaks within 1.x. The OpenAPI document's info.version (shown on the API reference) says which API a package version was built from; the changelog lists the contract.
  • Nothing hidden. Retries, timeouts and the idempotency key are documented in each package, and each can be changed per call.
  • Fail early, with the reason. Mistakes your code can see (a missing recipient, a value out of range) are reported before a request is sent; everything else is the API's own error, with its request_id and a link to its entry in the error reference.
  • Check your setup. The PHP packages and the Node.js SDK can verify a key and dry-run a send without sending; see Verify your integration.

Other languages#

There is no official SDK for them yet. Generate a client from the OpenAPI document of the Public API and follow these rules that the generated code will not know:

  1. Send Idempotency-Key on every POST you may retry and reuse it across retries (why).
  2. Treat unknown response fields, enum values and error codes as normal: the API only adds within v1.
  3. Verify webhook signatures against the raw body (how).
  4. Branch on error.code, never on error.message.