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.

PROVISIONAL - Share a piece of content into Symphony

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.

POSTyouragentURL.symphony.com/agent/v3/stream/{sid}/share
Path parameters
sid*string

Stream ID

Header parameters
Body
typestring

Type of content to be shared. Currently only support "com.symphony.sharing.article"

contentShareArticle (object)
Response

Success

Body
idstring

The messageId is assigned by the ingestor service when a message is sent.

timestamp*string
v2messageType*string
streamId*string
message*string (MessageML)

Message text in MessageML

fromUserId*integer (int64)

the Symphony userId of the user who sent the message. This will be populated by the server (and actually ignored if included when sending a message).

attachmentsarray of AttachmentInfo (object)
Request
const response = await fetch('youragentURL.symphony.com/agent/v3/stream/{sid}/share', {
    method: 'POST',
    headers: {
      "sessionToken": "text",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "id": "text",
  "timestamp": "text",
  "v2messageType": "text",
  "streamId": "text",
  "message": "text",
  "fromUserId": 0,
  "attachments": [
    {
      "id": "text",
      "name": "text",
      "size": 0
    }
  ]
}

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"
    }
}'

📘 Note

Visit Overview for an overview of streams.

🚧 Roles and Privileges

For 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

Parameter
Type
Required
Description

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