Follow these steps to set up a Twitter application with the endpoint.
Via a web browser, go to https://apps.twitter.com/app/new.
Click “Create application”.
Enter you callback URL. For this example, let’s assume that the URL for your application is: https://www.mycoolapp.com/oauth

Click “Yes, I agree”.
Click “Create your Twitter application”.

Click “Keys and Access Tokens”.
Copy “API Key”.
Copy “API Secret”.

Next create an instance.