---slug: /guides/messaging/receiving-your-first-smssidebar_position: 0.5---# Receiving Your First SMSTo [send your first SMS](../sending-your-first-sms/index.mdx), you needed aphone number, API credentials, and a REST API call.Receiving messages works a bit differently: when using the Compatibility API,you need to prepare an XML file with instructions on what to do after a messageis received on a given phone number. Receiving text messages from users using XML bins. 1) the user sends a message to a number in your SignalWire space. 2) SignalWire fetches the XML bin URL associated with the destination number. 3) The contents of the XML bin are interpreted and executed. 4) Any response specified in the XML bin will reach the caller. ## XML binsLets write our first XML bin. We will host this one on SignalWire (you can useyour own server if you want, which even allows you to generate binsdynamically).You can create and manage bins from the LaML section of your Dashboard under theBins tab.XML bins tab of the LaML sectionCreate a new bin, and use the following lines as content:xmlHello from SignalWire!The bin above will reply with a fixed message to any incoming SMS. Find the full technical reference in the [Compatibility XML](compatibility-api/xml/index.mdx) section.Copy the Request URL of the bin you just created, then read the next section to configure a number to handle messages using that bin.## Configuring your number {#configuring-your-number}The last step is connecting a number to the bin. If you dont have a phonenumber yet, make sure to [buyone](guides/numbers-api/getting-started/buying-a-phone-number/index.mdx). Youwill need at least one number to receive messages.Then, open the settings for the number. Under Messaging Settings, choose tohandle messages using LaML Webhooks, then paste the URL of the bin in thefield below.Connecting a number to an XML bin. First select LaML Webhooks, then paste the URL of the bin.Try sending a message to the configured phone number: after a few seconds youll receive an automated reply.:::info Ensuring message deliveryIf you are sending messages to the US from a 10DLC number, you _must_ registeryour traffic with the Campaign Registry. Otherwise, the carriers will notdeliver your messages. Please see [**Campaign Registry - Everything You Need ToKnow**](pathname:///guides/campaign-registry-all-you-need-to-know) for more information.:::## Wrap upWe have shown how to receive a text message and perform follow-up actions.This example used the [Compatibility API](pathname:///compatibility-api), and inparticular [Compatibility XML](compatibility-api/xml/index.mdx) bins, to receivea message. For more advanced, real-time applications, youll want to check outour [Realtime SDK](sdks/reference/realtime-sdk/00-realtime-sdk-reference.mdx).