Creating a Tweet using Twitter API v2 in Postman
31 August 2022 • 1 min read • 232 words
This blog is intended for anyone who wants to learn about how to get started with Twitter API v2.
Table of Contents
- Signup for Developer Account and generate credentials
- Creating a tweet using Postman
Signup for developer account and generate credentials
- Sign in to your twiiter account.
- Go to developer.twitter.com and sign up for a developer account.
- After signup, create an app to get API Key, API Secret, Access Token and Access Token Secret.
- Before creating API Key and API Secret, apply for elevated access (otherwise we can only do limited things with the API, posting tweets is allowed only with elevated access. You can easily get elevated access if you don't plan to develop for any government organization.)
Setup User Authentication Settings.
- Use Read and write and Direct message for App Permissions.
- Use Web App, Automated App or Bot for Type of App.
- Use https://localhost for Callback URI / Redirect URL.
- Put any website for Website URL.
- Use Twitter API v2 colletion on on Postman.
- In Twitter API v2, Under Manage Tweets, select Create a Tweet.
Populate Consumer Key (API Key), Consumer Secret (API Secret), Access Token and Access Secret (which we created earlier)
Go to Body and change text to whatever you require in tweet.
"text": "Hello World!"
- Click on Send button and tweet will be created.
is a Salesforce Developer since 2017, living in Bengaluru, India. Know more about him here.