Cannot send telegram messages any more

Since a view weeks I cannot send telegram messages anymore.
this Code works for more than 3 years:

    self.call_service(
        "telegram_bot/send_message",
        message=message,
        title=title,
        target=id
    )
    
    #    could be:
    self.call_service(
        "telegram_bot/send_message",
        title="*a title*",
        target=1234567,
        message="A message",
    )

Right now I got:
Error with websocket result: invalid_format: expected a dictionary for dictionary value @ data[‘target’]. Got 1234567

In an automation, this works:

actions:
  - action: telegram_bot.send_message
    data:
      title: "*a title*"
      target: "1234567"
      message: "A message"

Any ideas?

sincerly
Kay

I’m not familiar with app daemon but from the call_service docs, you should wrap the parameters with service_data.

Yes. Its a conflict between the target used in the service data and the target used by the websocket API.
Found Solution in GitHub

Solution:

self.call_service(
            "telegram_bot/send_message",
            service_data={
                "title": f'*{title}*',
                "target": user_id,
                "message": message,
                "disable_notification": False
            }
        )