You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Addresses review feedback on #709 from @nattb8: match the Web/Pixel SDK
pattern of letting callers override the API base URL.
BaseUrl is null by default. A null override keeps the existing
key-prefix derivation — "pk_imapik-test-" keys resolve to Sandbox and
every other key resolves to Production — so there is no behaviour
change for studios that never set this field. Integrations that need a
different backend (for example the Immutable-internal Dev API at
https://api.dev.immutable.com) pass the URL directly; no public env
token is surfaced.
- AudienceConfig: new BaseUrl string? property.
- Constants: BaseUrl / MessagesUrl / ConsentUrl / DataUrl accept an
optional baseUrlOverride; override wins when non-empty, falls back to
key-prefix derivation when null or empty.
- HttpTransport: ctor accepts baseUrlOverride and threads it into
MessagesUrl.
- ImmutableAudience.Init passes config.BaseUrl into HttpTransport;
DeleteData and SyncConsentToBackend pass it into DataUrl / ConsentUrl.
- Tests: BaseUrl resolution cases (test key, non-test key, null key,
override wins, empty-string override falls back) and an end-to-end
HttpTransport test confirming the override wins over a sandbox-
derived key.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments