Frequently Asked Questions
Do I need separate credentials for the Java and Node.js SDKs?
No. Credentials are per-project, not per-SDK. The same apiKey/apiSecret pair from creating a project works with either SDK.
What happens if I don't set baseUrl?
The client uses NotificationHub's production endpoint by default. You only need baseUrl(...) to point at a different environment.
Can I use a plain HTTP URL for baseUrl?
Only if the host is localhost — both SDKs' builders reject http:// URLs for any other host to prevent accidentally sending your API secret over an unencrypted connection.
How do I send the same message to multiple channels?
Call .addChannel(...) more than once on the same NotificationRequest.Builder and set the recipient field for each channel. See Multi-channel requests.
What's the difference between send and sendWithIdempotency?
send is sendWithIdempotency with no idempotency key. Use sendWithIdempotency whenever your own code might retry the call, so a retry can't cause a duplicate delivery — see Idempotent sends.
How do I know why a notification failed?
Check its receipt with get(notificationId)/getReceipts(notificationId), and check the dead-letter queue if it never got past dispatch.
Can I preview a template before sending?
Yes — preview(templateId, variables) renders a saved template with real variables, and previewRaw(html, variables) renders arbitrary HTML through the same engine without saving it first. See Templates.
Is the Spring Boot auto-configuration available in Node.js?
No — that's specific to the Java SDK, since it's a Spring Boot integration. In Node.js, build the client directly with NotificationHubClient.Builder, as shown in Configuration.
Where can I see the exact request/response shape for a call?
Every method's API reference page documents its signature and return type — see the Java SDK reference or Node.js SDK reference.