(Part 1.2) Getting Twitter Client ID and Secret for Twitter OAuth 2.0
Part 1.2 of the Twitter OAuth 2.0 series. We will learn how to get the Twitter Client ID and Secret to authenticate with Twitter.
Tags
TLDR 🥱!!!
There’s no TLDR for this one. It’s just pictures and sh*t, just click buttons as you see in pictures.
Basically, monkey see, monkey do. 🐒
Prerequisites 📝
You already have a Twitter Developer’s account. If not, then go to Part 1.1 of this series to learn what to do.
Creating/Adding a new App 📱
Alright, next thing we need to do is add a new “App”.
- In your twitter developer’s account dashboard, you create “Apps” and each of these “Apps” represent a project you’re working on.
- Every project you work on, e.g. po🌽nh#b, should ideally have its own set of keys and tokens to interact with Twitter API,… you know to keep things nice and tidy. 🧹
- And each of these “Apps” in Twitter dashboard will have its own set of keys and tokens.
So, let’s go 🚀
Step 1
Click on that +Add App
button you saw earlier on the dashboard (also in this screenshot in Part 1.1 of this series).
Step 2
Only one rule here, name it something cool. 😎
Then Click Next or whatever the button says on that page.
Step 3
Make sure to not post your keys and tokens in blog posts on the internet like an idiot (why u guys looking at me like that? 🤨).
Then Click Create or Next or whatever the button says on that page.
Side Note: we won’t need these keys & tokens at all throught this series 😛. So feel free to not copy them.
Step 4
Once that’s all done, go to your newly created app (rhymbit.com here in my case) using the sidebar and sh*t should look something like this.
Next, find and click this Set up
button.
Zoom In & Out using scroll wheel, Reset by double clicking
Getting App Creds 🤫
(Side Note: If you want to follow along with Part 2, where we learn how to actually use the twitter API, select exactly the same options as me.) Step 5 (After clicking Set up
)
For App permissions
and for Type of App
For App info (ss down below),
-
The Callback URI/Redirect URL is the URL that Twitter (yes the website) will redirect the user to after they’ve logged in throught it.
I’m usinghttp://localhost:5173
here, and if you wanna know why, you will read it in next part of this series :- (Part 2) Login In using Twitter . -
For Website URL, put whatever you want for now, but ideally it should be the URL of your website or app.
-
And For …, that’s it, I’m not gonna fill out other optional fields. 😒
-
Click Save. We’re almost done. 🎉
Step 6
This is the cheese 🧀 we’ve worked so hard for.
The Client ID and the Client Secret is all we need to authenticate with Twitter. Copy them somewhere to follow along with
(Part 2) of this series .
One more Side note, if you’re wondering that +Add App
button is nowhere to be found after you create your first app, then get a load of this :-
Yes, You’ve been Musked too, just like me! 🥲
That’s it!, thanks 🤗 for reading all the way till down here. Now quickly jump to the next part.