Getting started with the List members endpoint group
This quick overview will help you make your first request to List members endpoints using Postman.
If you would like to see sample code in different languages, please visit our X API v2 sample code GitHub repository.
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 X API v2 Postman Collection
To load the X 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 Context, 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 “X 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
- App only 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: