@wjaceh wrote:
Hi,
I’m trying to send some text to conversation integration over RestAPI (at the moment using python script), but I’m getting “400: Bad Request”.
import requests import json url = 'http://192.168.50.21:8123/api/services/conversation/process' headers = { 'Authorization': 'Bearer my_long_lived_token', 'content-type': 'application/json' } payload = { 'service_data':{ "text": "Turn all lights on" } } response = requests.post(url, headers=headers, data=json.dumps(payload)) print(response.text) print(response.status_code)
Can anyone spot the mistake?
PS: I’m quite new to coding so the whole thing might be misunderstood from my side.
Posts: 1
Participants: 1