To get Twitter Access keys, you need to create Twitter Application which is mandatory to access Twitter.
Go to https://apps.twitter.com/app/new and log in, if necessary.
Enter your Application Name, Description and your website address. You can leave the callback URL empty.
Accept the TOS, and solve the CAPTCHA.
Submit the form by clicking the Create your Twitter Application
Copy the consumer key (API key) and consumer secret from the screen into your application.