Discussions
Bad Request on adding AWS presigned URL in result_url key in talks stream
6 days ago by anveeg.sinha
Hello team,
When I generate a PUT presigned url using AWS SDK it gives a response like this -
and adding this url in talk stream url gives Bad Request as response
const s3remotePath = `some/custom/key.mp4`
let uploadURL = await generateUploadUrl(s3remotePath)
const answerResponse = await fetchWithRetries(`${process.env.DID_API_URL}/talks/streams/${streamId}`, {
method: 'POST',
headers: {
Authorization: `Basic ${did.apiKey}`,
'Content-Type': 'application/json',
'x-api-key-external': `{"elevenlabs": "${elevenLabsApiKey.apiKey}"}`
},
body: JSON.stringify({
script: {
type: 'text',
provider: { type: "elevenlabs", voice_id: assistantDetails.voice },
input: answer
},
result_url: uploadURL,
config: { stitch: true, fluent: true },
session_id,
})
});
Please let me know what I am doing wrong