Skip to content

Client

PocketbaseExtended is the main client class. Create one instance per PocketBase host and reuse it throughout your sketch.

explicit PocketbaseExtended(const char* baseUrl);
ParameterTypeDescription
baseUrlconst char*Root URL of the PocketBase instance. Trailing slashes are normalized automatically.
PocketbaseExtended pb("https://my-pb-host.com");
// internally stored as "https://my-pb-host.com/api/"

The constructor stores the normalized base URL and sets these defaults:

PropertyDefault
Timeout10 000 ms
TLS verificationSkipped (insecureTLS = true)
Debug loggingDisabled
Auth tokenEmpty (unauthenticated)

Set the active collection for the next request. Returns *this for chaining.

PocketbaseExtended& collection(const char* name);
ParameterTypeDescription
nameconst char*PocketBase collection name.
pb.collection("notes").getOne("RECORD_ID");
pb.collection("users").authWithPassword("email@example.com", "password");

The _collection member persists between calls — if you call .collection("notes") and then call a method without chaining, it will target notes. Always call .collection() explicitly before each operation to prevent accidentally targeting the wrong collection.


using PocketbaseArduino = PocketbaseExtended;

Retained for v0.x sketch compatibility. PocketbaseArduino is identical to PocketbaseExtended — no code changes required.