cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
543
Views
1
Helpful
4
Replies

Update a message with Adaptive Card attachment?

dupontb
Beginner
Beginner

Hello,

Your documentation states that it's not possible to update a message containing an attachment (Adaptive Card).

https://developer.webex.com/docs/api/v1/messages/edit-a-message
"Edits of messages containing files or attachments are not currently supported. If a user attempts to edit a message containing files or attachments a 400 Bad Request will be returned by the API with a message stating that the feature is currently unsupported."

Your sample page doesn't have the attachment field to edit the card. BUT when I try to update the message using Postman I can PUT and update the Adaptive Card. It seems to be working great.

In the end, do you officially support the update of an Adaptive Card and the documentation is not updated?

Thanks

1 Accepted Solution

Hi @dupontb,
Thanks for your patience so far!
We discussed this topic internally with Cards Engg. as well as with the Product.
So, one thing I just wanted to clear at the very beginning (as I learnt from the internal discussion) that in this case we're updating just the Card Text actually and that should not be considered as the update of the whole attachment or, files!
And this type of small attachment update/s is currently possible only for a few attempts, which means if we try to update a Card N-number of times - at some point it'll start throwing error.

Also, only if the Card attachment doesn't have any Image in it, then the Card Text update is still possible.
But in case the Card has an Image along with Texts, then updating that Card Image or, even Card Text would be impossible starting from the first attempt and it'd throw the below error - 

{
    "message": "Support for editing messages with files via Developer APIs currently disabled",
    "errors": [
        {
            "description": "Support for editing messages with files via Developer APIs currently disabled"
        }
    ],
    "trackingId": "ROUTER_XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"
}

And, the same has been documented as well here - https://developer.webex.com/docs/buttons-and-cards#limitations
Please check the last point under Limitations section.

Hope this helps here to understand the complete background of it.

Regards!
Sandip

Please Note: If you think the solution provided above was helpful and satisfactory, please accept it as a Solution! However if you want to discuss it further and get yourself unblocked, please don't hesitate to reply back on this thread and we'll try to answer those queries by the soonest. In that case, once all of your queries are cleared - finally you can mark it as "Accepted as Solution"

View solution in original post

4 Replies 4

sandiban
Cisco Employee
Cisco Employee

That's a beautiful catch @dupontb !
I tested the same and was able to successfully update the Card JSON from Postman as well.
Let me check with our Backend team on this, will get back to you.

Regards!
Sandip

Hi @dupontb,
Thanks for your patience so far!
We discussed this topic internally with Cards Engg. as well as with the Product.
So, one thing I just wanted to clear at the very beginning (as I learnt from the internal discussion) that in this case we're updating just the Card Text actually and that should not be considered as the update of the whole attachment or, files!
And this type of small attachment update/s is currently possible only for a few attempts, which means if we try to update a Card N-number of times - at some point it'll start throwing error.

Also, only if the Card attachment doesn't have any Image in it, then the Card Text update is still possible.
But in case the Card has an Image along with Texts, then updating that Card Image or, even Card Text would be impossible starting from the first attempt and it'd throw the below error - 

{
    "message": "Support for editing messages with files via Developer APIs currently disabled",
    "errors": [
        {
            "description": "Support for editing messages with files via Developer APIs currently disabled"
        }
    ],
    "trackingId": "ROUTER_XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"
}

And, the same has been documented as well here - https://developer.webex.com/docs/buttons-and-cards#limitations
Please check the last point under Limitations section.

Hope this helps here to understand the complete background of it.

Regards!
Sandip

Please Note: If you think the solution provided above was helpful and satisfactory, please accept it as a Solution! However if you want to discuss it further and get yourself unblocked, please don't hesitate to reply back on this thread and we'll try to answer those queries by the soonest. In that case, once all of your queries are cleared - finally you can mark it as "Accepted as Solution"

For my use case, I display a card with an input and I update it with an error message when needed.
It's a basic case you are supporting at the moment.

Thanks for your help

Hi @dupontb,
Yes, as you shared the background, that should not be a problem as of now to update your Card's content as per the current logic/behaviour.
But we wanted to share the complete background from our so it gives you a clear picture and doesn't make confusion later in case you try to implement further updates on the Card.
Please let us know for any further assistance!

Regards!
Sandip

Getting Started

Welcome to the Webex Community. This is your home to ask questions, share knowledge, and attend live webinars.