Discussions
error
<!DOCTYPE html>
<html>
<head>
<title>test </title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
<h1>test</h1>
<textarea id="textInput" rows="4" cols="50" placeholder="Enter your text here..."></textarea><br>
<button id="generateVideo">listen</button>
<div id="videoContainer"></div>
```
<script>
$("#generateVideo").click(function() {
var text = $("#textInput").val();
if (text.trim() === "") {
alert("Please enter some text.");
return;
}
$.ajax({
url: 'https://api.d-id.com/talks',
type: 'POST',
headers: {
'Api-Key': 'bmFmaXNleW91c2VmaWtpYW5AZ21haWwuY29t:WosQk1YZE5YQ7o0gtu-LX'
},
success: function(response) {
var videoUrl = response.output_url;
$("#videoContainer").html('<video width="320" height="240" controls><source src="' + videoUrl + '" type="video/mp4"></video>');
},
error: function(error) {
alert("Error generating video.");
console.error(error);
}
});
});
</script>
```
</body>
</html>
{
"kind": "UnknownError",
"description": "Internal Server Error"
}
im getting this error
Posted by jeriest59 7 months ago
The API has only Basic Authentication, Does it have Oauth?
The API has only Basic Authentication, Does it have Oauth?
Posted by Supreetha Nagaraja 7 months ago