Discussions

Ask a Question
Back to All

I am trying to access streams but i am facing some error

In D-ID AI stream I am trying to access the live stream avatar but I am facing ERROR

for the below program

import requests

url = "https://api.d-id.com/talks/streams/id/ice"

payload = {
"candidate": "[{'foundation': '2', 'protocol': 'udp', 'priority': 1679819007, 'ip': '35.89.173.93', 'port': 31940, 'type': 'srflx'}, {'foundation': '1', 'protocol': 'udp', 'priority': 2015363327, 'ip': '35.89.173.93', 'port': 31940, 'type': 'host'}]",
"sdpMid": "audio",
"sdpMLineIndex": 0
}
headers = {
"accept": "application/json",
"content-type": "application/json",
"authorization": "Basic c2F0ZWVzaEBzdWphaW5mby5jb206U3VqYUAxMjM="
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)

i am facing this error
{"message": "Internal server error"}

i have given all correct details but still i am facing error