Passing data from initialise to live_canvas

#1

Afternoon folks!

Just planning out my integration, and trying to understand how best to pass card settings from configure/initialise through to a live canvas.

My app will return a content_url to the initialise request, which I understand then triggers another request from intercom to get the live canvas payload.

If I want to pass data from initialise to the live_canvas, should I append it to the content_url i.e.

{
    "canvas": {
        "content_url":  "http://domain.com/intercom/live_canvas?some_key=some_value"
    }
}

Or should I add that data to the stored_data in the initialise response and expect Intercom to pass it in their request to the content_url?

{
    "canvas": {
        "content_url":  "http://domain.com/intercom/live_canvas",
        "stored_data": {
            "some_key": "some_value"
        }
    }
}

Appreciate your insights on the best approach to it.

Robert

0 Likes

#2

Hey Robert :slight_smile:

For the POST to the content_url, we include the app_id, canvas , context, and
user objects.

To take these card_creation_options across after you respond with the results object during the configure flow, you should use the former method and add these as query parameters on the provided content_url.

1 Like

#3

Thanks for the tip Zach. :+1:

That makes sense, I’ll move forward with that approach then.

0 Likes