An allow list of role
values that can be used with this instance of the client.
All accounts have a role
associated that determines permissions and access.
Make sure you're using an account that has the appropriate role for the given environment.
Optional
endpointLeave this property undefined to access the standard Crossing Minds API URL.
Optional
errorDetermines how network calls are retried after failure. Note: not all network calls can be retried.
Optional
exponentialtrue
Optional
number3
Optional
retry250 milliseconds
Optional
fetchProvide a fetch
function if your runtime doesn't have one in globalThis
.
This is not required in modern browsers, node 18+, or Cloudflare Workers (including Oxygen).
Note: fetch
is required to use the client.
Optional
init: RequestInitProvide a fetch
function if your runtime doesn't have one in globalThis
.
This is not required in modern browsers, node 18+, or Cloudflare Workers (including Oxygen).
Note: fetch
is required to use the client.
Optional
initialProvide credentials to be used on instantiation of the client. Authentication will be attempted in the background, if needed.
Optional
onCallback triggered on a final authentication error. If this callback is triggered, subsequent API requests that require authentication will fail until one of the login commands is called successfully.
Optional
onCallback triggered when credentials in the client's internal state have changed. This is usually called after a successful login command.
Optional
userCustom user agent string to be used in network request headers.
Note: Setting the User-Agent
header is restricted in browsers for security reasons.
Options set when instantiating the RecommendationClient