(Auto-creation of topic Documentation:HTCC:API:TwitterSend:8.5.2DRAFT via TOC Documentation:HTCC:APITOC8.5.2DRAFT) |
|||
Line 1: | Line 1: | ||
− | = | + | =Send= |
+ | __NOTOC__ | ||
+ | This operation is part of the [[Twitter|Twitter API]] section of the [[Welcome|Genesys Web Services REST API]]. | ||
+ | ==Overview== | ||
+ | {| | ||
+ | ! Request URL | ||
+ | | /api/v2/me/twitter/{id} | ||
+ | |- | ||
+ | ! HTTP Method | ||
+ | | POST | ||
+ | |- | ||
+ | ! Required Features | ||
+ | | api-multimedia | ||
+ | |} | ||
+ | |||
+ | ==Parameters== | ||
+ | {| | ||
+ | ! Parameter | ||
+ | ! Value | ||
+ | |- | ||
+ | | operationName | ||
+ | | Send | ||
+ | |- | ||
+ | | queuePath | ||
+ | | The job queue for handling the send operation. (required) | ||
+ | |- | ||
+ | | twitter | ||
+ | | Specified data with Twitter parameters. (required) | ||
+ | |} | ||
+ | ===Twitter Parameters=== | ||
+ | | | ||
+ | ! Parameter | ||
+ | ! Value | ||
+ | |- | ||
+ | | from | ||
+ | | A user name for a Twitter account. | ||
+ | |- | ||
+ | | message | ||
+ | | The actual message to send. The body should be plain text. | ||
+ | |} | ||
+ | |||
+ | ==Samples== | ||
+ | ===Request=== | ||
+ | <source lang="text"> | ||
+ | POST api/v2/me/twitter/01QQQG2MU214P06D | ||
+ | { | ||
+ | "queuePath": "/contacts/60ebbb94-3cef-4b14-95f8-5c49dbeb355d", | ||
+ | "twitter": { | ||
+ | "message": "HelloTwitter!", | ||
+ | "from": "vitaliy_onv" | ||
+ | }, | ||
+ | "operationName": "Send" | ||
+ | } | ||
+ | </source> | ||
+ | ===HTTP Response=== | ||
+ | <source lang="text"> | ||
+ | { | ||
+ | "statusCode": 0 | ||
+ | } | ||
+ | </source> | ||
+ | ===CometD Response=== | ||
+ | <source lang="text"> | ||
+ | {"messageType": "TwitterStateChangeMessage", | ||
+ | "notificationType": "StatusChange", | ||
+ | "referenceId": 57, | ||
+ | "twitter": {"capabilities": [], | ||
+ | "contactId": "00025aA4V4DR01M6", | ||
+ | "from": "vitaliy_onv", | ||
+ | "id": "01QQQG2MU214P06D", | ||
+ | "message": "Hello Twitter!", | ||
+ | "state": "Sent", | ||
+ | "subject": "Hello Twitter!", | ||
+ | "twitterType": "Outbound", | ||
+ | "uri": "http://192.168.83.25:8080/api/v2/twitters/01QQQG2MU214P06D", | ||
+ | "userData": {"FromAddress": "vitaliy_onv", | ||
+ | "_twitterContactIsFollower": "false", | ||
+ | "_twitterContactIsFriend": "false", | ||
+ | "_twitterMsgType": "Status", | ||
+ | "_twitterUserId": "1258948171", | ||
+ | "_twitterUserImageURL": "http://pbs.twimg.com/profile_images/3366120480/a4a096e738b7111166a23dfe72613839_normal.png", | ||
+ | "_twitterUserName": "Vitaliy", | ||
+ | "_twitterUserScreenName": "vitaliy_onv", | ||
+ | "_umsChannel": "channel-twitter", | ||
+ | "_umsInboundIxnSubmittedBy": "esv_smsrv_vit", | ||
+ | "_umsMediaAccount": "1258948171"}}} | ||
+ | </source> | ||
[[Category:V:HTCC:8.5.2DRAFT]] | [[Category:V:HTCC:8.5.2DRAFT]] |
Revision as of 14:48, March 5, 2015
Send
This operation is part of the Twitter API section of the Genesys Web Services REST API.
Overview
Request URL | /api/v2/me/twitter/{id} |
---|---|
HTTP Method | POST |
Required Features | api-multimedia |
Parameters
Parameter | Value |
---|---|
operationName | Send |
queuePath | The job queue for handling the send operation. (required) |
Specified data with Twitter parameters. (required) |
Twitter Parameters
| ! Parameter ! Value |- | from | A user name for a Twitter account. |- | message | The actual message to send. The body should be plain text. |}
Samples
Request
POST api/v2/me/twitter/01QQQG2MU214P06D
{
"queuePath": "/contacts/60ebbb94-3cef-4b14-95f8-5c49dbeb355d",
"twitter": {
"message": "HelloTwitter!",
"from": "vitaliy_onv"
},
"operationName": "Send"
}
HTTP Response
{
"statusCode": 0
}
CometD Response
{"messageType": "TwitterStateChangeMessage",
"notificationType": "StatusChange",
"referenceId": 57,
"twitter": {"capabilities": [],
"contactId": "00025aA4V4DR01M6",
"from": "vitaliy_onv",
"id": "01QQQG2MU214P06D",
"message": "Hello Twitter!",
"state": "Sent",
"subject": "Hello Twitter!",
"twitterType": "Outbound",
"uri": "http://192.168.83.25:8080/api/v2/twitters/01QQQG2MU214P06D",
"userData": {"FromAddress": "vitaliy_onv",
"_twitterContactIsFollower": "false",
"_twitterContactIsFriend": "false",
"_twitterMsgType": "Status",
"_twitterUserId": "1258948171",
"_twitterUserImageURL": "http://pbs.twimg.com/profile_images/3366120480/a4a096e738b7111166a23dfe72613839_normal.png",
"_twitterUserName": "Vitaliy",
"_twitterUserScreenName": "vitaliy_onv",
"_umsChannel": "channel-twitter",
"_umsInboundIxnSubmittedBy": "esv_smsrv_vit",
"_umsMediaAccount": "1258948171"}}}
Comments or questions about this documentation? Contact us for support!