RESTful API

Posting a Message to the Twitter Timeline

Previous Versions

Overview

Allows you to post messages in your Twitter's Timeline.

Use this method if you meet the following requirements:

  • You have a Twitter app.
  • You has registered your app with the Campaign Manager
  • You have granted permissions to the application to post messages in your Twitter's Timeline

URL

Parameters on the following URL are inside braces { }

{base_url}/rest/api/tools/postAppTwitter/{instanceId}/{deviceId}/{appName}/{publicKey}/{signature}
Parameter Name Description
instanceId An instance id is the workspace identification number, if you don't know yours please request it using our ticketing tool, you will need to provide your Mobile Engagement Campaign Manager's URL and your user login
deviceId The user's identifier. In this particular case will be the Twitter pseudonym or alias.
appName Your Twitter App's name which will post your messages
content
POST
A file that contains the content for your message. This is a text file that could contain HTML format
publicKey The public key to access this API. if you don't know yours please request it using our ticketing tool, you will need to provide your Mobile Engagement Campaign Manager's URL and your user login
signature The unique SHA256 signature for this call, it's involve all input parameters. To learn about generating the correct signature please visit our Java Example

Response

The Response XML is divided in a static part and a dynamic one, we call it dynamic because it will vary depending on the method you invoke. Please read our Response XML Basics section if you want to learn more about the response parts.

<input>postAppTwitter</input>
<status>OK</status>
<description>Completed</description>
<result>
	<message>
              <deviceId>testapirestmmc</deviceId>
              <msgContent>Test postAppTwitter API MMC</msgContent>
              <appName>MessangiTest</appName>
              <platform>TWITTER</platform>
              <providerResponse>
                   <successful>true</successful>
                   <code>005</code>
                   <description>Successful transaction</description>
              </providerResponse>
              <accessToken>123456789-fA3dsS469YvLL9YEXC495KoX8oIxsC0jPsqKWVTk3</accessToken>
              <accessTokenSecret>SDErtyEsCMyV9Ejq9C9I8ItwGNcxWd8PbafD9wxObG259</accessTokenSecret>
              <consumerKey>iEtrTRscDsq1elizWZyw</consumerKey>
              <consumerSecret>WEFOPRDCh5QGuSxuEqTwtm51xsyRgX0BdN8beOp0</consumerSecret>
        </message>
</result>
Result parameters
Parameter Name Description Possible Values
message.deviceId The user's identifier Text
message.msgContent Message's content Text
message.appName Your Twitter App's name Text
message.platform Platform of the application TWITTER
message.providerResponse.successful Indicates if the post was successful or not true
false
message.providerResponse.code The Twitter's server code returned once the transaction is completed Text
message.providerResponse.description The Twitter's server code related description returned once the transaction is completed Text
message.accessToken The Twitter App's Access Token Text
message.accessTokenSecret The Twitter App's Access Token Secret Text
message.consumerKey The Twitter App's Consumer key Text
message.consumerSecret The Twitter App's Consumer secret Text