Skip to content

RCS poruke

RCS (Rich Communication Services) je sljedeća generacija razmjene poruka za Android uređaje, koja nudi bogate medije, interaktivnost i napredne funkcije izvan tradicionalnih SMS-ova.

Pregled

RCS pruža poboljšane mogućnosti razmjene poruka:

  • bogati mediji (slike, video zapisi, GIF-ovi)
  • Interaktivna dugmad i vrtuljke
  • Čitanje računa i indikatora kucanja
  • Viša ograničenja znakova (do 3072 karaktera)
  • Bolje praćenje isporuke
  • Brendirana identifikacija pošiljaoca

Dostupnost

  • Platforma: samo Android uređaji
  • Mreža: Zahtijeva RCS podršku operatera
  • Zamena: Automatski se vraća na SMS ako RCS nije dostupan

Osnovna RCS poruka

RCS primjer

Zahtjev

{
  "from": "YourBrand",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Your RCS message text with rich formatting"
}

Parametri

Parametar Vrsta Obavezno Opis
od string Da Alfanumerički ID pošiljaoca
to string Da Broj telefona primaoca (E.164)
tip string Da Postavite na "rcs"
tekst string Da Sadržaj poruke (do 3072 znakova)
messageData objekt Ne Bogati mediji i dugmad

Vrste poruka

Samo tekst

Jednostavna tekstualna poruka sa produženim ograničenjem znakova:

{
  "from": "YourBrand",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Welcome to our service! RCS allows us to send much longer messages with rich formatting and interactive elements."
}

Tekst + slika

{
  "from": "YourBrand",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Check out our new product!",
  "messageData": {
    "media": {
      "url": "https://example.com/product.jpg",
      "type": "image/jpeg",
      "height": 600,
      "width": 800
    }
  }
}

Tekst + Slika + Dugme

{
  "from": "YourStore",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Summer Sale - Up to 50% off!",
  "messageData": {
    "media": {
      "url": "https://example.com/sale-banner.jpg",
      "type": "image/jpeg"
    },
    "buttons": [
      {
        "text": "Shop Now",
        "action": {
          "type": "openUrl",
          "url": "https://example.com/sale"
        }
      }
    ]
  }
}

Tekst + Video

{
  "from": "YourBrand",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Watch our product demo",
  "messageData": {
    "media": {
      "url": "https://example.com/demo.mp4",
      "type": "video/mp4",
      "thumbnail": "https://example.com/thumbnail.jpg"
    }
  }
}

Tekst + Više dugmadi

{
  "from": "YourService",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Your order #12345 is ready for pickup",
  "messageData": {
    "buttons": [
      {
        "text": "Track Order",
        "action": {
          "type": "openUrl",
          "url": "https://example.com/track/12345"
        }
      },
      {
        "text": "Contact Support",
        "action": {
          "type": "dial",
          "phoneNumber": "+380XXXXXXXXX"
        }
      },
      {
        "text": "Cancel Order",
        "action": {
          "type": "openUrl",
          "url": "https://example.com/cancel/12345"
        }
      }
    ]
  }
}

RCS vrtuljak

Prikaži više stavki u vrtuljku koji se može pomicati:

{
  "from": "YourStore",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Featured Products",
  "messageData": {
    "carousel": {
      "cards": [
        {
          "title": "Product A",
          "description": "Premium quality product",
          "media": {
            "url": "https://example.com/product-a.jpg",
            "type": "image/jpeg"
          },
          "buttons": [
            {
              "text": "Buy Now",
              "action": {
                "type": "openUrl",
                "url": "https://example.com/product-a"
              }
            },
            {
              "text": "Details",
              "action": {
                "type": "openUrl",
                "url": "https://example.com/product-a/details"
              }
            }
          ]
        },
        {
          "title": "Product B",
          "description": "Best seller",
          "media": {
            "url": "https://example.com/product-b.jpg",
            "type": "image/jpeg"
          },
          "buttons": [
            {
              "text": "Buy Now",
              "action": {
                "type": "openUrl",
                "url": "https://example.com/product-b"
              }
            }
          ]
        }
      ]
    }
  }
}

Dugme Akcije

Otvori URL

{
  "text": "Visit Website",
  "action": {
    "type": "openUrl",
    "url": "https://example.com"
  }
}

Birajte broj telefona

{
  "text": "Call Us",
  "action": {
    "type": "dial",
    "phoneNumber": "+380XXXXXXXXX"
  }
}

Pošalji lokaciju

{
  "text": "Share Location",
  "action": {
    "type": "shareLocation"
  }
}

Kalendarski događaj

