Integration guide

This page contains information on several tools and key concepts that you should be aware of as you integrate the manag Tweets endpoints into your system. We’ve broken the page into a couple of different sections:

 

Helpful tools

Before we dive into some key concepts that will help you integrate this endpoint, we recommend that you become familiar with:

Postman

Postman is a great tool that you can use to test out an endpoint. Each Postman request includes every path and body parameter to help you quickly understand what is available to you. To learn more about our Postman collections, please visit our "Using Postman" page. 
 

Code samples

Interested in getting set up with this endpoint with some code in your preferred coding language? We’ve got a handful of different code samples available that you can use as a starting point on our Github page.
 

Third-party libraries

Take advantage of one of our communities’ third-party libraries to help you get started. You can find a library that works with the v2 endpoints by looking for the proper version tag.
 

Key concepts

Authentication

All Twitter API v2 endpoints require for you to authenticate your requests with a set of credentials, also known as keys and tokens.

These specific endpoints require the use of OAuth 1.0a User Context, which means that you must use a set of API keys and user Access Tokens to make a successful request. The Access Tokens must be associated with the user that you are requesting on behalf of. If you want to generate a set of Access Tokens for another user, they must authorize or authenticate your App using the 3-legged OAuth flow.

Please note that OAuth 1.0a can be tricky to use. If you are not familiar with this authentication method, we recommend using a library or a tool like Postman to properly authenticate your requests.

Developer portal, Projects, and developer Apps

To retrieve a set of authentication credentials that will work with the Twitter API v2 endpoints, you must have a developer account, set up a Project within that account, and created a developer App within that Project. You can then find your keys and tokens within your developer App. 
 

Rate limits

Every day, many thousands of developers make requests to the Twitter API. To help manage the sheer volume of these requests, rate limits are placed on each endpoint that limits the number of requests that you can make on behalf of your app or on behalf of an authenticated user. 

These endpoints are rate limited at the user level, meaning that the authenticated user that you are making the request on behalf of can only call the endpoint a certain number of times across any developer App. There is a user rate limit of 200 requests per 15 minutes for the POST method. The DELETE method has a rate limit of 50 requests for 15 minutes. Additionally, there is a limit of 300 requests per 3 hours, including Tweets created with either manage Tweets or manage Retweets.
 

Source labels

Your App name and website URL will be shown as the source label within metadata for any Tweets created programmatically by your application. If you change the use case of a Twitter App, be sure to update the use case in these settings in order to ensure you are in compliance with the Developer Terms.
 

Profile settings

You can only add a location to Tweets if you have geo enabled in your profile settings. If you don’t have geo enabled, you can still add a location parameter in your request body, but it won’t get attached to your Tweet. The same is also true for tagging users in images. If the user you’re tagging doesn’t have photo-tagging enabled, their names won’t show up in the list of tagged users even though the Tweet is successfully created. 
 

Super Followers

We’ve added the ability to share Tweets to Super Followers via the API, so you can build solutions that help people earn monthly revenue from their Twitter content. Super Follows is an opportunity to earn monthly revenue by sharing subscriber-only content with your most engaged followers on Twitter. Through Super Follows, creators like you can offer your most engaged followers an extra level of access and bonus content. 

As Super Follows is available to a limited number of creators at this point, the audience for this API functionality is inherently limited today. However, as Super Follows scales, and more creators can monetize their Tweets, we want you to be prepared with the API functionality you need to build innovative and valuable solutions for creators on Twitter.

 

Adding media to a Tweet

Currently, isn’t a way to fully upload media using v2 of the Twitter API currently. However, you attach previously uploaded media to a Tweet. You can use media IDs that have been already uploaded using the v1 media endpoint or Twitter Media Studio. These media ids must be your own or that of an authenticated user.

Next steps