Our code makes a curl request. It's worked for years and then suddenly stopped. I added the following header to the request and it started working again:
Content-Type: application/json
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
We use the MessageCard Reference (https://learn.microsoft.com/en-us/outlook/actionable-messages/message-card-reference) to send messages to Teams via incoming webhooks (https://learn.microsoft.com/en-us/outlook/actionable-messages/send-via-connectors#send-the-message). Here is an example of a payload:
{
"@type": "MessageCard",
"@context": "http:\/\/schema.org\/extensions",
"themeColor": "d58200",
"title": "title",
"text": "text",
"potentialAction": [
{
"@type": "OpenUri",
"name": "Name",
"targets": [
{
"os": "default",
"uri": "https:\/\/www.example.com\/"
}
]
}
]
}
We've been sending this for years, but since around 7th July we started getting the error message:
{"message":"Bad payload received by generic incoming webhook.","http_code":400}
I can also see the following response when making a request to the webhook endpoint:
System.ArgumentNullException: Value cannot be null. (Parameter 'jtoken')
This doesn't happen when I make the call (using the same endpoint and payload) using Postman. This only happens when we make the call from inside our code.
Does anyone know if anything has changed or why we would be getting this? I can't find any reference for the jtoken
parameter. Our code hasn't changed.
Thanks.
Our code makes a curl request. It's worked for years and then suddenly stopped. I added the following header to the request and it started working again:
Content-Type: application/json
Based on your description, this problem is related to Teams script development, which we do not support. So we will add Microsoft Teams development tag to your thread.
Thanks for your understanding and patience!
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.