Share Content
Share third-party content, such as a news article, into the specified stream. The stream can be a chat room or an IM.
Given a 3rd party content (eg. news article), it can share to the given stream. The stream can be a chatroom, an IM or a multiparty IM.
Stream ID
Session authentication token.
Key Manager authentication token.
Type of content to be shared. Currently only support "com.symphony.sharing.article"
A representation of a message sent by a user of Symphony.
POST /agent/v3/stream/{sid}/share HTTP/1.1
Host: youragentURL.symphony.com
sessionToken: text
Content-Type: application/json
Accept: */*
Content-Length: 258
{
"type": "text",
"content": {
"articleId": "text",
"title": "text",
"subTitle": "text",
"message": "text",
"publisher": "text",
"publishDate": 1,
"thumbnailUrl": "text",
"author": "text",
"articleUrl": "text",
"summary": "text",
"appId": "text",
"appName": "text",
"appIconUrl": "text"
}
}
{
"id": "text",
"timestamp": "text",
"v2messageType": "text",
"streamId": "text",
"message": "text",
"fromUserId": 1,
"attachments": [
{
"id": "text",
"name": "text",
"size": 1
}
]
}
Request Example
curl -X POST \
https://acme.symphony.com/agent/v3/stream/7w68A8sAG_qv1GwVc9ODzX___ql_RJ6zdA/share \
-H "sessionToken: SESSION_TOKEN" \
-H "keyManagerToken: KEY_MANAGER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "com.symphony.sharing.article",
"content":{
"articleId":"tsla",
"title": "The Secret'"'"'s Out: Tesla Enters China and Is Winning",
"description": "Check this out",
"publisher": "Capital Market Laboratories",
"thumbnailUrl": "http://www.cmlviz.com/cmld3b/images/tesla-supercharger-stop.jpg",
"author": "OPHIRGOTTLIEB",
"articleUrl": "http://ophirgottlieb.tumblr.com/post/146623530819/the-secrets-out-tesla-enters-china-and-is",
"summary": "Tesla Motors Inc. (NASDAQ:TSLA) has a CEO more famous than the firm itself, perhaps. Elon Musk has made some bold predictions, first stating that the firm would grow sales from 50,000 units in 2015 to 500,000 by 2020 powered by the less expensive Model 3 and the massive manufacturing capability of the Gigafactory.",
"appId": "ticker",
"appName": "Market Data Demo",
"appIconUrl": "https://apps-dev.symphony.com/ticker/assets/images/logo.png"
}
}'
📘 NoteVisit Overview for an overview of streams.
🚧 Roles and PrivilegesFor not public rooms, the caller needs to be on the stream or have the Content Management role. See Bot Permissions for a list of roles and associated privileges.
Content Fields
articleId
string
Yes, if articleUrl
not specified
A unique ID for this article, not used by any other article
title
string
Yes
The title of the article
subTitle
string
No
The subtitle of the article
message
string
No
The message text that can be sent along with the shared article
publisher
string
Yes
Publisher of the article
publishDate
string
No
Article publish date in unix timestamp (in seconds)
thumbnailUrl
string
No
URL to the thumbnail image
author
string
Yes
Author of the article
articleUrl
string
Yes, if articleId
not specified
URL to the article
summary
string
No
Preview summary of the article
appId
string
Yes
App ID of the calling application
appName
string
No
App name of the calling application
appIconUrl
string
No
App icon URL of the calling application
Last updated
Was this helpful?