1 - The first step is to create a Twitter account through the official website, as we will need to use it when creating a Twitter Developers account. If you already have a Twitter account and want to use it for this purpose, then you can skip to the next step. 2 - Let's access the Developer Platform page and "Sign in" with our Twitter account already created in the previous step, so that we can use the services offered by the Twitter API.
1 - We will be redirected to the Twitter social network when we enter the Login and Password information, but just go back to the Developer Platform page, we will already be logged into our account. Our option of interest is "Developer Portal", as highlighted in the image below:
Various information will be requested for registration, and the first one is which modality the user intends to use the Twitter API services, whether it is for Professional, Academic or just Hobby purposes. In addition, it will be necessary to fill in the reasons why we want to use this service, where we need to describe. Finally, an email will be sent to the address we initially registered when creating a Twitter account, informing us that the order is being analyzed. After that, we will receive another email asking if there are government agencies that will take advantage of this service, and if they exist, let us inform the list of them. We must send a reply email according to the context and purpose of use. Within 48 hours, we will receive a new approval email for using the developer account.
2 - With the approval of use, we can go back to the main page of the Developer Portal, more precisely in the Dashboard, to create our first application, where will be the necessary information for use in ScriptCase. With the application created, we will be provided with the API Key and API Key Secret. There is also the possibility to regenerate according to the highlight in the image below.
Enabling call URLs for API consumption
The definition of the URLs that will be called when we are going to use the API Key and API Secret to consume the Twitter API, can be defined in the settings of the application that was created.
1 - We access the icon referring to "Settings", as highlighted in the image below:
2 - We scroll down to the "Authentication Settings" block and click on the "Edit" button:
3 - We enable the option "Enable 3-legged OAuth" and add the call URLs that we intend to use for authentication with Twitter, in addition to filling the field "Website URL" which is the main domain of the website used. Once that's done, just save the adjustments made.
It is important to note that the URLs to be added must have the SSL certificate active for the main domains.