Skip to content

Introduction

PocketbaseExtended is an Arduino library that lets ESP8266 and ESP32 boards talk to a PocketBase backend over HTTP/HTTPS.

It wraps PocketBase’s REST API into a concise, chainable interface and returns structured PBResponse objects so your sketch can handle success and failure without parsing raw status codes.

Most IoT projects that need a backend end up hand-rolling HTTP requests, wrestling with JSON parsing, and duplicating error-handling boilerplate. PocketbaseExtended takes care of all of that:

  • Chainable collection selectorpb.collection("notes").getOne("id")
  • Structured responses — every method returns ok, statusCode, body, and error
  • Auth token management — login once, every subsequent request carries the token automatically
  • No heavy dependencies — uses only the platform’s built-in WiFi and HTTP stacks
PlatformWiFi / HTTP library used
ESP8266ESP8266WiFi + ESP8266HTTPClient
ESP32WiFi + HTTPClient + WiFiClientSecure

The correct headers are selected at compile time via #ifdef — you do not need to change library code for either board.

PocketBase v0.16 and later. The library targets the stable REST API surface (/api/collections, /api/health, /api/files).

If you used the previous PocketbaseArduino class name, a type alias is provided:

using PocketbaseArduino = PocketbaseExtended;

Existing sketches compile without any changes.