const response = return io.backgroundFetch<CreateCompletionResponseData>( "background", "https://someapi.com/v1/endpointname", { method: "POST", headers: { "Content-Type": "application/json", //by using `redactString` the apiKey will be redacted in the logs Authorization: redactString`Bearer ${auth.apiKey}`, }, body: JSON.stringify(params), } );
An easy way to redact sensitive information from a string
redactString is a Tagged template that can be used to redact sensitive information from a string.
redactString
It is used internally to redact Bearer tokens in Integrations that use backgroundFetch.
Was this page helpful?