fix(whatsapp.gblib): Fixed audio with IBM Watson.
This commit is contained in:
parent
54b2b6a56e
commit
a6d3ec38b3
1 changed files with 5 additions and 5 deletions
|
@ -1503,12 +1503,12 @@ private async sendButtonList(to: string, buttons: string[]) {
|
||||||
// Extract the audio ID from the request body
|
// Extract the audio ID from the request body
|
||||||
const audioId = req.body.entry[0].changes[0].value.messages[0].audio.id;
|
const audioId = req.body.entry[0].changes[0].value.messages[0].audio.id;
|
||||||
|
|
||||||
// Meta WhatsApp Business API endpoint for downloading media
|
|
||||||
const metaApiUrl = `https://graph.facebook.com/v16.0/${audioId}`;
|
|
||||||
|
|
||||||
// User access token from min.whatsappServiceKey
|
// User access token from min.whatsappServiceKey
|
||||||
const userAccessToken = min.whatsappServiceKey;
|
const userAccessToken = min.whatsappServiceKey;
|
||||||
|
|
||||||
|
|
||||||
|
// Meta WhatsApp Business API endpoint for downloading media
|
||||||
|
const metaApiUrl = `https://graph.facebook.com/v20.0/${audioId}`;
|
||||||
// Fetch the media URL using the audio ID
|
// Fetch the media URL using the audio ID
|
||||||
const mediaUrlResponse = await fetch(metaApiUrl, {
|
const mediaUrlResponse = await fetch(metaApiUrl, {
|
||||||
headers: {
|
headers: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue