Allows a Consumer application to use an OAuth request_token to request user authorization. This method is a replacement of Section 6.2 of the OAuth 1.0 authentication flow for applications using the callback authentication flow. The method will use the currently logged in user as the account for access authorization unless the force_login parameter is set to true.This method differs from GET oauth / authorize in that if the user has already granted the application permission, the redirect will occur without the user having to re-approve the application. To realize this behavior, you must enable the Use Sign in with Twitter setting on your application record.
Name | Required | type |
---|---|---|
force_login | false | boolean |
screen_name | false | string |
https://developer.twitter.com/en/docs/basics/authentication/api-reference/authenticate
Allows a Consumer application to use an OAuth Request Token to request user authorization. This method fulfills Section 6.2 of the OAuth 1.0 authentication flow. Desktop applications must use this method (and cannot use GET oauth / authenticate). Usage Note: An oauth_callback is never sent to this method, provide it to POST oauth / request_token instead.
Name | Required | type |
---|---|---|
force_login | false | boolean |
screen_name | false | string |
https://developer.twitter.com/en/docs/basics/authentication/api-reference/authorize
Allows a Consumer application to exchange the OAuth Request Token for an OAuth Access Token. This method fulfills Section 6.3 of the OAuth 1.0 authentication flow.
Name | Required | type |
---|---|---|
oauth_verifier | false | string |
https://developer.twitter.com/en/docs/basics/authentication/api-reference/access_token
Allows a registered application to revoke an issued OAuth access_token by presenting its client credentials. Once an access_token has been invalidated, new creation attempts will yield a different Access Token and usage of the invalidated token will no longer be allowed.
Name | Required | type |
---|---|---|
access_token | true | string |
access_token_secret | true | string |
https://developer.twitter.com/en/docs/basics/authentication/api-reference/invalidate_access_token
Allows a registered application to revoke an issued oAuth 2.0 Bearer Token by presenting its client credentials. Once a Bearer Token has been invalidated, new creation attempts will yield a different Bearer Token and usage of the invalidated token will no longer be allowed.Successful responses include a JSON-structure describing the revoked Bearer Token.
Name | Required | type |
---|---|---|
access_token | true | string |
https://developer.twitter.com/en/docs/basics/authentication/api-reference/invalidate_bearer_token
Allows a Consumer application to obtain an OAuth Request Token to request user authorization. This method fulfills Section 6.1 of the OAuth 1.0 authentication flow.
Name | Required | type |
---|---|---|
oauth_callback | false | string |
x_auth_access_type | false | string |
https://developer.twitter.com/en/docs/basics/authentication/api-reference/request_token
Allows a registered application to obtain an OAuth 2 Bearer Token, which can be used to make API requests on an application's own behalf, without a user context. This is called Application-only authentication. A Bearer Token may be invalidated using oauth2/invalidate_token. Once a Bearer Token has been invalidated, new creation attempts will yield a different Bearer Token and usage of the previous token will no longer be allowed. Only one bearer token may exist outstanding for an application, and repeated requests to this method will yield the same already-existent token until it has been invalidated. Successful responses include a JSON-structure describing the awarded Bearer Token. Tokens received by this method should be cached. If attempted too frequently, requests will be rejected with a HTTP 403 with code 99.
Name | Required | type |
---|---|---|
grant_type | true | string |
https://developer.twitter.com/en/docs/basics/authentication/api-reference/token
Returns the current rate limits for methods belonging to the specified resource families.
Name | Required | type |
---|---|---|
resources | false | string |
Returns all lists the authenticating or specified user subscribes to, including their own. The user is specified using the user_id or screen_name parameters. If no user is given, the authenticating user is used.A maximum of 100 results will be returned by this call. Subscribed lists are returned first, followed by owned lists. This means that if a user subscribes to 90 lists and owns 20 lists, this method returns 90 subscriptions and 10 owned lists. The reverse method returns owned lists first, so with reverse=true, 20 owned lists and 80 subscriptions would be returned. If your goal is to obtain every list a user owns or subscribes to, use GET lists / ownerships and/or GET lists / subscriptions instead.
Name | Required | type |
---|---|---|
user_id | false | number |
screen_name | false | string |
reverse | false | boolean |
members/* Returns the members of the specified list. Private list members will only be shown if the authenticated user owns the specified list.
Name | Required | type |
---|---|---|
list_id | true | number |
slug | true | string |
owner_screen_name | false | string |
owner_id | false | number |
count | false | number |
cursor | false | number |
include_entities | false | boolean |
skip_status | false | boolean |
Check if the specified user is a member of the specified list.
Name | Required | type |
---|---|---|
list_id | true | number |
slug | true | string |
user_id | true | number |
screen_name | true | string |
owner_screen_name | false | string |
owner_id | false | number |
include_entities | false | boolean |
skip_status | false | boolean |
Returns the lists the specified user has been added to. If user_id or screen_name are not provided, the memberships for the authenticating user are returned.
Name | Required | type |
---|---|---|
user_id | false | number |
screen_name | false | string |
count | false | number |
cursor | false | number |
filter_to_owned_lists | false | number |
Returns the lists owned by the specified Twitter user. Private lists will only be shown if the authenticated user is also the owner of the lists.
Name | Required | type |
---|---|---|
user_id | false | number |
screen_name | false | string |
count | false | number |
cursor | false | number |
Returns the specified list. Private lists will only be shown if the authenticated user owns the specified list.
Name | Required | type |
---|---|---|
list_id | true | number |
slug | true | string |
owner_screen_name | false | string |
owner_id | false | number |
Returns a timeline of tweets authored by members of the specified list. Retweets are included by default. Use the include_rts=false parameter to omit retweets. Embedded Timelines is a great way to embed list timelines on your website.
Name | Required | type |
---|---|---|
list_id | true | number |
slug | true | string |
owner_screen_name | false | string |
owner_id | false | number |
since_id | false | number |
max_id | false | number |
count | false | number |
include_entities | false | boolean |
include_rts | false | number |
subscribers/* Returns the subscribers of the specified list. Private list subscribers will only be shown if the authenticated user owns the specified list.
Name | Required | type |
---|---|---|
list_id | true | number |
slug | true | string |
owner_screen_name | false | string |
owner_id | false | number |
count | false | number |
cursor | false | number |
include_entities | false | boolean |
skip_status | false | boolean |
Check if the specified user is a subscriber of the specified list. Returns the user if they are a subscriber.
Name | Required | type |
---|---|---|
owner_screen_name | false | string |
owner_id | false | number |
list_id | true | number |
slug | true | string |
user_id | true | number |
screen_name | true | string |
include_entities | false | boolean |
skip_status | false | boolean |
Obtain a collection of the lists the specified user is subscribed to, 20 lists per page by default. Does not include the user's own lists.
Name | Required | type |
---|---|---|
user_id | false | number |
screen_name | false | string |
count | false | number |
cursor | false | number |
Creates a new list for the authenticated user. Note that you can create up to 1000 lists per account.
Name | Required | type |
---|---|---|
name | true | number |
mode | false | number |
description | false | number |
Deletes the specified list. The authenticated user must own the list to be able to destroy it.
Name | Required | type |
---|---|---|
owner_screen_name | false | string |
owner_id | false | number |
list_id | true | number |
slug | true | string |
Add a member to a list. The authenticated user must own the list to be able to add members to it. Note that lists cannot have more than 5,000 members.
Name | Required | type |
---|---|---|
list_id | true | number |
slug | true | string |
user_id | true | number |
screen_name | true | string |
owner_screen_name | false | string |
owner_id | false | number |
Adds multiple members to a list, by specifying a comma-separated list of member ids or screen names. The authenticated user must own the list to be able to add members to it. Note that lists can't have more than 5,000 members, and you are limited to adding up to 100 members to a list at a time with this method.Please note that there can be issues with lists that rapidly remove and add memberships. Take care when using these methods such that you are not too rapidly switching between removals and adds on the same list.
Name | Required | type |
---|---|---|
list_id | true | number |
slug | true | string |
user_id | false | number |
screen_name | false | string |
owner_screen_name | false | string |
owner_id | false | number |
Removes the specified member from the list. The authenticated user must be the list's owner to remove members from the list.
Name | Required | type |
---|---|---|
list_id | false | number |
slug | false | string |
user_id | false | number |
screen_name | false | string |
owner_screen_name | false | string |
owner_id | false | number |
Removes multiple members from a list, by specifying a comma-separated list of member ids or screen names. The authenticated user must own the list to be able to remove members from it. Note that lists can't have more than 500 members, and you are limited to removing up to 100 members to a list at a time with this method.Please note that there can be issues with lists that rapidly remove and add memberships. Take care when using these methods such that you are not too rapidly switching between removals and adds on the same list.
Name | Required | type |
---|---|---|
list_id | true | number |
slug | true | string |
user_id | false | number |
screen_name | false | string |
owner_screen_name | false | string |
owner_id | false | number |
Subscribes the authenticated user to the specified list.
Name | Required | type |
---|---|---|
owner_screen_name | false | string |
owner_id | false | number |
list_id | true | number |
slug | true | string |
Unsubscribes the authenticated user from the specified list.
Name | Required | type |
---|---|---|
list_id | true | number |
slug | true | string |
owner_screen_name | false | string |
owner_id | false | number |
Updates the specified list. The authenticated user must own the list to be able to update it.
Name | Required | type |
---|---|---|
list_id | true | number |
slug | true | string |
name | false | number |
mode | false | number |
description | false | number |
owner_screen_name | false | string |
owner_id | false | number |
Returns a cursored collection of user IDs for every user following the specified user. At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. Results are given in groups of 5,000 user IDs and multiple "pages" of results can be navigated through using the next_cursor value in subsequent requests. See Using cursors to navigate collections for more information.This method is especially powerful when used in conjunction with GET users / lookup, a method that allows you to convert user IDs into full user objects in bulk.
Name | Required | type |
---|---|---|
user_id | false | number |
screen_name | false | string |
cursor | false | number |
stringify_ids | false | boolean |
count | false | number |
Returns a cursored collection of user objects for users following the specified user. At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. Results are given in groups of 20 users and multiple "pages" of results can be navigated through using the next_cursor value in subsequent requests. See Using cursors to navigate collections for more information.
Name | Required | type |
---|---|---|
user_id | false | number |
screen_name | false | string |
cursor | false | number |
count | false | number |
skip_status | false | boolean |
include_user_entities | false | boolean |
Returns a cursored collection of user IDs for every user the specified user is following (otherwise known as their "friends").At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. Results are given in groups of 5,000 user IDs and multiple "pages" of results can be navigated through using the next_cursor value in subsequent requests. See Using cursors to navigate collections for more information.This method is especially powerful when used in conjunction with GET users / lookup, a method that allows you to convert user IDs into full user objects in bulk.
Name | Required | type |
---|---|---|
user_id | false | number |
screen_name | false | string |
cursor | false | number |
stringify_ids | false | boolean |
count | false | number |
Returns a cursored collection of user objects for every user the specified user is following (otherwise known as their "friends").At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues. Results are given in groups of 20 users and multiple "pages" of results can be navigated through using the next_cursor value in subsequent requests. See Using cursors to navigate collections for more information.
Name | Required | type |
---|---|---|
user_id | false | number |
screen_name | false | string |
cursor | false | number |
count | false | number |
skip_status | false | boolean |
include_user_entities | false | boolean |
Returns a collection of numeric IDs for every user who has a pending request to follow the authenticating user.
Name | Required | type |
---|---|---|
cursor | false | number |
Returns the relationships of the authenticating user to the comma-separated list of up to 100 screen_names or user_ids provided. Values for connections can be: following, following_requested, followed_by, none, blocking, muting.
Name | Required | type |
---|---|---|
cursor | false | number |
stringify_ids | false | boolean |
Returns a collection of user_ids that the currently authenticated user does not want to receive retweets from.Use POST friendships / update to set the "no retweets" status for a given user account on behalf of the current user.
Name | Required | type |
---|---|---|
stringify_ids | false | boolean |
Returns a collection of numeric IDs for every protected user for whom the authenticating user has a pending follow request.
Name | Required | type |
---|---|---|
cursor | false | number |
stringify_ids | false | boolean |
Returns detailed information about the relationship between two arbitrary users.
Name | Required | type |
---|---|---|
source_id | false | number |
source_screen_name | false | string |
target_id | false | number |
target_screen_name | false | string |
Returns fully-hydrated user objects for up to 100 users per request, as specified by comma-separated values passed to the user_id and/or screen_name parameters.This method is especially useful when used in conjunction with collections of user IDs returned from GET friends / ids and GET followers / ids.GET users / show is used to retrieve a single user object.There are a few things to note when using this method. You must be following a protected user to be able to see their most recent status update. If you don't follow a protected user their status will be removed. The order of user IDs or screen names may not match the order of users in the returned array. If a requested user is unknown, suspended, or deleted, then that user will not be returned in the results list. If none of your lookup criteria can be satisfied by returning a user object, a HTTP 404 will be thrown. You are strongly encouraged to use a POST for larger requests.
Name | Required | type |
---|---|---|
screen_name | false | string |
user_id | false | string |
include_entities | false | boolean |
tweet_mode | false | boolean |
Provides a simple, relevance-based search interface to public user accounts on Twitter. Try querying by topical interest, full name, company name, location, or other criteria. Exact match searches are not supported.Only the first 1,000 matching results are available.
Name | Required | type |
---|---|---|
q | true | string |
page | false | number |
count | false | number |
include_entities | false | boolean |
Returns a variety of information about the user specified by the required user_id or screen_name parameter. The author's most recent Tweet will be returned inline when possible.GET users / lookup is used to retrieve a bulk collection of user objects.You must be following a protected user to be able to see their most recent Tweet. If you don't follow a protected user, the user's Tweet will be removed. A Tweet will not always be returned in the current_status field.
Name | Required | type |
---|---|---|
user_id | false | number |
screen_name | false | string |
include_entities | false | boolean |
Allows the authenticating user to follow (friend) the user specified in the ID parameter.Returns the followed user when successful. Returns a string describing the failure condition when unsuccessful. If the user is already friends with the user a HTTP 403 may be returned, though for performance reasons this method may also return a HTTP 200 OK message even if the follow relationship already exists.Actions taken in this method are asynchronous. Changes will be eventually consistent.
Name | Required | type |
---|---|---|
screen_name | false | string |
user_id | false | number |
follow | false | boolean |
Allows the authenticating user to unfollow the user specified in the ID parameter. Returns the unfollowed user when successful. Returns a string describing the failure condition when unsuccessful. Actions taken in this method are asynchronous. Changes will be eventually consistent.
Name | Required | type |
---|---|---|
screen_name | false | string |
user_id | false | number |
Enable or disable Retweets and device notifications from the specified user.
Name | Required | type |
---|---|---|
screen_name | false | string |
user_id | false | number |
device | false | boolean |
retweets | false | boolean |
Returns settings (including current trend, geo and sleep time information) for the authenticating user.
Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful; returns a 401 status code and an error message if not. Use this method to test if supplied user credentials are valid.
Name | Required | type |
---|---|---|
include_entities | false | boolean |
skip_status | false | boolean |
include_email | false | boolean |
Returns the authenticated user's saved search queries.
Retrieve the information for the saved search represented by the given id. The authenticating user must be the owner of saved search ID being requested.
Name | Required | type |
---|---|---|
id | true | number |
Returns a map of the available size variations of the specified user's profile banner. If the user has not uploaded a profile banner, a HTTP 404 will be served instead. This method can be used instead of string manipulation on the profile_banner_url returned in user objects as described in Profile Images and Banners. The profile banner data available at each size variant's URL is in PNG format.
Name | Required | type |
---|---|---|
user_id | false | number |
screen_name | false | string |
Removes the uploaded profile banner for the authenticating user. Returns HTTP 200 upon success.
Sets some values that users are able to set under the "Account" tab of their settings page. Only the parameters specified will be updated.
Name | Required | type |
---|---|---|
name | false | string |
url | false | string |
location | false | string |
description | false | string |
include_entities | false | boolean |
skip_status | false | boolean |
Updates the authenticating user's profile background image. This method can also be used to enable or disable the profile background image.Although each parameter is marked as optional, at least one of image or media_id must be provided when making this request.Learn more about the deprecation of this endpoint via our forum post.
Name | Required | type |
---|---|---|
image | false | number |
tile | false | number |
include_entities | false | boolean |
skip_status | false | boolean |
media_id | false | number |
Uploads a profile banner on behalf of the authenticating user. More information about sizing variations can be found in User Profile Images and Banners and GET users / profile_banner.Profile banner images are processed asynchronously. The profile_banner_url and its variant sizes will not necessary be available directly after upload.
Name | Required | type |
---|---|---|
banner | true | number |
width | false | number |
height | false | number |
offset_left | false | number |
offset_top | false | number |
Updates the authenticating user's profile image. Note that this method expects raw multipart data, not a URL to an image. This method asynchronously processes the uploaded file before updating the user's profile image URL. You can either update your local cache the next time you request the user's information, or, at least 5 seconds after uploading the image, ask for the updated URL using GET users / show.
Name | Required | type |
---|---|---|
image | true | number |
include_entities | false | boolean |
skip_status | false | boolean |
Create a new saved search for the authenticated user. A user may only have 25 saved searches.
Name | Required | type |
---|---|---|
query | true | number |
Destroys a saved search for the authenticating user. The authenticating user must be the owner of saved search id being destroyed.
Name | Required | type |
---|---|---|
id | true | number |
Returns an array of numeric user ids the authenticating user is blocking. Important This method is cursored, meaning your app must make multiple requests in order to receive all blocks correctly. See Using cursors to navigate collections for more details on how cursoring works.
Returns a collection of user objects that the authenticating user is blocking. Important This method is cursored, meaning your app must make multiple requests in order to receive all blocks correctly. See Using cursors to navigate collections for more details on how cursoring works.
Returns an array of numeric user ids the authenticating user has muted.
Returns an array of user objects the authenticating user has muted.
Blocks the specified user from following the authenticating user. In addition the blocked user will not show in the authenticating users mentions or timeline (unless retweeted by another user). If a follow or friend relationship exists it is destroyed.The URL pattern /version/block/create/:screen_name_or_user_id.format is still accepted but not recommended. As a sequence of numbers is a valid screen name we recommend using the screen_name or user_id parameter instead.
Name | Required | type |
---|---|---|
screen_name | false | string |
user_id | false | number |
include_entities | false | boolean |
skip_status | false | boolean |
Un-blocks the user specified in the ID parameter for the authenticating user. Returns the un-blocked user when successful. If relationships existed before the block was instantiated, they will not be restored.
Name | Required | type |
---|---|---|
screen_name | false | string |
user_id | false | number |
include_entities | false | boolean |
skip_status | false | boolean |
Mutes the user specified in the ID parameter for the authenticating user. Returns the muted user when successful. Returns a string describing the failure condition when unsuccessful.Actions taken in this method are asynchronous. Changes will be eventually consistent.
Name | Required | type |
---|---|---|
screen_name | false | string |
user_id | false | number |
Un-mutes the user specified in the ID parameter for the authenticating user. Returns the unmuted user when successful. Returns a string describing the failure condition when unsuccessful.Actions taken in this method are asynchronous. Changes will be eventually consistent.
Name | Required | type |
---|---|---|
screen_name | false | string |
user_id | false | number |
Report the specified user as a spam account to Twitter. Additionally, optionally performs the equivalent of POST blocks / create on behalf of the authenticated user.
Name | Required | type |
---|---|---|
screen_name | false | string |
user_id | false | number |
perform_block | false | boolean |
Retrieve the identified Collection, presented as a list of the Tweets curated within. The response structure of this method differs significantly from timelines you may be used to working with elsewhere in the Twitter API.To navigate a Collection, use the position object of a response, which includes attributes for max_position, min_position, and was_truncated. was_truncated indicates whether additional Tweets exist in the collection outside of the range of the current request. To retrieve Tweets further back in time, use the value of min_position found in the current response as the max_position parameter in the next call to this endpoint.
Name | Required | type |
---|---|---|
id | true | string |
count | false | number |
max_position | false | number |
min_position | false | number |
Find Collections created by a specific user or containing a specific curated Tweet.Results are organized in a cursored collection.
Name | Required | type |
---|---|---|
user_id | true | number |
screen_name | true | string |
tweet_id | false | number |
count | false | number |
cursor | false | string |
https://developer.twitter.com/en/docs/tweets/curate-a-collection/api-reference/get-collections-list
Retrieve information associated with a specific Collection.
Name | Required | type |
---|---|---|
id | true | string |
https://developer.twitter.com/en/docs/tweets/curate-a-collection/api-reference/get-collections-show
Create a Collection owned by the currently authenticated user. The API endpoint may refuse to complete the request if the authenticated user has exceeded the total number of allowed collections for their account.
Name | Required | type |
---|---|---|
name | true | string |
description | false | string |
url | false | string |
timeline_order | false | string |
Permanently delete a Collection owned by the currently authenticated user.
Name | Required | type |
---|---|---|
id | true | string |
Add a specified Tweet to a Collection.A collection will store up to a few thousand Tweets. Adding a Tweet to a collection beyond its allowed capacity will remove the oldest Tweet in the collection based on the time it was added to the collection.Use POST collections / entries / curate to add Tweets to a Collection in bulk.
Name | Required | type |
---|---|---|
id | true | string |
tweet_id | true | number |
relative_to | false | number |
above | false | boolean |
Curate a Collection by adding or removing Tweets in bulk. Updates must be limited to 100 cumulative additions or removals per request. Use POST collections / entries / add and POST collections / entries / remove to add or remove a single Tweet.
Move a specified Tweet to a new position in a curation_reverse_chron ordered collection.
Name | Required | type |
---|---|---|
id | true | string |
tweet_id | true | number |
relative_to | true | number |
above | false | boolean |
Remove the specified Tweet from a Collection.Use POST collections / entries / curate to remove Tweets from a Collection in bulk.
Name | Required | type |
---|---|---|
id | true | string |
tweet_id | true | number |
Update information concerning a Collection owned by the currently authenticated user. Partial updates are not currently supported: please provide name, description, and url whenever using this method. Omitted description or url parameters will be treated as if an empty string was passed, overwriting any previously stored value for the Collection.
Name | Required | type |
---|---|---|
id | true | string |
name | false | string |
description | false | string |
url | false | string |
Returns a collection of the most recent Tweets and Retweets posted by the authenticating user and the users they follow. The home timeline is central to how most users interact with the Twitter service.Up to 800 Tweets are obtainable on the home timeline. It is more volatile for users that follow many users or follow users who Tweet frequently. See Working with Timelines for instructions on traversing timelines efficiently.
Name | Required | type |
---|---|---|
count | false | number |
since_id | false | number |
max_id | false | number |
trim_user | false | boolean |
exclude_replies | false | boolean |
include_entities | false | boolean |
tweet_mode | false | string |
https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-home_timeline
Important notice: On June 19, 2019, we began enforcing a limit of 100,000 requests per day to the /statuses/mentions_timeline endpoint. This is in addition to existing user-level rate limits (75 requests / 15-minutes). This limit is enforced on a per-application basis, meaning that a single developer app can make up to 100,000 calls during any single 24-hour period.Returns the 20 most recent mentions (Tweets containing a users's @screen_name) for the authenticating user. The timeline returned is the equivalent of the one seen when you view your mentions on twitter.com.This method can only return up to 800 tweets. See Working with Timelines for instructions on traversing timelines.
Name | Required | type |
---|---|---|
count | false | number |
since_id | false | number |
max_id | false | number |
trim_user | false | boolean |
include_entities | false | boolean |
tweet_mode | false | string |
https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-mentions_timeline
Important notice: On June 19, 2019, we began enforcing a limit of 100,000 requests per day to the /statuses/user_timeline endpoint, in addition to existing user-level and app-level rate limits. This limit is applied on a per-application basis, meaning that a single developer app can make up to 100,000 calls during any single 24-hour period.Returns a collection of the most recent Tweets posted by the user indicated by the screen_name or user_id parameters.User timelines belonging to protected users may only be requested when the authenticated user either "owns" the timeline or is an approved follower of the owner.The timeline returned is the equivalent of the one seen as a user's profile on Twitter.This method can only return up to 3,200 of a user's most recent Tweets. Native retweets of other statuses by the user is included in this total, regardless of whether include_rts is set to false when requesting this resource.See Working with Timelines for instructions on traversing timelines.See Embedded Timelines, Embedded Tweets, and GET statuses/oembed for tools to render Tweets according to Display Requirements.
Name | Required | type |
---|---|---|
user_id | false | number |
screen_name | false | string |
since_id | false | number |
count | false | number |
max_id | false | number |
trim_user | false | boolean |
exclude_replies | false | boolean |
include_rts | false | boolean |
tweet_mode | false | string |
https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-user_timeline
Note: favorites are now known as likes. Returns the 20 most recent Tweets liked by the authenticating or specified user.
Name | Required | type |
---|---|---|
user_id | false | number |
screen_name | false | string |
count | false | number |
since_id | false | number |
max_id | false | number |
include_entities | false | boolean |
tweet_mode | false | string |
https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-favorites-list
Returns fully-hydrated Tweet objects for up to 100 Tweets per request, as specified by comma-separated values passed to the id parameter.This method is especially useful to get the details (hydrate) a collection of Tweet IDs.GET statuses / show / :id is used to retrieve a single Tweet object.There are a few things to note when using this method. You must be following a protected user to be able to see their most recent Tweets. If you don't follow a protected user their status will be removed. The order of Tweet IDs may not match the order of Tweets in the returned array. If a requested Tweet is unknown or deleted, then that Tweet will not be returned in the results list, unless the map parameter is set to true, in which case it will be returned with a value of null. If none of your lookup criteria matches valid Tweet IDs an empty array will be returned for map=false. You are strongly encouraged to use a POST for larger requests.
Name | Required | type |
---|---|---|
id | true | string |
include_entities | false | boolean |
trim_user | false | boolean |
map | false | boolean |
include_ext_alt_text | false | boolean |
include_card_uri | false | boolean |
tweet_mode | false | string |
https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-lookup
Returns a collection of up to 100 user IDs belonging to users who have retweeted the Tweet specified by the id parameter. This method offers similar data to GET statuses / retweets / :id.
Name | Required | type |
---|---|---|
id | true | number |
count | false | number |
cursor | false | number |
stringify_ids | false | boolean |
Returns a collection of the 100 most recent retweets of the Tweet specified by the id parameter.
Name | Required | type |
---|---|---|
id | true | number |
count | false | number |
trim_user | false | boolean |
tweet_mode | false | string |
https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-retweets-id
Returns the most recent Tweets authored by the authenticating user that have been retweeted by others. This timeline is a subset of the user's GET statuses / user_timeline.
Name | Required | type |
---|---|---|
count | false | number |
since_id | false | number |
max_id | false | number |
trim_user | false | boolean |
include_entities | false | boolean |
include_user_entities | false | boolean |
tweet_mode | false | string |
Returns a single Tweet, specified by the id parameter. The Tweet's author will also be embedded within the Tweet. See GET statuses / lookup for getting Tweets in bulk (up to 100 per call). See also Embedded Timelines, Embedded Tweets, and GET statuses/oembed for tools to render Tweets according to Display Requirements. About GeoIf there is no geotag for a status, then there will be an empty or "geo" : {}. This can only be populated if the user has used the Geotagging API to send a statuses/update. The JSON response mostly uses conventions laid out in GeoJSON. The coordinates that Twitter renders are reversed from the GeoJSON specification (GeoJSON specifies a longitude then a latitude, whereas Twitter represents it as a latitude then a longitude), eg: "geo": { "type":"Point", "coordinates":[37.78029, -122.39697] }
Name | Required | type |
---|---|---|
id | true | number |
trim_user | false | boolean |
include_my_retweet | false | boolean |
include_entities | false | boolean |
include_ext_alt_text | false | boolean |
include_card_uri | false | boolean |
tweet_mode | false | string |
https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-show-id
Note: favorites are now known as likes.Favorites (likes) the Tweet specified in the ID parameter as the authenticating user. Returns the favorite Tweet when successful.The process invoked by this method is asynchronous. The immediately returned Tweet object may not indicate the resultant favorited status of the Tweet. A 200 OK response from this method will indicate whether the intended action was successful or not.
Name | Required | type |
---|---|---|
id | true | number |
include_entities | false | boolean |
tweet_mode | false | string |
https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-favorites-create
Note: favorites are now known as likes.Unfavorites (un-likes) the Tweet specified in the ID parameter as the authenticating user. Returns the un-liked Tweet when successful.The process invoked by this method is asynchronous. The immediately returned Tweet object may not indicate the resultant favorited status of the Tweet. A 200 OK response from this method will indicate whether the intended action was successful or not.
Name | Required | type |
---|---|---|
id | true | number |
include_entities | false | boolean |
tweet_mode | false | string |
https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-favorites-destroy
Destroys the status specified by the required ID parameter. The authenticating user must be the author of the specified status. Returns the destroyed status if successful.
Name | Required | type |
---|---|---|
id | true | number |
trim_user | false | boolean |
tweet_mode | false | string |
https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-statuses-destroy-id
Returns a single Tweet, specified by either a Tweet web URL or the Tweet ID, in an oEmbed-compatible format. The returned HTML snippet will be automatically recognized as an Embedded Tweet when Twitter's widget JavaScript is included on the page. The oEmbed endpoint allows customization of the final appearance of an Embedded Tweet by setting the corresponding properties in HTML markup to b einterpreted by Twitter's JavaScript bundled with the HTML response by default. The format of the returned markup may change over time as Twitter adds new features or adjusts its Tweet representation. The Tweet fallback markup is meant to be cached on your servers for upt o the suggested cache lifetime specified in the cache_age.
Name | Required | type |
---|---|---|
url | true | string |
maxwidth | false | number |
hide_media | false | boolean |
hide_thread | false | boolean |
omit_script | false | boolean |
align | false | string |
related | false | string |
lang | false | string |
theme | false | string |
link_color | false | string |
widget_type | false | string |
dnt | false | boolean |
Retweets a tweet. Returns the original Tweet with Retweet details embedded.Usage Notes: This method is subject to update limits. A HTTP 403 will be returned if this limit as been hit. Twitter will ignore attempts to perform duplicate retweets. The retweet_count will be current as of when the payload is generated and may not reflect the exact count. It is intended as an approximation.
Name | Required | type |
---|---|---|
id | true | number |
trim_user | false | boolean |
https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-statuses-retweet-id
Untweets a retweeted status. Returns the original Tweet with Retweet details embedded.Usage Notes: This method is subject to update limits. A HTTP 429 will be returned if this limit has been hit. The untweeted retweet status ID must be authored by the user backing the authentication token. An application must have write privileges to POST. A HTTP 401 will be returned for read-only applications. When passing a source status ID instead of the retweet status ID a HTTP 200 response will be returned with the same Tweet object but no action.
Name | Required | type |
---|---|---|
id | true | number |
trim_user | false | boolean |
tweet_mode | false | string |
Updates the authenticating user's current status, also known as Tweeting. For each update attempt, the update text is compared with the authenticating user's recent Tweets. Any attempt that would result in duplication will be blocked, resulting in a 403 error. A user cannot submit the same status twice in a row. While not rate limited by the API, a user is limited in the number of Tweets they can create at a time. If the number of updates posted by the user reaches the current allowed limit this method will return an HTTP 403 error.About Geo Any geo-tagging parameters in the update will be ignored if geo_enabled for the user is false (this is the default setting for all users, unless the user has enabled geolocation in their settings) The number of digits after the decimal separator passed to lat (up to 8) is tracked so that when the lat is returned in a status object it will have the same number of digits after the decimal separator. Use a decimal point as the separator (and not a decimal comma) for the latitude and the longitude
- usage of a decimal comma will cause the geo-tagged portion of the status update to be dropped. For JSON, the response mostly uses conventions described in GeoJSON. However, the geo object coordinates that Twitter renders are reversed from the GeoJSON specification. GeoJSON specifies a longitude then a latitude, whereas Twitter represents it as a latitude then a longitude: "geo": { "type":"Point", "coordinates":[37.78217, -122.40062] } The coordinates object is replacing the geo object (no deprecation date has been set for the geo object yet) -- the difference is that the coordinates object, in JSON, is now rendered correctly in GeoJSON. If a place_id is passed into the status update, then that place will be attached to the status. If no place_id was explicitly provided, but latitude and longitude are, the API attempts to implicitly provide a place by calling geo/reverse_geocode. Users have the ability to remove all geotags from all their Tweets en masse via the user settings page. Currently there is no method to remove geotags from individual Tweets.
Name | Required | type |
---|---|---|
status | true | string |
in_reply_to_status_id | false | number |
auto_populate_reply_metadata | false | boolean |
exclude_reply_user_ids | false | number |
attachment_url | false | string |
media_ids | false | number |
possibly_sensitive | false | boolean |
lat | false | number |
long | false | number |
place_id | false | string |
display_coordinates | false | boolean |
trim_user | false | boolean |
enable_dmcommands | false | boolean |
fail_dmcommands | false | boolean |
card_uri | false | string |
tweet_mode | false | string |
https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-statuses-update
Returns a collection of relevant Tweets matching a specified query. Please note that Twitter's search service and, by extension, the Search API is not meant to be an exhaustive source of Tweets. Not all Tweets will be indexed or made available via the search interface. To learn how to use Twitter Search effectively, please see the Standard search operators page for a list of available filter operators. Also, see the Working with Timelines page to learn best practices for navigating results by since_id and max_id.
Name | Required | type |
---|---|---|
q | true | string |
geocode | false | string |
lang | false | string |
locale | false | string |
result_type | false | string |
count | false | number |
until | false | string |
since_id | false | number |
max_id | false | number |
include_entities | false | boolean |
https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets
Returns a custom profile that was created with POST custom_profiles/new.json.
Name | Required | type |
---|---|---|
id | true | string |
https://developer.twitter.com/en/docs/direct-messages/custom-profiles/api-reference/get-profile
Returns a single Direct Message event by the given id.
Name | Required | type |
---|---|---|
id | true | string |
https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/get-event
Returns all Direct Message events (both sent and received) within the last 30 days. Sorted in reverse-chronological order.
Name | Required | type |
---|---|---|
count | false | number |
cursor | false | string |
Publishes a new message_create event resulting in a Direct Message sent to a specified user from the authenticating user. Returns an event if successful. Supports publishing Direct Messages with optional Quick Reply and media attachment. Replaces behavior currently provided by POST direct_messages/new.Requires a JSON POST body and Content-Type header to be set to application/json. Setting Content-Length may also be required if it is not automatically.
Name | Required | type |
---|---|---|
event | true | { |
type: string; message_create: { target: { recipient_id: string; }; message_data: { text: string; quick_reply?: { type: string[], }; attachment?: { type: string; media: { id: string; } }; } } } |
https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event
Displays a visual typing indicator in the recipient’s Direct Message conversation view with the sender. Each request triggers a typing indicator animation with a duration of ~3 seconds.
Name | Required | type |
---|---|---|
recipient_id | true | string |
Returns a Welcome Message Rule by the given id.
Name | Required | type |
---|---|---|
id | true | string |
Returns a Welcome Message by the given id.
Name | Required | type |
---|---|---|
id | true | string |
Creates a new Welcome Message that will be stored and sent in the future from the authenticating user in defined circumstances. Returns the message template if successful. Supports publishing with the same elements as Direct Messages (e.g. Quick Replies, media attachments). Requires a JSON POST body and Content-Type header to be set to application/json. Setting Content-Length may also be required if it is not automatically. See the Welcome Messages overview to learn how to work with Welcome Messages.
Name | Required | type |
---|---|---|
welcome_message | true | { |
message_data: { text: string; quick_reply?: { type: string[], }; attachment?: { type: string; media: { id: string; } }; }; name?: string; } | | name | false | string |
Creates a new Welcome Message Rule that determines which Welcome Message will be shown in a given conversation. Returns the created rule if successful. Requires a JSON POST body and Content-Type header to be set to application/json. Setting Content-Length may also be required if it is not automatically. Additional rule configurations are forthcoming. For the initial beta release, the most recently created Rule will always take precedence, and the assigned Welcome Message will be displayed in the conversation.See the Welcome Messages overview to learn how to work with Welcome Messages.
Name | Required | type |
---|---|---|
welcome_message_rule | true | { |
welcome_message_id: string; } |
Returns a list of Welcome Messages.
Name | Required | type |
---|---|---|
count | false | number |
cursor | false | string |
The INIT command request is used to initiate a file upload session. It returns a media_id which should be used to execute all subsequent requests. The next step after a successful return from INIT command is the APPEND command. See the Uploading media guide for constraints and requirements on media files.
Name | Required | type |
---|---|---|
command | true | string |
total_bytes | true | number |
media_type | true | string |
media_category | false | string |
additional_owners | false | string |
The APPEND command is used to upload a chunk (consecutive byte range) of the media file. For example, a 3 MB file could be split into 3 chunks of size 1 MB, and uploaded using 3 APPEND command requests. After the entire file is uploaded, the next step is to call the FINALIZE command.
Name | Required | type |
---|---|---|
command | true | string |
media_id | true | string |
media | false | string |
media_data | false | string |
segment_index | true | string |
The STATUS command is used to periodically poll for updates of media processing operation. After the STATUS command response returns succeeded, you can move on to the next step which is usually create Tweet with media_id.
Name | Required | type |
---|---|---|
command | true | string |
media_id | true | string |
The FINALIZE command should be called after the entire media file is uploaded using APPEND commands. If and (only if) the response of the FINALIZE command contains a processing_info field, it may also be necessary to use a STATUS command and wait for it to return success before proceeding to Tweet creation.
Name | Required | type |
---|---|---|
command | true | string |
media_id | true | string |
Use this endpoint to upload images to Twitter. This endpoint returns a media_id by default and can optionally return a media_key when a media_category is specified. These values are used by Twitter endpoints that accept images. For example, a media_id value can be used to create a Tweet with an attached photo using the POST statuses/update endpoint. All Ads API endpoints require a media_key. For example, a media_key value can be used to create a Draft Tweet with a photo using the POST accounts/:account_id/draft_tweets endpoint.
Name | Required | type |
---|---|---|
media | false | string |
media_data | false | string |
media_category | false | string |
This endpoint can be used to provide additional information about the uploaded media_id. This feature is currently only supported for images and GIFs.
Name | Required | type |
---|---|---|
media_id | true | string |
alt_text | true | { text: string } |
Use this endpoint to dissociate subtitles from a video and delete the subtitles. You can dissociate subtitles from a video before or after Tweeting.
Use this endpoint to associate uploaded subtitles to an uploaded video. You can associate subtitles to video before or after Tweeting. Request flow for associating subtitle to video before the video is Tweeted : 1. Upload video using the chunked upload endpoint and get the video media_id. 2. Upload subtitle using the chunked upload endpoint with media category set to “Subtitles” and get the subtitle media_id. 3. Call this endpoint to associate the subtitle to the video. 4. Create Tweet with the video media_id.
Returns the locations that Twitter has trending topic information for.The response is an array of "locations" that encode the location's WOEID and some other human-readable information such as a canonical name and country the location belongs in.A WOEID is a Yahoo! Where On Earth ID.
Returns the locations that Twitter has trending topic information for, closest to a specified location.The response is an array of "locations" that encode the location's WOEID and some other human-readable information such as a canonical name and country the location belongs in.A WOEID is a Yahoo! Where On Earth ID.
Name | Required | type |
---|---|---|
lat | true | number |
long | true | number |
Returns the top 50 trending topics for a specific WOEID, if trending information is available for it.The response is an array of trend objects that encode the name of the trending topic, the query parameter that can be used to search for the topic on Twitter Search, and the Twitter Search URL.This information is cached for 5 minutes. Requesting more frequently than that will not return any more data, and will count against rate limit usage.The tweet_volume for the last 24 hours is also returned for many trends if this is available.
Name | Required | type |
---|---|---|
id | true | number |
exclude | false | number |
https://developer.twitter.com/en/docs/trends/trends-for-location/api-reference/get-trends-place
Returns all the information about a known place.
Name | Required | type |
---|---|---|
place_id | true | string |
https://developer.twitter.com/en/docs/geo/place-information/api-reference/get-geo-id-place_id
Given a latitude and a longitude, searches for up to 20 places that can be used as a place_id when updating a status.This request is an informative call and will deliver generalized results about geography.
https://developer.twitter.com/en/docs/geo/places-near-location/api-reference/get-geo-reverse_geocode
Search for places that can be attached to a Tweet via POST statuses/update. Given a latitude and a longitude pair, an IP address, or a name, this request will return a list of all the valid places that can be used as the place_id when updating a status.Conceptually, a query can be made from the user's location, retrieve a list of places, have the user validate the location they are at, and then send the ID of this location with a call to POST statuses/update.This is the recommended method to use find places that can be attached to statuses/update. Unlike GET geo/reverse_geocode which provides raw data access, this endpoint can potentially re-order places with regards to the user who is authenticated. This approach is also preferred for interactive place matching with the user.Some parameters in this method are only required based on the existence of other parameters. For instance, "lat" is required if "long" is provided, and vice-versa. Authentication is recommended, but not required with this method.
https://developer.twitter.com/en/docs/geo/places-near-location/api-reference/get-geo-search
The metrics field allows developers to access public and private engagement metrics for Tweet and media objects. Public metrics are accessible by anyone with a developer account while private metrics are accessible from owned/authorized accounts (definition below).
Name | Required | type |
---|---|---|
ids | true | string |
tweet.fields | false | string |
media.fields | false | string |
expansions | false | string |
https://developer.twitter.com/en/docs/twitter-api/metrics
Creates a Tweet on behalf of an authenticated user.
Name | Required | type |
---|---|---|
text | true | string |
direct_message_deep_link | false | string |
for_super_followers_only | false | boolean |
geo | false | { |
place_id: string } | | media | false | { media_ids: string[]; tagged_user_ids?: string[]; } | | poll | false | { options: string[]; duration_minutes: number; } | | quote_tweet_id | false | string | | reply | false | { exclude_reply_user_ids?: string; in_reply_to_tweet_id: string; } | | reply_settings | false | string |
https://developer.twitter.com/en/docs/twitter-api/tweets/manage-tweets/api-reference/post-tweets
Returns Tweets from the last seven days that match a search query
Name | Required | type |
---|---|---|
query | true | string |
end_time | false | string |
expansions | false | string |
max_results | false | number |
media.fields | false | string |
next_token | false | string |
place.fields | false | string |
poll.fields | false | string |
since_id | false | string |
sort_order | false | string |
start_time | false | string |
tweet.fields | false | string |
until_id | false | string |
user.fields | false | string |
Full-archive search returns the complete history of public Tweets matching a search query; since the first Tweet was created March 26, 2006.
Name | Required | type |
---|---|---|
query | true | string |
end_time | false | string |
expansions | false | string |
max_results | false | number |
media.fields | false | string |
next_token | false | string |
place.fields | false | string |
poll.fields | false | string |
since_id | false | string |
sort_order | false | string |
start_time | false | string |
tweet.fields | false | string |
until_id | false | string |
user.fields | false | string |
https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-all
The recent Tweet counts endpoint returns count of Tweets from the last seven days that match a query.
Name | Required | type |
---|---|---|
query | true | string |
end_time | false | string |
start_time | false | string |
granularity | false | string |
since_id | false | string |
until_id | false | string |
The recent Tweet counts endpoint returns count of Tweets from the last seven days that match a query.
Name | Required | type |
---|---|---|
query | true | string |
end_time | false | string |
expansions | false | string |
max_results | false | number |
media.fields | false | string |
next_token | false | string |
place.fields | false | string |
poll.fields | false | string |
since_id | false | string |
sort_order | false | string |
start_time | false | string |
tweet.fields | false | string |
until_id | false | string |
user.fields | false | string |
https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-all
Returns Tweets composed by a single user, specified by the requested user ID. By default, the most recent ten Tweets are returned per request. Using pagination, the most recent 3,200 Tweets can be retrieved. The Tweets returned by this endpoint count towards the Project-level Tweet cap.
Name | Required | type |
---|---|---|
id | true | string |
expansions | false | string |
max_results | false | number |
pagination_token | false | string |
until_id | false | string |
https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/api-reference/get-users-id-tweets
Return user information about an authorized user. User rate limit for OAuth 2.0 and OAuth 1.0a: 75 requests per 15-minute window per each authenticated user.
https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-me