{
  "text": "Add to Calendar",
  "action": {
    "type": "createCalendarEvent",
    "title": "Appointment",
    "startTime": "2025-01-25T14:00:00Z",
    "endTime": "2025-01-25T15:00:00Z"
  }
}

Specifikacije medija

Slike

  • Formati: JPEG, PNG, GIF
  • Maksimalna veličina: 2MB
  • Preporučena rezolucija: 800x600 ili 1200x800
  • Odnos slike: 16:9 ili 4:3

Videos

  • Formati: MP4, 3GP
  • Maksimalna veličina: 10MB
  • Maksimalno trajanje: 2 minute
  • Preporučena rezolucija: 1280x720

Audio

  • Formati: MP3, AAC
  • Maksimalna veličina: 5MB
  • Maksimalno trajanje: 5 minuta

Povratak na SMS

RCS se automatski vraća na SMS kada:

  • Primalac nema RCS
  • RCS je onemogućen na uređaju primaocu
  • Mreža ne podržava RCS
{
  "from": "YourBrand",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Check out our new product!",
  "messageData": {
    "media": {
      "url": "https://example.com/product.jpg",
      "type": "image/jpeg"
    },
    "buttons": [
      {
        "text": "Shop Now",
        "action": {
          "type": "openUrl",
          "url": "https://example.com/shop"
        }
      }
    ]
  },
  "fallback": {
    "type": "sms",
    "text": "Check out our new product! Visit: https://example.com/shop"
  }
}

Slučajevi upotrebe

E-trgovina

{
  "from": "YourStore",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Your order has been shipped!",
  "messageData": {
    "media": {
      "url": "https://example.com/package.jpg",
      "type": "image/jpeg"
    },
    "buttons": [
      {
        "text": "Track Package",
        "action": {
          "type": "openUrl",
          "url": "https://example.com/track/ABC123"
        }
      },
      {
        "text": "Contact Support",
        "action": {
          "type": "dial",
          "phoneNumber": "+380XXXXXXXXX"
        }
      }
    ]
  }
}

Bankarstvo

{
  "from": "YourBank",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Low balance alert: Your account balance is $50",
  "messageData": {
    "buttons": [
      {
        "text": "View Balance",
        "action": {
          "type": "openUrl",
          "url": "https://bank.example.com/balance"
        }
      },
      {
        "text": "Transfer Money",
        "action": {
          "type": "openUrl",
          "url": "https://bank.example.com/transfer"
        }
      }
    ]
  }
}

Putovanja

{
  "from": "YourAirline",
  "to": "+380XXXXXXXXX",
  "type": "rcs",
  "text": "Your flight is departing in 3 hours",
  "messageData": {
    "media": {
      "url": "https://example.com/boarding-pass.jpg",
      "type": "image/jpeg"
    },
    "buttons": [
      {
        "text": "Check-in",
        "action": {
          "type": "openUrl",
          "url": "https://airline.example.com/checkin"
        }
      },
      {
        "text": "Add to Calendar",
        "action": {
          "type": "createCalendarEvent",
          "title": "Flight Departure",
          "startTime": "2025-01-25T10:00:00Z"
        }
      }
    ]
  }
}

Najbolje prakse

Sadržaj

  • ✅ Koristite slike visokog kvaliteta (minimalno 800x600)
  • ✅ Neka tekst dugmeta bude kratak (2-3 riječi)
  • ✅ Obezbedite rezervni SMS za bogat sadržaj
  • ✅ Testirajte na različitim Android uređajima
  • ❌ Nemojte prekoračiti 4-5 dugmadi po poruci
  • ❌ Izbjegavajte velike video datoteke (>5MB)

Mediji

  • Koristite HTTPS URL-ove za sve medije
  • Optimizirajte slike za mobilne uređaje
  • Uključite alternativni tekst za pristupačnost
  • Testirajte medijske URL-ove prije slanja

Dugmad

  • Maksimalno 4 dugmeta po poruci
  • Očistite tekst poziva na akciju
  • Testirajte sve radnje dugmadi
  • Razmotrite zamjenu za nedostupne radnje

Brendiranje

  • Koristite konzistentan ID pošiljaoca
  • Uključite logo brenda gdje je prikladno
  • Održavajte glas i ton brenda
  • Obezbediti vizuelnu doslednost

Status isporuke

RCS pruža poboljšano praćenje isporuke:

  • Poslano: Poruka je poslana operateru
  • Dostavljeno: Poruka je isporučena na uređaj
  • Pročitano: Poruku je otvorio primalac
  • Neuspješno: Isporuka nije uspjela, rezervni je pokrenut

Provjerite status koristeći status endpoint.

Sljedeći koraci