In this guide, we will get you up and running quickly with a sample chat application you can build on as you learn more about Programmable Chat. Sound like a plan? Then let's get cracking!
The first thing we need to do is grab all the necessary information from our Twilio account. To set up our back-end for Chat, we will need four values from our account:
|Service Instance SID||A service instance where all the data for our application is stored and scoped. Generate one in the console here.|
|Account SID||Your primary Twilio account identifier - find this in the console here.|
|API Key||Used to authenticate - generate one here.|
|API Secret||Used to authenticate - just like the above, you'll get one here.|
Choose a download package for your server-side language of choice. If you're primarily a front-end developer and don't have a strong preference, Node.js will probably get you up and running the fastest.
- Download for C# .NET
- Download for Java
- Download for Node.js
- Download for PHP
- Download for Python
- Download for Ruby
Follow the instructions in the README for each starter application to configure and run it on your machine, using the four values we created above:
- Instructions for C# .NET
- Instructions for Java
- Instructions for Node.js
- Instructions for PHP
- Instructions for Python
- Instructions for Ruby
This is where the fun begins! When you visit the homepage of the starter application, verify that everything looks good with your settings, and then click the green chat button at the bottom.
You have been assigned a random user identity and have
joined a channel called
general. If you open this page in another
browser window or tab, you should be able to have a rousing conversation with
- Fetch an
AccessTokenfrom the server via Ajax
- Join a channel called "general"
- Handle UI events to send messages or display new incoming messages
Need some extra help? Send us a note at firstname.lastname@example.org, and we'll make sure to get you running just as quick as we can. Have fun building with Chat, and make sure to let us know what you're building!