-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
contentType for excel attachment #4662
Comments
@Kalyan492 What channel are you using? |
@tracyboehrer , Its Teams channel (Private team -> Standard channel) |
You might have to use Also; here is a sample that you can test to see if that works for you as well: |
@dmvtech , @tracyboehrer I followed the steps mentioned in "https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=javascript#example-4-file-attachments&preserve-view=true". I used ClientSecretCredentials to generate a graph client and made the following call: const chatMessage = { Getting "Message POST is allowed in application-only context only for import purposes. Refer to https://docs.microsoft.com/microsoftteams/platform/graph-api/import-messages/import-external-messages-to-teams for more details." as response. What does this mean? Can't we use ClientSecretCredentials for token? If so, what kind of flow should I use for token? |
@Kalyan492 That particular error is not a BF SDK related error. Do a search for that error message and see if any of those solutions apply. |
Hi,
I am working on a bot where it will post an excel attachment to a Channel. I have the following piece of code for the same:
const attachment = {
contentUrl: {public access enabled blob url},
contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
name: "new_excel_blob.xlsx"
};
const reply: any = {type: ActivityTypes.Message}
reply.text =
Please find your excel
;reply.attachments = [attachment];
await context.sendActivity(reply);
Above code throws "Unknown attachment type" error. I have also tried contentType: "reference". Getting the same error.
If I use the same code for image (contentType: "image/png") then I am able to post image with message to the channel. What sshoudl be the correct contentType for excel / .xslx files?
Thanks & Regards,
Kalyan
The text was updated successfully, but these errors were encountered: