BlueBubbles Server uses a simple password-based authentication model. Every API request must include the server password as a query parameter, and the SDK handles this for you automatically — you configure credentials once when constructingDocumentation Index
Fetch the complete documentation index at: https://bluebubbles.anmho.com/llms.txt
Use this file to discover all available pages before exploring further.
BlueBubblesClient and every subsequent request carries them without any extra work on your part.
How authentication works
When you create aBlueBubblesClient, you pass an OpenAPIConfig object that includes your credentials. The underlying HTTP layer reads those credentials before each request and appends them to the outgoing URL as query parameters. You never need to set an Authorization header or manually attach a password to individual method calls.
Configuring password authentication
Pass your server password using thePASSWORD field in the config object. Set BASE to your server’s full base URL.
PASSWORD field accepts either a static string or an async resolver function. The resolver form is useful when you need to fetch the password from a secrets manager or environment variable at request time rather than at startup.
Token-based authentication
TheOpenAPIConfig type also exposes a TOKEN field as an alternative credential mechanism. When TOKEN is set, it is sent as a Bearer token in the Authorization header rather than as a query parameter.
PASSWORD, TOKEN accepts a static string or an async resolver function. Check your BlueBubbles Server documentation to confirm which credential type your server version supports.
Full config reference
TheOpenAPIConfig type accepted by BlueBubblesClient has the following shape:
BASE, VERSION, WITH_CREDENTIALS, and CREDENTIALS are optional. At minimum, set BASE and PASSWORD to connect to a standard BlueBubbles Server instance.
Handling authentication failures
When a request fails — for example because the password is wrong or the server is unreachable — the SDK throws anApiError. Import it from bluebubbles-sdk to check for it specifically.
ApiError exposes the HTTP status code, statusText, the request url, and the parsed body from the server response. A 401 or 403 status typically indicates an incorrect password. A connection error (network failure before the server responds) surfaces as a standard Error rather than an ApiError.