The API program didn’t accept a varbinary format for my Node.JS API witha a header key and varbinary value to authenticate my API request with Node.JS.
I’ve tried the straightforward approach by initializing this code in my authenticate Node.JS function,
const encryptHeader = req.headers[process.env.API_HEADER];
const apiKey = await request.input(‘encryptHeader’, sql.VarBinary, encryptHeader)
.query(‘EXEC spAPI @encryptHeader);
…with other structures of my code that are unnecessary to include here
I expect that it should work as expected which it will accept the varbinary key input along with my header for my API authentication (e.g., 0x01000000AAA), then the Sql Server would return a value from its Stored Procedure.