{"__v":0,"_id":"5845a4a99f6fbb1b0043080a","category":{"version":"5845a4a89f6fbb1b004307b7","project":"54d3007669578e0d002730c9","_id":"5845a4a89f6fbb1b004307bd","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-08T18:48:02.369Z","from_sync":false,"order":5,"slug":"integrations","title":"Integrations"},"parentDoc":null,"project":"54d3007669578e0d002730c9","user":"55bf6cdcad601c2b00762d13","version":{"__v":1,"_id":"5845a4a89f6fbb1b004307b7","project":"54d3007669578e0d002730c9","createdAt":"2016-12-05T17:32:24.708Z","releaseDate":"2016-12-05T17:32:24.708Z","categories":["5845a4a89f6fbb1b004307b8","5845a4a89f6fbb1b004307b9","5845a4a89f6fbb1b004307ba","5845a4a89f6fbb1b004307bb","5845a4a89f6fbb1b004307bc","5845a4a89f6fbb1b004307bd","5845a4a89f6fbb1b004307be","5845a4a89f6fbb1b004307bf","5845a4a89f6fbb1b004307c0"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"25.0.0","version":"25"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-08-26T01:50:49.535Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":15,"body":"* [Overview](#overview)\n* [Enabling Twitter Integration in API.AI](#enabling-twitter-integration-in-apiai)\n* [Creating App in Twitter](#creating-app-in-twitter)\n* [Obtaining Keys and Tokens in Twitter App](#obtaining-keys-and-tokens-in-twitter-app)\n* [Modifying App Permissions in Twitter](#modifying-app-permissions-in-twitter)\n* [Configuring Twitter Integration in API.AI](#configuring-twitter-integration-in-apiai)\n* [Test Your Bot](#test-your-bot)\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Overview\"\n}\n[/block]\n**API.AI Twitter Integration** allows you to easily create Twitter bots with natural language understanding based on the API.AI technology.\n\nYou can use our source code from <a href=\"https://github.com/api-ai/apiai-nodejs-client/tree/master/samples/twitter\">github</a> to create custom Twitter bots.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Enabling Twitter Integration in API.AI\"\n}\n[/block]\n<a href=\"https://console.api.ai/api-client/#/newAgent\" target=\"_blank\">Create an API.AI agent</a> with the help of the <a href=\"https://docs.api.ai/docs/key-concepts\" target=\"_blank\">API.AI NLU technology tools</a>.\n\nGo to 'Integrations' from the left side menu and enable Twitter integration.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/4c40666-Twitter-Enable-in-api-ai.png\",\n        \"Twitter-Enable-in-api-ai.png\",\n        2038,\n        1020,\n        \"#fbfbfb\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nIn the integration settings, you'll see the fields to be filled in with the data from your Twitter app.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/1e00c26-Twitter-api-ai-integration-settings.png\",\n        \"Twitter-api-ai-integration-settings.png\",\n        2244,\n        1382,\n        \"#495161\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Creating App in Twitter\"\n}\n[/block]\nSign in to your Twitter account that you will use for your Twitter Bot. Create a separate account for your bot if you don't want it to mix up with your personal account.\n\nCreate a new app in the <a href=\"https://apps.twitter.com\" target=\"_blank\">Twitter App Management console</a>.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/08cbeeb-Twitter-Create-app.png\",\n        \"Twitter-Create-app.png\",\n        2084,\n        688,\n        \"#f5f5f5\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nFill in the fields Name, Description, and Website, check Developer Agreement, and click 'Create your Twitter application'.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/a81449e-Twitter-Create-app-fields.png\",\n        \"Twitter-Create-app-fields.png\",\n        1988,\n        1468,\n        \"#fafafa\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Obtaining Keys and Tokens in Twitter App\"\n}\n[/block]\nOn the page that will open, click the link \"manage keys and access tokens\".\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/a1dd5ef-Twitter-keys-and-tokens.png\",\n        \"Twitter-keys-and-tokens.png\",\n        1878,\n        1512,\n        \"#eeeeef\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nOn the next page, click 'Create my access token'.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/4349ce5-Twitter-Create-access-token.png\",\n        \"Twitter-Create-access-token.png\",\n        1996,\n        1516,\n        \"#15749a\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nNow you have all necessary keys and tokens to complete your Twitter integration configuration in API.AI.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/7d35080-Twitter-all-fields-in-app.png\",\n        \"Twitter-all-fields-in-app.png\",\n        1942,\n        1550,\n        \"#f1f0e8\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Modifying App Permissions in Twitter\"\n}\n[/block]\nIn your Twitter app settings, click the link \"modify app permissions\".\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/749315e-Twitter-app-permissions.png\",\n        \"Twitter-app-permissions.png\",\n        1922,\n        766,\n        \"#dbdcdc\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nOn the next page, set 'Read, Write and Access direct messages' and click 'Update Settings'.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/046fc8f-Twitter-modify-permissions.png\",\n        \"Twitter-modify-permissions.png\",\n        2016,\n        1296,\n        \"#fafafa\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Configuring Twitter Integration in API.AI\"\n}\n[/block]\nIn your Twitter app settings, open the 'Keys and Access Tokens' tab. \n\nCopy the application name, Consumer Key, Consumer Secret, Access Token, and Access Token Secret to the respective fields in the API.AI integration settings and click 'Start'.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/6ed344c-Twitter-api-ai-start.png\",\n        \"Twitter-api-ai-start.png\",\n        2232,\n        1394,\n        \"#495161\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Test Your Bot\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/83d88b7-Twitter-test-your-bot.png\",\n        \"Twitter-test-your-bot.png\",\n        1189,\n        1358,\n        \"#39673d\"\n      ]\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"twitter-integration","type":"basic","title":"Twitter Integration"}

Twitter Integration


* [Overview](#overview) * [Enabling Twitter Integration in API.AI](#enabling-twitter-integration-in-apiai) * [Creating App in Twitter](#creating-app-in-twitter) * [Obtaining Keys and Tokens in Twitter App](#obtaining-keys-and-tokens-in-twitter-app) * [Modifying App Permissions in Twitter](#modifying-app-permissions-in-twitter) * [Configuring Twitter Integration in API.AI](#configuring-twitter-integration-in-apiai) * [Test Your Bot](#test-your-bot) [block:api-header] { "type": "basic", "title": "Overview" } [/block] **API.AI Twitter Integration** allows you to easily create Twitter bots with natural language understanding based on the API.AI technology. You can use our source code from <a href="https://github.com/api-ai/apiai-nodejs-client/tree/master/samples/twitter">github</a> to create custom Twitter bots. [block:api-header] { "type": "basic", "title": "Enabling Twitter Integration in API.AI" } [/block] <a href="https://console.api.ai/api-client/#/newAgent" target="_blank">Create an API.AI agent</a> with the help of the <a href="https://docs.api.ai/docs/key-concepts" target="_blank">API.AI NLU technology tools</a>. Go to 'Integrations' from the left side menu and enable Twitter integration. [block:image] { "images": [ { "image": [ "https://files.readme.io/4c40666-Twitter-Enable-in-api-ai.png", "Twitter-Enable-in-api-ai.png", 2038, 1020, "#fbfbfb" ], "sizing": "full" } ] } [/block] In the integration settings, you'll see the fields to be filled in with the data from your Twitter app. [block:image] { "images": [ { "image": [ "https://files.readme.io/1e00c26-Twitter-api-ai-integration-settings.png", "Twitter-api-ai-integration-settings.png", 2244, 1382, "#495161" ], "sizing": "full" } ] } [/block] [block:api-header] { "type": "basic", "title": "Creating App in Twitter" } [/block] Sign in to your Twitter account that you will use for your Twitter Bot. Create a separate account for your bot if you don't want it to mix up with your personal account. Create a new app in the <a href="https://apps.twitter.com" target="_blank">Twitter App Management console</a>. [block:image] { "images": [ { "image": [ "https://files.readme.io/08cbeeb-Twitter-Create-app.png", "Twitter-Create-app.png", 2084, 688, "#f5f5f5" ], "sizing": "full" } ] } [/block] Fill in the fields Name, Description, and Website, check Developer Agreement, and click 'Create your Twitter application'. [block:image] { "images": [ { "image": [ "https://files.readme.io/a81449e-Twitter-Create-app-fields.png", "Twitter-Create-app-fields.png", 1988, 1468, "#fafafa" ], "sizing": "full" } ] } [/block] [block:api-header] { "type": "basic", "title": "Obtaining Keys and Tokens in Twitter App" } [/block] On the page that will open, click the link "manage keys and access tokens". [block:image] { "images": [ { "image": [ "https://files.readme.io/a1dd5ef-Twitter-keys-and-tokens.png", "Twitter-keys-and-tokens.png", 1878, 1512, "#eeeeef" ], "sizing": "full" } ] } [/block] On the next page, click 'Create my access token'. [block:image] { "images": [ { "image": [ "https://files.readme.io/4349ce5-Twitter-Create-access-token.png", "Twitter-Create-access-token.png", 1996, 1516, "#15749a" ], "sizing": "full" } ] } [/block] Now you have all necessary keys and tokens to complete your Twitter integration configuration in API.AI. [block:image] { "images": [ { "image": [ "https://files.readme.io/7d35080-Twitter-all-fields-in-app.png", "Twitter-all-fields-in-app.png", 1942, 1550, "#f1f0e8" ], "sizing": "full" } ] } [/block] [block:api-header] { "type": "basic", "title": "Modifying App Permissions in Twitter" } [/block] In your Twitter app settings, click the link "modify app permissions". [block:image] { "images": [ { "image": [ "https://files.readme.io/749315e-Twitter-app-permissions.png", "Twitter-app-permissions.png", 1922, 766, "#dbdcdc" ], "sizing": "full" } ] } [/block] On the next page, set 'Read, Write and Access direct messages' and click 'Update Settings'. [block:image] { "images": [ { "image": [ "https://files.readme.io/046fc8f-Twitter-modify-permissions.png", "Twitter-modify-permissions.png", 2016, 1296, "#fafafa" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "Configuring Twitter Integration in API.AI" } [/block] In your Twitter app settings, open the 'Keys and Access Tokens' tab. Copy the application name, Consumer Key, Consumer Secret, Access Token, and Access Token Secret to the respective fields in the API.AI integration settings and click 'Start'. [block:image] { "images": [ { "image": [ "https://files.readme.io/6ed344c-Twitter-api-ai-start.png", "Twitter-api-ai-start.png", 2232, 1394, "#495161" ], "sizing": "full" } ] } [/block] [block:api-header] { "type": "basic", "title": "Test Your Bot" } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/83d88b7-Twitter-test-your-bot.png", "Twitter-test-your-bot.png", 1189, 1358, "#39673d" ] } ] } [/block]