Error when attempting to add Messenger app to conversation


#1

Hello! I’m new here, so please let me know if I can provide more information and/or ask my question elsewhere.

I’m getting this error when trying to add my test Messenger app to a conversation: “Something went wrong while trying to set up that card, please try again”

The app and Inbox are in the same workspace.

My initialize URL is: https://sandbox.mybasis.com/intercom/initialize/

If you POST to that URL in Postman, I get the canvas JSON object.

How can I debug this further? Anything I’m doing wrong?

Thank you!

Edit: I followed this tutorial and was not able to get the app working (similar error message): https://developers.intercom.com/building-apps/docs/build-your-first-messenger-app


#2

Hey @jenna - awesome to hear you’re building!

The best way to debug this is to go to the Network tab like so to examine the relevant requests when adding the app to the Conversation - here they would either be for configure or initialize. If it’s coming up with an error, the response is likely a 502/504, and the Preview/Response section should give you the error message.


#3

Thanks for the help!

The JS error I’m getting now is: Invalid value field for class MessengerAppFramework::Private::Models::Component::SingleSelect

My value is “call-type” and the docs say I can use any string. Any thoughts?

This is the full JSON I’m returning in /initialize:
{
“canvas”: {
“content”: {
“components”: [
{
“type”: “text”,
“text”: “Great, let me just ask a couple questions about your preferences for the session.”
},
{
“type”: “single-select”,
“id”: “call-type”,
“label”: “Would you prefer video or phone?”,
“value”: “call-type”,
“save_state”: “unsaved”,
“disabled”: true,
“options”: [
{
“type”: “option”,
“id”: “telephone”,
“text”: “Telephone”
},
{
“type”: “option”,
“id”: “video”,
“text”: “Video”
}
],
“action”: {
“type”: “submit”
}
}
]
}
}
}


#4

I got this working by taking out “value.”