Discussions
I want to receive my scheduled call log report using API
I created a scheduled report using Create Scheduled report and used Get scheduled report to get web socket assosiated with it , i ran following code on my ide and waited for 3 am EST , so this report can be received at my web socket
but i didnt receive any payload .
My scheduled report id is 6076509209575424
Can you please let me know why ?
import websocket
import json
Define the callback function for receiving messages
def on_message(ws, message):
# Print the payload received
print("Received payload:", message)
# Optionally, if the message is in JSON format and you want to parse it
try:
data = json.loads(message)
print("Parsed JSON:", data)
except json.JSONDecodeError:
print("Received non-JSON message")
Create the WebSocket app and assign the callback functions
ws = websocket.WebSocketApp(
"wss://platform-websockets-6kqb5ajsla-uc.a.run.app/events/eyJhbGciOiJFUzI1NiIsInR5cCI6InZuZC5kaWFscGFkLndlYnNvY2tldCtqd3QifQ.eyJzdWIiOiJlbmRwb2ludDo0NTY1Mzc2MjQ2MDM4NTI4OnNjaGVkdWxlX3JlcG9ydHM6NjA3NjUwOTIwOTU3NTQyNCIsImV4cCI6MTcyMTIwNzA0NCwiaXNzIjoiaHR0cHM6Ly9kaWFscGFkLmNvbSIsImlhdCI6MTcyMTIwMzQ0NH0.F26YaatkDCtgKQnOevc3txN5Qk4Gm9epNclD5yJABeb7sQRn-XDw1wpItMeZImVQt-Y1kM_-z8YTV_l5jdrQWw"
on_error=on_error,
on_close=on_close
)
ws.on_open = on_open
Start the WebSocket connection
ws.run_forever()