Once you're done, select your twitter app and navigate to the 'Keys and tokens' page. In the 'Consumer Keys' section, click on 'View Keys' button, to get the API key and the API key secret of your app. You can now use those values in your Twitter connection. Using your own application in the Twitter connector. The most powerful Twitter tool for real-time tracking, organizing, and engagement. Reach your audiences and discover the best of Twitter.
-->Twitter is an online social networking service that enables users to send and receive short messages called 'tweets'. Connect to Twitter to manage your tweets. You can perform various actions such as send tweet, search, view followers, etc.
This connector is available in the following products and regions:
Service | Class | Regions |
---|---|---|
Logic Apps | Standard | All Logic Apps regions except the following: - Azure China regions |
Power Automate | Standard | All Power Automate regions except the following: - US Government (GCC High) - China Cloud operated by 21Vianet |
Power Apps | Standard | All Power Apps regions except the following: - US Government (GCC High) - China Cloud operated by 21Vianet |
Contact | |
---|---|
Name | Microsoft |
URL | Microsoft LogicApps Support Microsoft Power Automate Support Microsoft Power Apps Support |
Connector Metadata | |
---|---|
Publisher | Microsoft |
Website | https://twitter.com/ |
Privacy policy | https://twitter.com/privacy |
Authentication and Bring your own application
The Twitter connector now supports multiple authentication types:
- Use default shared application
- Bring your own application
The default shared application uses a Twitter Client application maintained by Microsoft. In this case, when you sign into your Twitter account, you'll be asked to consent to the Microsoft Power Platform application.
With 'Bring your own application' option, you can use your own Twitter OAuth Client application instead of the one managed by Microsoft. Doing so will allow you to control permissions and enable certain limitations on the use of the connector.
To use your own Twitter OAuth Client application with the Twitter connector, you'll need to perform the following steps:
- Create an OAuth client application using Twitter developer page (https://developer.twitter.com)
- Use the application in the Twitter connector
Creating an OAuth Client Application in Twitter
To create your own Twitter OAuth client application, you'll need to first sign in to https://developer.twitter.com.Navigate to the 'Projects & Apps' section which is where you can manage and create twitter applications.This process is explained in Twitter's Twitter Developer Guide. After creating twitter app on developer page following steps are required for proper setup:
- Select your twitter app
- Edit app permissions to enable read and write.
- Edit authentication settings
- Enable 3rd party authentication
- Add 'https://global.consent.azure-apim.net/redirect' for the callback URLs (NOTE: If you are using Fairfax subscription or GCC environment look at 'Fairfax and GCC callbacks' section)
- Set 'Website URL' (required field, but it's value does not affect the flow)
Fairfax and GCC callbacks
If you are using Fairfax subscription or GCC environment add the following URLs for the callback URLs of your Twitter app:
- For Fairfax:
- For GCC:
Once you're done, select your twitter app and navigate to the 'Keys and tokens' page. In the 'Consumer Keys' section, click on 'View Keys' button, to get the API key and the API key secret of your app. You can now use those values in your Twitter connection.
Using your own application in the Twitter connector
Once you create the Twitter OAuth client application, you can use it while creating a Twitter connection.
- Select Bring your own application.
- Specify the Client ID and Client secret values from your application. (Use the API key and the API key secret of your Twitter app)
Click on Sign in to sign into your Twitter account. This will prompt you to sign in to your Twitter account, and then authorize access to the Twitter app that you created above.
LIMITS
The following are some of the limits and restrictions:
- Maximum number of connections per user: 2
- API call rate limit for POST operation: 12 per hour
- API call rate limit for other operations: 600 per hour
- Frequency of trigger polls: 1 hour
- Maximum size of image upload: 5 MB
- Maximum size of video upload: 15 MB
- Maximum number of search results: 100
- Maximum number of new tweets tracked within one polling interval: 5
- Maximum allowed 'Search text' parameter value length is 470
Restrictions of Twitter API
- Search API searches against a sampling of recent Tweets published in the past 7 days
- Standard search API is focused on relevance and not completeness. This means that some Tweets and users may be missing from search results
Additional restrictions for POST operation
Mentioning a @user while posting a tweet is not supported. Specifically, the '@' characters will be stripped while posting a tweet.
General Limits
Name | Value |
---|---|
Connections per account | 2 |
Creating a connection
The connector supports the following authentication types:
Bring your own application | Sign in using your own Twitter app. For more details see 'Authentication and Bring your own application' section on this page. | All regions | Not shareable |
Use default shared application | Sign in using the standard Twitter app. | All regions | Not shareable |
Default [DEPRECATED] | This option is only for older connections without an explicit authentication type, and is only provided for backward compatibility. | All regions | Not shareable |
Bring your own application
Auth ID: byoa
Applicable: All regions
Sign in using your own Twitter app. For more details see 'Authentication and Bring your own application' section on this page.
This is not shareable connection. If the power app is shared with another user, another user will be prompted to create new connection explicitly.
Name | Type | Description |
---|---|---|
Consumer Key | string | Consumer key of your Twitter application |
Consumer Secret | securestring | Client secret of your Twitter application |
Use default shared application
Auth ID: shared-application
Applicable: All regions
Sign in using the standard Twitter app.
This is not shareable connection. If the power app is shared with another user, another user will be prompted to create new connection explicitly.
Default [DEPRECATED]
Applicable: All regions
This option is only for older connections without an explicit authentication type, and is only provided for backward compatibility.
This is not shareable connection. If the power app is shared with another user, another user will be prompted to create new connection explicitly.
Actions
Get followers | This operation gets the list of users that follow a given user. |
Get following | The operation gets the list of people the given user follows. |
Get home timeline | This operation gets the most recent tweets and re-tweets posted by me and my followers. |
Get my followers | This operation gets the list of users who are following me. |
Get my following | This operation gets the list of users that I am following. |
Get user | This operation gets the profile details for a given user, such as user name, description, followers count, and more. |
Get user timeline | This operation gets a list of the most recent tweets posted by a given user. |
Post a tweet | This operation posts a new tweet. |
Retweet | This operation retweets a tweet. |
Search tweets | This operation gets a list of relevant tweets matching the search query. |
Get followers
This operation gets the list of users that follow a given user.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
userName | True | string | Twitter handle for the user. | |
Maximum results | maxResults | integer | Maximum number of users to return. |
Returns
Get following
The operation gets the list of people the given user follows.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
userName | True | string | Twitter handle for the user. | |
Maximum results | maxResults | integer | Maximum number of users to return. |
Returns
Get home timeline
This operation gets the most recent tweets and re-tweets posted by me and my followers.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
maxResults | integer | Maximum number of tweets to return. |
Returns
- response
- array of TweetModel
Get my followers
This operation gets the list of users who are following me.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
maxResults | integer | Maximum number of users to get. |
Returns
- response
- array of UserDetailsModel
Get my following
This operation gets the list of users that I am following.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
maxResults | integer | Maximum number of users to return. |
Returns
- response
- array of UserDetailsModel
Get user
This operation gets the profile details for a given user, such as user name, description, followers count, and more.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
userName | True | string | Twitter handle for the user. |
Returns
Represents a user.
- Body
- UserDetailsModel
Get user timeline
This operation gets a list of the most recent tweets posted by a given user.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
userName | True | string | Twitter handle for the user. | |
Maximum results | maxResults | integer | Maximum number of tweets to return. |
Returns
Post a tweet
This operation posts a new tweet.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
tweetText | string | Text to be posted. | ||
Media | body | binary | Media to be posted. |
Returns
Represents the response of a tweet post.
Retweet
This operation retweets a tweet.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
tweetId | True | string | Tweet to be retweeted. | |
Trim user | trimUser | boolean | Boolean to indicate whether to trim user information. |
Returns
Represents the response of a tweet post.
Search tweets
This operation gets a list of relevant tweets matching the search query.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
searchQuery | True | string | Search term like 'happy hour', #haiku, from:@username, love OR hate. | |
Maximum results | maxResults | integer | Maximum number of tweets to return. | |
sinceId | string | Return tweets after the specified tweet ID. |
Returns
- response
- array of TweetModel
Triggers
When a new tweet is posted | This operation triggers a flow when a new tweet that matches a given search query is posted. |
When a new tweet is posted
This operation triggers a flow when a new tweet that matches a given search query is posted.
Parameters
Name | Key | Required | Type | Description |
---|---|---|---|---|
searchQuery | True | string | Search term like 'happy hour', #haiku, from:@username, love OR hate. |
Returns
Represents a wrapper object for batch trigger response
- Body
- TriggerBatchResponse[TweetModel]
Definitions
TweetModel
Represents a tweet post.
Name | Path | Type | Description |
---|---|---|---|
TweetText | string | Text content of the tweet | |
Tweet id | TweetId | string | Id of the tweet |
CreatedAtIso | string | Time at which the tweet was posted | |
Retweet count | RetweetCount | integer | Total number of re-tweets for the tweet |
TweetedBy | string | Name of the user who has posted the tweet | |
Media urls | MediaUrls | array of string | Url of the media posted along with the tweet |
TweetLanguageCode | string | Language code of the tweet | |
in_reply_to_user_id | TweetInReplyToUserId | string | User Id of the author of the tweet that the current tweet is a reply to |
Favorited | boolean | Indicates whether the tweet is marked as favorited or not | |
User mentions | UserMentions | array of UserMentionsModel | List of users mentioned in the tweet |
OriginalTweet | OriginalTweetModel | Represents an original tweet post. | |
UserDetails | UserDetails | UserDetailsModel | Represents a user. |
UserMentionsModel
Represents a user mentioned in a tweet.
Name | Path | Type | Description |
---|---|---|---|
Id | integer | Twitter id (handle) of the user | |
Mentioned user full name | FullName | string | Full name of the user |
UserName | string | Screen name of the user |
OriginalTweetModel
Represents an original tweet post.
Name | Path | Type | Description |
---|---|---|---|
TweetText | string | Text content of the original retrieved tweet | |
Original tweet id | TweetId | string | Id of the original tweet |
CreatedAtIso | string | Time at which original tweet was posted | |
Original tweet retweet count | RetweetCount | integer | Total number of re-tweets for this original tweet |
TweetedBy | string | User name of the person who posted the original tweet | |
Original tweet media urls | MediaUrls | array of string | Url of the media posted along with the original tweet |
TweetLanguageCode | string | Language code for the original tweet | |
Original tweet in_reply_to_user_id | TweetInReplyToUserId | string | User Id of the author of the tweet that the current original tweet is a reply to |
Favorited | boolean | Indicates whether the original tweet is marked as favorited | |
Original tweet user mentions | UserMentions | array of OriginalTweetUserMentionsModel | The list of user mentioned in the tweet |
UserDetails | OriginalTweetUserDetailsModel | Represents a user who posted an original tweet |
UserDetailsModel
Represents a user.
Name | Path | Type | Description |
---|---|---|---|
FullName | string | Name of the user | |
Location | Location | string | Location of the user |
Id | integer | Twitter id (handle) of the user | |
User name | UserName | string | Screen name of the user |
FollowersCount | integer | Number of followers | |
Description | Description | string | User description |
StatusesCount | integer | User status count | |
Friends count | FriendsCount | integer | Number of friends |
FavouritesCount | integer | Number of tweets that the user has favorited | |
Profile image url | ProfileImageUrl | string | Url of the profile image |
OriginalTweetUserMentionsModel
Represents a user mentioned in an original tweet.
Name | Path | Type | Description |
---|---|---|---|
Id | integer | Twitter id (handle) of the user | |
Original tweet mentioned user full name | FullName | string | Full name of the user |
UserName | string | Screen name of the user |
OriginalTweetUserDetailsModel
Represents a user who posted an original tweet
Name | Path | Type | Description |
---|---|---|---|
FullName | string | Name of the user | |
Original tweet user Location | Location | string | Location of the user |
Id | integer | Twitter id (handle) of the user | |
Original tweet user name | UserName | string | Screen name of the user |
FollowersCount | integer | Number of followers | |
Original tweet user Description | Description | string | User description |
StatusesCount | integer | User status count | |
Original tweet user friends count | FriendsCount | integer | Number of friends |
FavouritesCount | integer | Number of tweets that the user has favorited | |
Original tweet user profile image url | ProfileImageUrl | string | Url of the profile image |
TweetResponseModel
Represents the response of a tweet post.
Name | Path | Type | Description |
---|---|---|---|
TweetId | string | ID of the tweet posted |
TriggerBatchResponse[TweetModel]
Represents a wrapper object for batch trigger response
Twitter Download
Name | Path | Type | Description |
---|---|---|---|
value | array of TweetModel | A list of the response objects |