Publish Tweet with Unification Engine

When adding a connection using the Twitter connector offered by Unification Engine , what are the parameters that need to be used, and how are they passed to the URI?

+4
source share
2 answers

To submit using tweets

curl -XPOST https://apiv2.unificationengine.com/v2/message/send \
--data "{ \"message\": { \"receivers\": [{\"name\": \"name\", \"address\": \"TWITTER_HANDLE\" , \"Connector\": \"UNIQUE_CONNECTION_IDENTIFIER\"}],\"parts\": [{\"id\": \"1\",\"contentType\": \"text/plain\", \"data\":\"MESSAGE_CONTENT\" ,\"size\": MESSAGE_CONTENT_SIZE,\"type\": \"body\",\"sort\":0}]}}" \
-u USER_ACCESSKEY:USER_ACCESSSECRET -k

If USER_ACCESSKEY: USER_ACCESSSECRET is received when you add the user using UE_APPKEY: UE_APPSECRET

curl -XPOST https://apiv2.unificationengine.com/v2/user/create -u UE_APPKEY:UE_APPSECRET \
--data '{}' -k

Response data:

{"status":200,"info":"200 OK","uri":"user://USER_ACCESSKEY:USER_ACCESSSECRET"}
+3
source

Let me explain the commands used to add a twitter connection to #UnificationEngine

To add a twitter connection to #UnificationEngine, use

curl -XPOST https://apiv2.unificationengine.com/v2/connection/add \
     -u USER_ACCESSKEY:USER_ACCESSSECRET \ 
     --data '{"uri":"twitter://ACCESS_TOKEN:SECRET@twitter.com","name":"UNIQUE_CONNECTION_IDENTIFIER"}' \
     -k

ACCESS_TOKEN: SECRET - , twitter .

UNIQUE_CONNECTION_IDENTIFIER - UE. f.e , UNIQUE_CONNECTION_IDENTIFIER

+3

Source: https://habr.com/ru/post/1649401/


All Articles