Expertise technical

Shortcode vs. Longcode SMS in Morocco: which number to choose for your business

SMS shortcode vs longcode Morocco: technical guide with code examples for developers in Morocco.

Shortcode vs. Longcode SMS in Morocco: which number to choose for your business
Table of Contents
  1. To send transactional or marketing SMS to Morocco, the vast majority of companies opt for an [Sender ID alfanumeric](/fr/blog/sender-id-digital-or-alfanumeric-which-choose-for-your/) (the brand name in text).But for interactive use, bidirectional alerts, or very high volume, you will need to issue from a real phone number.
  2. Difference Between Shortcode and Longcode
  3. Cost and time for obtaining in Morocco
  4. Where the long code is sufficient
  5. Cases where a dedicated shortcode becomes necessary

To send transactional or marketing SMS to Morocco, the vast majority of companies opt for an [Sender ID alfanumeric](/fr/blog/sender-id-digital-or-alfanumeric-which-choose-for-your/) (the brand name in text).But for interactive use, bidirectional alerts, or very high volume, you will need to issue from a real phone number.

You are then faced with two structural options: the Longcode (Virtual Long Number) and the Shortcode (Short Number).

Here is a concrete comparison for the Moroccan market, in order to choose the right infrastructure.

Difference Between Shortcode and Longcode

The Longcode (Long or Virtual Number) - Format: A standard international phone number (+212 6 XX XX XX XX). - Features: It gives the impression of a P2P (person to person) sending. It supports two-way SMS communication, which allows the user to respond to the SMS naturally. - Throughput: Limited. Operators generally mix longcodes to a small number of SMS per second to avoid spam.

The Shortcode (Short Number) - Format: A four- or five-digit number (e.g. 4040 or 50505). - Features: It is explicitly identified as a business number (A2P - Application to Person). It is highly approved by operators and bypasses most anti-spam filters. - Debit (Throughput) : Massive. Shortcodes are tailored to send from 100 to several thousand SMS per second without triggering [throttling]/fr/blog/throttlingsm-s-au-maroc-which speed-you can-please/).

Cost and time for obtaining in Morocco

This is where the fracture is created for 95% of projects.

For Longcode: Renting a virtual long number via a [cloud SMS API] is fast and inexpensive.The fixed monthly cost is a few hundred Dirhams, and activation can be done in a few days.

For the dedicated shortcode: The acquisition of a dedicated shortcode for Morocco is a complex process (validation with the ANRT and the 3 operators). - Term: Count 4 to 8 weeks of network audit and technical configuration. - Cost: Installation fees (Setup fees) often amount to several thousand Dirhams per operator, coupled with a high monthly maintenance fee.

Where the long code is sufficient

If your monthly volume is less than 500,000 SMS and you don’t make TV advertising, the Shortcode doesn’t make any economic sense.

The long code is perfect for: - The interactive customer service: A delivery agent that confirms an address (the customer can answer "Yes" or send the correction). - The medical RDV confirmation: "Tap 1 to confirm or 2 to cancel". - The WhatsApp fallback: Use the same long number to send a WhatsApp Business message, and switch to an SMS if WhatsApp fails.

Cases where a dedicated shortcode becomes necessary

Shortcode is an absolute technical and marketing necessity in the following cases:

  1. National Media Campaigns (B2C Interactive): If you launch a TV or radio advertisement saying “Send WINNEZ to 5050”, you need a shortcode.
  2. Banking Sector (OTP Critics): Major banks use shortcodes to guarantee absolute network priority (High Priority Routing) and a maximum level of Trust Score against phishing.
  3. Volume > 1 Million SMS per day: For e-commerce giants or the operators themselves, the massive flow of a dedicated shortcode connected via SMPP is the only architecture capable of unloading the queue during a peak like Black Friday.

The profitability threshold: Empirically in Morocco, if your project does not require the user to remember the receipt number, stay on a classic alfanumeric Sender ID. If you need high-volume bidirectional responses, the natural and much less expensive evolution than a Shortcode SMS is now the WhatsApp Business API.

Why choose EnvoiSMS for your business?

Carrier Delivery

Local routes to IAM, Orange and Inwi, with automatic failover between routes and delivery status sent by webhook.

Cost Optimization

WhatsApp Business API from 0.65 MAD per message with optimal ROI.

Sovereign Data (CNDP)

Full compliance with Moroccan personal data protection regulations (CNDP).

What is the routing latency on the IAM, Inwi and Orange networks?
On our local routes to Maroc Telecom (IAM), Orange and inwi, the average delivery latency is between 2 and 4 seconds for transactional flows.
How does the platform manage the format of Moroccan numbers?
EnvoiSMS automatically normalizes the numbers entered (06..., 07..., 00212...) to the E.164 standard (+212) to avoid any delivery failure.

Suggested Articles

SMS Formatting in Morocco: Line Breaks, GSM-7 vs UCS-2 Encoding and Cost Optimization
technical

SMS Formatting in Morocco: Line Breaks, GSM-7 vs UCS-2 Encoding and Cost Optimization

WhatsApp Business Formatting in Morocco: Enriched Text, Emojis and Interactive Buttons
technical

WhatsApp Business Formatting in Morocco: Enriched Text, Emojis and Interactive Buttons

One-Tap Autofill & 1-Click WhatsApp OTP Authentication in Morocco
technical

One-Tap Autofill & 1-Click WhatsApp OTP Authentication in Morocco