Hi,
I’ve been trying to trigger a broadcast flow through an API call in python
The documentation says to follow the following steps:
import http.clientconn = http.client.HTTPSConnection("api.customer.io")payload = "{\"data\":{\"headline\":\"Roadrunner spotted in Albuquerque!\",\"date\":1511315635,\"text\":\"We received reports of a roadrunner in your immediate area! Head to your dashboard to view more information!\"},\"email_add_duplicates\":false,\"email_ignore_missing\":false,\"id_ignore_missing\":false}"headers = { 'content-type': "application/json", 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }conn.request("POST", "/v1/campaigns/{broadcast_id}/triggers", payload, headers)res = conn.getresponse()data = res.read()print(data.decode("utf-8"))
I replaced the bearer token by an app API key and the broadcast_id but I got the following error : {"errors":[{"detail":"wrong datacenter","status":"301"}]}
It seems strange to me that there is no spot to specify the workspace I want to reach etc…
If you have any clue lmk !
Have a nice day !