Getting new Twitter API consumer and secret keys

2019-01-20 23:22发布

I am working on a Twitter project where I want to use OAuth but I don't know where to get the consumer and secret keys.

How can I get these?

7条回答
贼婆χ
2楼-- · 2019-01-20 23:47

To get Consumer Key & Consumer Secret, you have to create an app in Twitter via

https://apps.twitter.com/app/new

Then you'll be taken to a page containing Consumer Key & Consumer Secret.

查看更多
放我归山
3楼-- · 2019-01-20 23:47
  1. Log into the Twitter Developers section.

    • If you don't already have an account, you can login with your normal Twitter credentials
  2. Go to "Create an app"

  3. Fill in the details of the application you'll be using to connect with the API

    • Your application name must be unique. If someone else is already using it, you won't be able to register your application until you can think of something that isn't being used.
  4. Click on Create your Twitter application

  5. Details of your new app will be shown along with your consumer key and consumer secret.

  6. If you need access tokens, scroll down and click Create my access token

    • The page will then refresh on the "Details" tab with your new access tokens. You can recreate these at any time if you need to.

By default your apps will be granted for read-only access. To change this, go to the Settings tab and change the access level required in the "Application Type" section.

Existing apps

To get the consumer and access tokens for an existing application, go to My applications (which is available from the menu in the upper-right).

查看更多
劫难
4楼-- · 2019-01-20 23:57

Go to https://dev.twitter.com/apps to list all your apps. Click on the desired app to get its consumer and secret key. If you didnt yet created any app then follow https://dev.twitter.com/apps/new to create new one.

查看更多
放我归山
5楼-- · 2019-01-20 23:57

This slide show shows how to get both keys updated June 2013.

http://www.slideshare.net/Tweetganic/generate-twitter-applications

查看更多
ゆ 、 Hurt°
6楼-- · 2019-01-20 23:57

From the Twitter FAQ:

Most integrations with the API will require you to identify your application to Twitter by way of an API key. On the Twitter platform, the term "API key" usually refers to what's called an OAuth consumer key. This string identifies your application when making requests to the API. In OAuth 1.0a, your "API keys" probably refer to the combination of this consumer key and the "consumer secret," a string that is used to securely "sign" your requests to Twitter.

查看更多
聊天终结者
7楼-- · 2019-01-20 23:59

Simply go here: https://dev.twitter.com/apps/new Make sure you have logged in with your Twitter account - then create - even if your just entering random (Test) Content - create your app - afterwards you will receive all the data you require :)

查看更多
登录 后发表回答