Getting started with the pinned List endpoint group

This quick overview will help you make your first request to the pinned List endpoints using Postman.

Please visit our Twitter API v2 sample code GitHub repository if you want to see sample code in different languages.

Prerequisites

To complete this guide, you will need to have a set of keys and tokens to authenticate your request. You can generate these keys and tokens by following these steps:

  • Sign up for a developer account and receive approval.
  • Create a Project and an associated developer App in the developer portal.
  • Navigate to your App's “Keys and tokens” page to generate the required credentials. Make sure to save all credentials in a secure location.

 

Load the Twitter API v2 Postman collection

To load the Twitter API v2 Postman collection into your workspace, please click on the following button:


 

Authenticate your request

To make a successful request to lookup endpoints, you can use either OAuth 1.0a User ContextOAuth 2.0 App-Only, or OAuth 2.0 Authorization Code with PKCE. However, with manage endpoints, you can only authenticate with OAuth 1.0a User Context or OAuth 2.0 Authorization Code with PKCE.

Regardless, when using Postman, the default authentication keys and tokens will automatically populate in your requests as long as you've set up your environment properly. 

You can do this by selecting the environment named “Twitter API v2” (in the top-right corner of Postman), and adding your keys and tokens to the "initial value" and "current value" fields (by clicking the eye icon next to the environment dropdown). These keys include the following:

  • API Key (also known as Consumer Key)
  • API Secret Key (also known as Consumer Secret)
  • OAuth 1.0a user Access Token
  • OAuth 1.0a user Access Token Secret
  • OAuth 2.0 App Access Token
  • OAuth 2.0 Client Key (only available if you've set up OAuth 2.0 User Authentication settings in your App's settings)
  • OAuth 2.0 Client Secret (only available if you've set up OAuth 2.0 User Authentication settings in your App's settings)

Next steps

Choose any of the following endpoints for a more in-depth guide once, you have completed the prerequisites: