Discussions

Ask a Question
Back to All

pending_url

import generateTalk from './talk.js'
import axios from 'axios'
import dotenv from 'dotenv'
dotenv.config()

const apiKey = process.env.API_KEY_DID

// Set the API key as an HTTP header
const headers = {
'Authorization': Basic ${apiKey},
'Content-Type':'application/json'

};

const Talk = await generateTalk("https://create-images-results.d-id.com/DefaultPresenters/Noelle_f/image.jpeg", "Olá mundo!", "pt-BR");

const conversationId = Talk.id;

const response = await axios.get("https://api.d-id.com/talks/" + conversationId ,{
headers:headers
});

const video = await response.data

console.log(video)

I created this code in nodejs but it is showing the url as pending, but when I get the conversation id and put it in the postaman it returns the url as:result_url, how to solve this problem?