To get Blash running on your system, you need Twitter to give you a client ID and secret.
The Twitter API uses OAuth security as one of the ways it locks down it's resources.
To get Blash running on your system, you need Twitter to give you a client ID and secret.
The Twitter API uses OAuth security as one of the ways it locks down it's resources.
In-order to authenticate against OAuth security, you need to use the client ID and secret, and exchange it for a bearer token. You then supply the bearer token in the Authorization key in a HTTP request's headers.
Before you are able to get a Twitter Developer account, you need to apply for one.
In-order to do that, you first need to register for a Twitter account, or log in to your existing Twitter account.
Once you have a Twitter account, you are then ready to apply for a Twitter Developer account.
You will be greeted with a number of options as to why you are using the Twitter Developer Tools. Select the option you feel best suits you for testing out Blash.
Twitter will ask you to confirm the Twitter account you are using. It will also ask you to add a valid phone number.
Once you've added the phone number, it will then send you a verification code to verify that the phone number actually exists.
You may find that the type of account is pre-selected to a team developer account. You can click on the "Switch to individual developer account" link to apply for an individual account.
Assuming you have selected an individual developer account, it will ask you a couple of other questions, like the country you live in and whether you want updates about the Twitter API.
It will ask you a series of questions about why you want to use the Twitter API and data.
Ultimately, the reason we gave when setting up the Twitter API was that we were providing an internal dashboard that was supplying real-time tweets based on a particular search query.
For the specifics, you can probably answer "no" for the answers, apart from the question "Do you plan to display Tweets or aggregate data about Twitter content outside of Twitter?".
This will need to be selected to yes, and you give a similar answer about showing tweets on an internal dashboard.
Be as detailed as you can with your responses as someone at Twitter will need to approve your application before you can access your developer account.
Assuming you are happy with the application, you need to agree to the terms and then it will be sent off to Twitter to approve.
It can vary on the length of time it will take for Twitter to approve your application. However, Twitter approved our application in around 24 hours, so the turn around time was relatively quick.
You will get an email from Twitter when they've made a decision. They may get in contact you for additional information about your application.
Great news! Twitter has approved your developer account.
The last thing you need to do is to set up an app. This is so you can get a client ID and secret.
Navigate to the Twitter Developer Portal, and you should find that as part of your Twitter developer account application, a project has already been set up for you.
Once you have found that project, you will need to go inside that project, and set up an app.
Create a new app and it will give you a client ID and secret. You need to make note of these credentials, as Twitter will not show the client secret again.
Twitter does allow you to create an app outside of a project as a "standalone app". However, Blash uses version 2 of the Twitter API and standalone apps only support version 1.1 of the Twitter API.
Therefore, it's imperative that you create the app inside the project.
Inside the Blash source code, navigate to Web/RoundTheCode.Blash.Api/appsettings.json
.
Inside the Api > TwitterApi
, replace the ClientId
and ClientSecret
with the details you have been given.
And that's it. You should be good to go!
Learn Blazor WebAssembly with our online courses