Error Encountered with Teams Incoming Webhook: Missing CreatedByObjectId

Tianen Xiang (Wicresoft North America Ltd) 0 Reputation points Microsoft Vendor
2024-12-27T07:16:21.0266667+00:00

While testing a Teams incoming webhook URL, the following error occurs despite receiving a status code of 200:

System.ArgumentNullException: Value cannot be null. (Parameter 'CreatedByObjectId cannot be null or empty')

This parameter was not an issue last week. Is there documentation available that explains this API?

import requests
import json

url = "Webhook URL" 

data = {
    "message": "Hello, this is a test message!",
    "summary": "test summary",
    "text": "test text from example_post.py",
}

headers = {
    "Content-Type": "application/json"  # Ensure it is set to send JSON data
}

response = requests.post(url, data=json.dumps(data), headers=headers)

if response.status_code == 200:
    print("Response status code:", response.status_code)
    print("Response text:", response.text)
else:
    print("Response status code:", response.status_code)
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,567 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,447 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Tianen Xiang (Wicresoft North America Ltd) 0 Reputation points Microsoft Vendor
    2024-12-27T11:31:21.0133333+00:00

    I see. I recreate the webhook. It works! Thanks!

    0 comments No comments

  2. Tianen Xiang (Wicresoft North America Ltd) 0 Reputation points Microsoft Vendor
    2024-12-27T11:32:05.2066667+00:00

    Recreate the new webhook url that will resolved this question!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.