---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/chat/android/quickstart#article
headline: Programmable Chat Android Quickstart
description: ""
url: https://www.twilio.com/docs/chat/android/quickstart
inLanguage: en
dateModified: 2026-07-20T17:19:21.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# Programmable Chat Android Quickstart

> \[!CAUTION]
>
> Programmable Chat has been deprecated and receives no support. Twilio has turned its focus to the next generation of chat: [Twilio Conversations][]. Find out more about the [EOL process][].
>
> * To start a project, see [Conversations][].
> * To switch from Programmable Chat, see the [Migration Guide][] to learn about how to switch.

[Twilio Conversations]: /docs/conversations

[EOL process]: https://www.twilio.com/en-us/changelog/programmable-chat-end-of-life-notice

[Conversations]: /docs/conversations-classic

[Migration Guide]: /docs/conversations-classic/migrating-chat-conversations

This guide gets you up and running with a sample Programmable Chat application for Android that you can build on as you learn more about Chat.

## Gather Account Information \[#information]

To set up your back end for Chat, gather the following five configuration values from your Twilio account:

| Config Value               | Description                                                                                                                                                                                                                           |
| :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Service Instance SID       | Like a database for your Chat data - [generate one in the console here](https://www.twilio.com/console/chat/services)                                                                                                                 |
| Account SID                | Your primary Twilio account identifier - find this [in the console here](https://www.twilio.com/console/chat/getting-started).                                                                                                        |
| API Key                    | Used to authenticate - [generate one here](https://www.twilio.com/console/chat/dev-tools/api-keys).                                                                                                                                   |
| API Secret                 | Used to authenticate - [just like the above, you'll get one here](https://www.twilio.com/console/chat/dev-tools/api-keys).                                                                                                            |
| Mobile Push Credential SID | Used to send notifications from Chat to your app - [create one in the console here](https://www.twilio.com/console/chat/credentials) or learn more about [Chat Push Notifications in Android](/docs/chat/android/push-notifications). |

## Create a Twilio Function

When you build your application with Twilio Chat, you will need two pieces - the client (this Android app) and a server that returns access tokens. If you don't want to set up your
own server, you can use [Twilio Functions](/docs/serverless/functions-assets/functions) to create this part of your solution.

Functions are a way to
run your Node.js code in Twilio's environment. You can create new functions on the Twilio Console's [Manage Functions Page](https://www.twilio.com/console/runtime/functions/manage).

You will need to choose the "Programmable Chat Access Token" template, and then fill in the account information you gathered above. After you do that, the Function will appear, and you can read through it. Save it, and it will immediately be published at the URL provided - go ahead and put that URL into a web browser, and you should see a token being returned from your Function. If you are getting an error, check to make sure that all of your account information is properly defined.

Want to learn more about the code in the Function template, or want to write your own server code? Checkout the [Twilio Chat Identity Guide](/docs/chat/identity) for the underlying concepts.

Now that the Twilio Function is set up, let's get the starter Android app up and running.

> \[!CAUTION]
>
> **NOTE:** You should not use Twilio Functions to generate access tokens for your app in production. Each function has a publicly accessible URL which a malicious actor could use to obtain tokens for your app and abuse them.
>
> [Read more about access tokens here](/docs/chat/identity) to learn how to generate access tokens in your own C#, Java, Node.js, PHP, Python, or Ruby application.

## Download and explore the mobile app \[#app]

To get going quickly, use the starter Android app written in Kotlin.

* Clone the [twilio-chat-demo-android repository](https://github.com/twilio/twilio-chat-demo-android)

Open this project with Android Studio, and let it sync with Gradle to install all the dependencies.

## Configure and Run the Mobile App

* [Generate google-services.json](https://support.google.com/firebase/answer/7015592?hl=en) file and place it under `chat-demo-android/`.
* Set the value of `ACCESS_TOKEN_SERVICE_URL` in `gradle.properties` file to match your Twilio Functions URL.

```bash
ACCESS_TOKEN_SERVICE_URL=http://example.com/get-token/
```

Once the app loads, you should see a UI like this one:

![ChatQuickstart app with text input and send button.](https://docs-resources.prod.twilio.com/da02dc7b0b317867d3e286e4710fa97b28fecd9b063dd92ff2761cb6846007dd.png)

Start sending yourself a few messages - they should start appearing both in a
`RecyclerView` in the starter app, and in your browser as well if you kept that
window open.

You're all set! Now you can start building your own application. Please follow this guide
to integrate the Android SDK into your existing project, [head over to our install guide](/docs/chat/sdk-download-install).
If you'd like to learn more about how Chat works, you might want to dive
into our [user identity guide](/docs/chat/identity),
which talks about the relationship between the mobile app and the server.
