Overview
Configuration is provided for establishing connections with the Twitter service. The configuration is used in the REST Connection Manager.
Setup
Press icon to get more information about the connection parameters.
Obtain data
Use REST Source component to get data from service resource.
Insert data
Use REST Destination component to insert data into service resource.
Quick Start
In this task, we will show you Step-by-Step how-to create a connection to Twitter service using COZYROC's REST Connection Manager.
Configuration
Base URL address: https://api.twitter.com/1.1
.
- User
-
The authentication uses an authorized token.
The following request parameters will be automatically processed during the authentication process:
-
Authorization:
{{=OA1a.getAuthorizationHeader(token, request)}}
Documentation: https://dev.twitter.com/web/sign-in/implementing.
-
Authorization:
- Application-only
-
The authentication uses a session token.
The authentication has the following user-defined parameters:
- ConsumerKey:
- ConsumerSecret:
The following request parameters will be automatically processed during the authentication process:
-
Authorization:
Bearer {{=token.Access}}
Documentation: https://developer.twitter.com/en/docs/basics/authentication/overview.
- [Read blocks] action (alias: "blocked by the user")
-
Endpoint URL address:
/blocks/list.json
.
The result is extracted from:{{=response.users}}
.
The result is paginated.The following request parameters will be automatically processed:
-
cursor:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/get-blocks-list.
-
cursor:
- [Read followers] action (alias: "followers of the user")
-
Endpoint URL address:
/followers/list.json
.
The result is extracted from:{{=response.users}}
.
The result is paginated.The action has the following user-defined parameters:
- followers: Specify screen name (alias for "screen_name").
The following request parameters will be automatically processed:
-
cursor:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
screen_name:
{{=parameters.get('followers')}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-followers-list.
- [Read friends] action (alias: "friends of the user")
-
Endpoint URL address:
/friends/list.json
.
The result is extracted from:{{=response.users}}
.
The result is paginated.The action has the following user-defined parameters:
- friends: Specify screen name (alias for "screen_name").
The following request parameters will be automatically processed:
-
cursor:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
screen_name:
{{=parameters.get('friends')}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friends-list.
- [Read list_members] action (alias: "members of a list")
-
Endpoint URL address:
/lists/members.json
.
The result is extracted from:{{=response.users}}
.
The result is paginated.The action has the following user-defined parameters:
- list_members: Required. Specify list identifier (alias for "list_id").
The following request parameters will be automatically processed:
-
cursor:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
list_id:
{{=parameters.list_members}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-members.
- [Read list_subscribers] action (alias: "subscribers to a list")
-
Endpoint URL address:
/lists/subscribers.json
.
The result is extracted from:{{=response.users}}
.
The result is paginated.The action has the following user-defined parameters:
- list_subscribers: Required. Specify list identifier (alias for "list_id").
The following request parameters will be automatically processed:
-
cursor:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
list_id:
{{=parameters.list_subscribers}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-subscribers.
- [Read mutes] action (alias: "muted by the user")
-
Endpoint URL address:
/mutes/users/list.json
.
The result is extracted from:{{=response.users}}
.
The result is paginated.The following request parameters will be automatically processed:
-
cursor:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/get-mutes-users-list.
-
cursor:
- [Read search] action (alias: "matching a query")
-
Endpoint URL address:
/users/search.json
.
The result is extracted from:{{=response}}
.
The result is paginated.The action has the following user-defined parameters:
- search: Required. Specify search query (alias for "q").
The following request parameters will be automatically processed:
-
page:
{{=parameters.iterator}}
-
q:
{{=parameters.search}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-search.
- [Read suggestions] action (alias: "suggested for a list/category")
-
Endpoint URL address:
/users/suggestions/{{=parameters.suggestions}}.json
.
The result is extracted from:{{=response.users}}
.
The result is paginated.The action has the following user-defined parameters:
- suggestions: Required. Specify suggestion.
The following request parameters will be automatically processed:
-
cursor:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-suggestions-slug.
The resource includes the fields from the User template.
- [Read collection] action (alias: "part of a collection")
-
Endpoint URL address:
/collections/entries.json
.
The result is extracted from:{{=_.values(response.objects.tweets)}}
.
The result is paginated.The action has the following user-defined parameters:
- collection: Required. Specify collection identifier (alias for "id").
The following request parameters will be automatically processed:
-
id:
{{=parameters.collection}}
-
cursor:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/tweets/curate-a-collection/api-reference/get-collections-entries.
- [Read favorites] action (alias: "liked by the user")
-
Endpoint URL address:
/favorites/list.json
.The action has the following user-defined parameters:
- favorites: Specify screen name (alias for "screen_name").
The following request parameters will be automatically processed:
-
screen_name:
{{=parameters.get('favorites')}}
-
count:
{{=parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-favorites-list.
- [Read list_statuses] action (alias: "authored by members of a list")
-
Endpoint URL address:
/lists/statuses.json
.The action has the following user-defined parameters:
- list_statuses: Required. Specify list identifier (alias for "list_id").
The following request parameters will be automatically processed:
-
list_id:
{{=parameters.list_statuses}}
-
count:
{{=parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-statuses.
- [Read search] action (alias: "matching a query")
-
Endpoint URL address:
/search/tweets.json
.
The result is extracted from:{{=response.statuses}}
.
The result is paginated.The action has the following user-defined parameters:
- search: Required. Specify search query (alias for "q").
The following request parameters will be automatically processed:
-
q:
{{=parameters.search}}
-
max_id:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets.
- [Read home_timeline] action (alias: "home timeline")
-
Endpoint URL address:
/statuses/home_timeline.json
.
The result is paginated.The following request parameters will be automatically processed:
-
max_id:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-home_timeline.
-
max_id:
- [Read mentions_timeline] action (alias: "mentions timeline")
-
Endpoint URL address:
/statuses/mentions_timeline.json
.
The result is paginated.The following request parameters will be automatically processed:
-
max_id:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-mentions_timeline.
-
max_id:
- [Read retweets_of_me] action (alias: "retweets by the user")
-
Endpoint URL address:
/statuses/retweets_of_me.json
.
The result is paginated.The following request parameters will be automatically processed:
-
max_id:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-retweets_of_me.
-
max_id:
- [Read user_timeline] action (alias: "user timeline")
-
Endpoint URL address:
/statuses/user_timeline.json
.
The result is paginated.The action has the following user-defined parameters:
- user_timeline: Specify screen name (alias for "screen_name").
The following request parameters will be automatically processed:
-
screen_name:
{{=parameters.get('user_timeline')}}
-
max_id:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-user_timeline.
The resource includes the fields from the Tweet template.
- retweeted_status
Template: Tweet. Field components:
-
Uses template:
Tweet
. - Contains the following components: quoted_status.
-
Uses template:
- [Read] action
-
Endpoint URL address:
/collections/list.json
.
The result is extracted from:{{=_.map(response.timelines, function(item, key){ item['timeline_id'] = key; return item; })}}
.
The result is paginated.The following request parameters will be automatically processed:
-
cursor:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/tweets/curate-a-collection/api-reference/get-collections-list.
-
cursor:
- [Create] action
-
Endpoint URL address:
/collections/create.json
.
The result is extracted from:{{=response.response}}
.
The action uses POST method.The following request parameters will be automatically processed:
-
application/json:
{{=item}}
Documentation: https://developer.twitter.com/en/docs/tweets/curate-a-collection/api-reference/post-collections-create.
-
application/json:
- [Update] action
-
Endpoint URL address:
/collections/update.json
.
The action uses POST method.The following request parameters will be automatically processed:
-
id:
{{=item.timeline_id}}
-
application/json:
{{=item}}
Documentation: https://developer.twitter.com/en/docs/tweets/curate-a-collection/api-reference/post-collections-update.
-
id:
- [Delete] action
-
Endpoint URL address:
/collections/destroy.json
.
The action uses POST method.The following request parameters will be automatically processed:
-
id:
{{=item.timeline_id}}
Documentation: https://developer.twitter.com/en/docs/tweets/curate-a-collection/api-reference/post-collections-destroy.
-
id:
- timeline_id
A key field. Template: ShortText.
- name
Template: ShortText.
- user_id
Template: ShortText. A read-only field.
- collection_url
Template: ShortText. A read-only field.
- description
Template: ShortText.
- url
Template: ShortText.
- visibility
Template: ShortText. A read-only field.
- timeline_order
Template: ShortText.
- collection_type
Template: ShortText. A read-only field.
- [Read] action
-
Endpoint URL address:
/direct_messages.json
.The following request parameters will be automatically processed:
-
count:
{{=parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/get-sent-message.
-
count:
- [Read sent] action
-
Endpoint URL address:
/direct_messages/sent.json
.
The result is paginated.The following request parameters will be automatically processed:
-
page:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/get-sent-message.
-
page:
- [Create] action
-
Endpoint URL address:
/direct_messages/new.json
.
The action uses POST method.The following request parameters will be automatically processed:
-
user_id:
{{=item.recipient_id}}
-
screen_name:
{{=item.recipient_screen_name}}
Documentation: https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-message.
-
user_id:
- [Delete] action
-
Endpoint URL address:
/direct_messages/destroy.json
.
The action uses POST method.The following request parameters will be automatically processed:
-
id:
{{=item.id}}
Documentation: https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/delete-message.
-
id:
- id
A key field. Template: Id.
- created_at
Template: DateTime. A read-only field.
- entities
Template: Entity. A read-only field.
- recipient
Template: User. A read-only field.
- recipient_id
Template: Id.
- recipient_screen_name
Template: ShortText.
- sender
Template: User. A read-only field.
- sender_id
Template: Id. A read-only field.
- sender_screen_name
Template: ShortText. A read-only field.
- text
Template: ShortText.
- [Read ownerships] action (alias: "owned by the user")
-
Endpoint URL address:
/lists/ownerships.json
.
The result is extracted from:{{=response.lists}}
.
The result is paginated.The action has the following user-defined parameters:
- ownerships: Specify screen name (alias for "screen_name").
The following request parameters will be automatically processed:
-
cursor:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
screen_name:
{{=parameters.get('ownerships')}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-ownerships.
- [Read subscriptions] action
-
Endpoint URL address:
/lists/subscriptions.json
.
The result is extracted from:{{=response.lists}}
.
The result is paginated.The action has the following user-defined parameters:
- subscriptions: Specify screen name (alias for "screen_name").
The following request parameters will be automatically processed:
-
cursor:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
screen_name:
{{=parameters.get('subscriptions')}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-subscriptions.
- [Read memberships] action
-
Endpoint URL address:
/lists/memberships.json
.
The result is extracted from:{{=response.lists}}
.
The result is paginated.The action has the following user-defined parameters:
- memberships: Specify screen name (alias for "screen_name").
The following request parameters will be automatically processed:
-
cursor:
{{=parameters.iterator}}
-
count:
{{=parameters.batchSize}}
-
screen_name:
{{=parameters.get('memberships')}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-memberships.
- [Create] action
-
Endpoint URL address:
/lists/create.json
.
The action uses POST method.The following request parameters will be automatically processed:
-
application/json:
{{=item}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/post-lists-create.
-
application/json:
- [Update] action
-
Endpoint URL address:
/lists/update.json
.
The action uses POST method.The following request parameters will be automatically processed:
-
list_id:
{{=item.id}}
-
application/json:
{{=item}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/post-lists-update.
-
list_id:
- [Delete] action
-
Endpoint URL address:
/lists/destroy.json
.
The action uses POST method.The following request parameters will be automatically processed:
-
list_id:
{{=item.id}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/post-lists-destroy.
-
list_id:
- id
A key field. Template: Id.
- name
Template: ShortText.
- uri
Template: ShortText. A read-only field.
- subscriber_count
Data type: DT_I4 A read-only field.
- member_count
Data type: DT_I4 A read-only field.
- mode
Template: ShortText.
- description
Template: ShortText.
- slug
Template: ShortText. A read-only field.
- full_name
Template: ShortText. A read-only field.
- created_at
Template: DateTime. A read-only field.
- following
Data type: DT_BOOL A read-only field.
- user
Template: User. A read-only field.
- [Read] action
-
Endpoint URL address:
/saved_searches/list.json
.The following request parameters will be automatically processed:
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/get-saved_searches-list.
-
_includeUserParameters:
- [Create] action
-
Endpoint URL address:
/saved_searches/create.json
.
The action uses POST method.The following request parameters will be automatically processed:
-
application/json:
{{=item}}
Documentation: https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-saved_searches-create.
-
application/json:
- [Delete] action
-
Endpoint URL address:
/saved_searches/destroy/{{=item.id}}.json
.
The action uses POST method.Documentation: https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-saved_searches-destroy-id.
- id
A key field. Template: Id.
- created_at
Template: DateTime. A read-only field.
- name
Template: ShortText.
- position
Template: ShortText. A read-only field.
- query
Template: ShortText.
- [Read available] action
-
Endpoint URL address:
/trends/available.json
.The following request parameters will be automatically processed:
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/trends/locations-with-trending-topics/api-reference/get-trends-available.
-
_includeUserParameters:
- [Read closest] action
-
Endpoint URL address:
/trends/closest.json
.The action has the following user-defined parameters:
- closest: Required. Specify latitude,longitude.
The following request parameters will be automatically processed:
-
lat:
{{=parameters.closest.split(',')[0]}}
-
long:
{{=parameters.closest.split(',')[1]}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/trends/locations-with-trending-topics/api-reference/get-trends-closest.
- country
Template: ShortText.
- countryCode
Template: ShortText.
- name
Template: ShortText.
- parentid
Data type: DT_I4
- placeType
Field components:
-
Uses template:
ShortText
. - Contains the following components: code, name.
-
Uses template:
- url
Template: ShortText.
- woeid
Data type: DT_I4
- [Read] action
-
Endpoint URL address:
/geo/search.json
.
The result is extracted from:{{=response.result.places}}
.The following request parameters will be automatically processed:
-
_includeUserParameters:
{{=parameters}}
Documentation: https://developer.twitter.com/en/docs/geo/places-near-location/api-reference/get-geo-search.
-
_includeUserParameters:
The resource includes the fields from the Place template.
- contained_within
Field components:
- An array.
-
Uses template:
Place
.
- Id
Data type: DT_I8 The gathered value is processed with
{{=valueParent && valueParent[field.name + '_str']}}
expression.- ShortText
Data type: DT_WSTR ( length 255 )
- LongText
Data type: DT_WSTR ( length 1000 )
- DateTime
Data type: DT_DBTIMESTAMP The gathered value is processed with
{{=new Date(value)}}
expression.- Urls
Field components:
- An array.
- Contains the following components: url, expanded_url, display_url, indices.
- Symbols
Field components:
- An array.
- Contains the following components: indices, text.
- Media
Field components:
-
Uses template:
Id
. - Contains the following components: id, media_url, media_url_https, url, display_url, expanded_url, sizes, type, indices.
-
Uses template:
- Entity
Field components:
-
Uses template:
Symbols
. - Contains the following components: hashtags, media, symbols, user_mentions, urls.
-
Uses template:
- User
Field components:
-
Uses template:
Id
. - Contains the following components: id, contributors_enabled, created_at, default_profile, default_profile_image, description, entities, favourites_count, follow_request_sent, following, followers_count, friends_count, geo_enabled, is_translator, lang, listed_count, location, name, notifications, profile_background_color, profile_background_image_url, profile_background_image_url_https, profile_background_tile, profile_banner_url, profile_image_url, profile_image_url_https, profile_link_color, profile_sidebar_border_color, profile_sidebar_fill_color, profile_text_color, profile_use_background_image, protected, screen_name, show_all_inline_media, statuses_count, time_zone, url, utc_offset, verified, withheld_in_countries, withheld_scope.
-
Uses template:
- MediaSize
Field components:
-
Uses template:
ShortText
. - Contains the following components: h, resize, w.
-
Uses template:
- Coordinates
Field components:
-
Uses template:
LongText
. - Contains the following components: coordinates, type.
-
Uses template:
- Place
Field components:
-
Uses template:
Coordinates
. - Contains the following components: attributes, bounding_box, country, country_code, full_name, id, name, place_type, url.
-
Uses template:
- Tweet
Field components:
-
Uses template:
Id
. - Contains the following components: id, coordinates, created_at, current_user_retweet, entities, extended_entities, favorite_count, favorited, filter_level, geo, in_reply_to_screen_name, in_reply_to_status_id, in_reply_to_user_id, lang, place, possibly_sensitive, quoted_status_id, scopes, retweet_count, retweeted, source, text, truncated, user, withheld_copyright, withheld_in_countries, withheld_scope.
-
Uses template:
What's New
- New: Included definition for tweet post (Thank you, Steve).
- New: Introduced connection.
Related documentation
COZYROC SSIS+ Components Suite is free for testing in your development environment.
A licensed version can be deployed on-premises, on Azure-SSIS IR and on COZYROC Cloud.