cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Who Me Too'd this topic

Sending newlines in markdown via API doesn't seem to work

CamRunr
Level 1
Level 1

I've tried all manner of escaping '\n'. Either the post fails with an error, or the '\n' is printed verbatim in the Teams window. I really need to have code blocks that respect newlines in these API posts. How?

curl -H "Authorization: Bearer tokenhere" https://api.ciscospark.com/v1/messages --form "roomId=roomidhere" --form 'markdown="```\nline 1\nline2\n```"'

I've tried "markdown=..." as well without single quotes. I've tried spaces around the newlines. I've tried actual newlines. Wjhat's the magic combo?

Who Me Too'd this topic