Custom Twitter Dev App
Learn how to create a custom Twitter Dev App and get your own credentials. Once ready, you can use the resulting Client ID, Client Secret and Refresh Token into the respective Twitter Auth driver to authenticate.
ZOOlanders OAuth
Beware that it's a technical process that requires some development skills like interacting with REST APIs.
1. Create a new Dev App
Following the Twitter guide select the plan that best suits your case. Once the app is created, you need to enable the OAuth2 support at the bottom of the App Page on the Twitter Developer Portal.
2. Generate a Refresh Token
Generate a refresh token via REST APIs calls following this guide where the first step is to generate a proper authorization url and visit it in your browser. The url will look something like this:
https://twitter.com/i/oauth2/authorize?response_type=code&client_id=YOUR_APP_CLIENT_ID&redirect_uri=https://www.example.com&scope=tweet.read%20users.read%20offline.access&state=state&code_challenge=challenge&code_challenge_method=plain
Be sure that the redirect url you set there is the same you specified at Step 1 in your app settings. It doesn't need to be a particular url, it can be whatever you want, but it should be the same as the one specified in the redirect_uri
parameter.
3. Authenticate With Twitter
When visiting such url, you will be asked to authenticate with your desidered twitter account, and allow access. The system will redirect you to the url specified in the redirect_url parameter. Ignore the page itself and look at the url. Copy the value of the code pararameter, you will need it in the next step.
4. Get a Refresh Token
Using a console or a tool like Postman, make a post request to create an access and refresh token:
curl --location --request POST 'https://api.twitter.com/2/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'code=THE_CODE_YOU_COPIED_AT_STEP_6' \
--data-urlencode 'grant_type=authorization_code' \
--data-urlencode 'client_id=YOUR_APP_CLIENT_ID' \
--data-urlencode 'redirect_uri=https://www.example.com' \
--data-urlencode 'code_verifier=challenge'
In the reply, copy the value of the refresh token. Then fill in Client id, Client Secret and Refresh Token in Essentials configuration.