Christopher Quackenbush
12/17/2025, 10:07 PMbattk
12/17/2025, 10:15 PMChristopher Quackenbush
12/17/2025, 10:36 PMconst bearerToken = https.createSecureString({
input: `Bearer {custsecret_openai_api_key}`
});
const response = https.get({
url: `${url}`,
headers: {
'Content-Type': 'application/json',
// biome-ignore lint/style/useNamingConvention: Authorization header
Authorization: bearerToken,
},
});
Response: esponse code: 401, body: { "error": { "message": "Incorrect API key provided: {custsec***************key}.battk
12/17/2025, 10:49 PMRestrict To Scripts field correctly set to your script's script idChristopher Quackenbush
12/17/2025, 10:51 PMPatrick A.
12/18/2025, 4:46 AMconst resp = <http://https.post|https.post>({
url: `${url}`,
body: JSON.stringify(payload),
headers: {
'Content-Type': 'application/json',
Accept: '/',
Authorization: 'Bearer {custsecret_apikey}',
},
credentials: ['custsecret_apikey'],
});Shawn Talbert
12/19/2025, 6:39 PMcustsecret twice. On the other hand, Christopher is doing a GET and you're doing a POST so it's not apples/apples anyway. just sayin'