Forum Discussion
Pratapkarn2186
Sep 19, 2022Copper Contributor
Notifications with sendActivityNotification API
Hi All, I am using sendActivityNotification API to send activity feed notifications to a user. Sometimes API works fine and multiple times it gives errors related to " Specified activity wi...
Pratapkarn2186
Sep 20, 2022Copper Contributor
Sayali-MSFT: Is there anything else that can be done to figure out what is going wrong ??
We have already build a feature based on this approach, now we see API response is not consistent.
We have already build a feature based on this approach, now we see API response is not consistent.
Sayali-MSFT
Microsoft
Sep 20, 2022Pratapkarn2186 - Can you please add {actor} in templateText section.
"activities": {
"activityTypes": [
{
"type": "mldt_notify",
"description": "Notification",
"templateText": "{actor} MultiLine Message"
}
]
}
You can refer here:
Send activity feed notifications to users in Microsoft Teams - Microsoft Graph | Microsoft Learn
- Pratapkarn2186Sep 20, 2022Copper Contributor
hi Sayali-MSFT, i tried as suggested by adding actor but the result is the same.
"message"=>"Specified activity with type 'mldt_notify' could not be found in the app manifest.", "innerError"=>{"date"=>"2022-09-20T10:42:10", "request-id"=>"010d297d-1b37-4c24-9735-895ed1ba0ccf", "client-request-id"=>"010d297d-1b37-4c24-9735-895ed1ba0ccf"
Thanks,
Pratap- Sayali-MSFTSep 21, 2022
Microsoft
Pratapkarn2186 - Can you share the request and response for the API you are calling along with headers. You can skip access token information and also share the manifest.- Pratapkarn2186Sep 22, 2022Copper ContributorHi sayali-MST, please find the details.
Request : https://graph.microsoft.com/v1.0/users/email address removed for privacy reasons/teamwork/sendActivityNotification --header 'Authorization: XXXXXXX' --header 'Content-Type: application/json' --header 'Accept: application/json'
Data : {"topic":{"source":"text","value":"New message","WebUrl":"https://teams.microsoft.com/l/entity/XXXX/YYY"},"activityType":"mldt_notify","previewText":{"content":"Check New Messaging"}}