Nauka / Przewodniki SMS / Wysyłanie SMS z szablonem
Wysyłanie SMS z szablonem
3:20 min
Wolna treść SMS wymaga podjęcia trzech decyzji: co mówi wiadomość, jak jest sklasyfikowana i który nadawca jest prawidłowy dla kraju, do którego wysyłasz. Bird dostarcza katalog gotowych do wysłania szablonów SMS, które rozwiązują wszystkie trzy kwestie za Ciebie. W tym filmie przeglądamy katalog w panelu, otwieramy szablon kodu weryfikacyjnego, aby zobaczyć, jakich zmiennych wymaga, i wysyłamy go z terminala jednym poleceniem — bez podawania nadawcy w żądaniu.
Co omawiamy
- Tworzenie szablonu SMS do wielokrotnego użytku
- Dodawanie zmiennych na potrzeby personalizacji
- Wysyłanie wiadomości z szablonu przez API
Transcript
Auto-generated from the video.
Hey. Welcome to another video. Today, we're going to be sending a SMS with a pre-approved Bird template. Some of you might be wondering uh why templates are needed. So, I just want to give you a quick rundown. So, usually when you're sending a plain text SMS, you need to decide on everything. You need to decide uh the content, the sender, write the copy, need to pick out all of the variables, and pick up the category. Um the good thing about templates is that we actually take care of all of that, specifically the sender, cuz that's something that is uh quite tedious for some destinations.
Now, destination-specific rules apply. Uh for the Netherlands, for example, it's quite lenient, but when sending a message to the United States, you need to do a full registration process. Now, in the event that you just need to send a few verification messages there, instead of having to go through the entire verification process for yourself, you can use one of our pre-approved templates instead.
Uh templates can be found in the dashboard when we navigate to SMS and templates. And here you can see a wide range of different types of uh messages that you uh can send right on the go. So, they're split up into multiple categories. So, we've got marketing, transactional, authentication, and service messages. Let's go to a transactional message.
Let's uh let's say an order confirmation. As you can see, um the format of the message is pretty straightforward. So, you've got the order, and then we've got variables in place to allow you to still customize the message towards the specific use case.
Um the exact template is also pretty straightforward. Now, as you can see, uh it's a simple uh post request. You need to do the authentication, and then instead of writing out everything, all that we actually submit is the template. We give it the template name, and then we include all of the parameters that we actually want to fill in. So, in this case, the order reference, the amount, and the currency. Um and then all of this would actually just be sent indirectly to the user.
Now, let's have a quick look at another one. Let's go to a authentication one. And here you can see the setup is exactly the same. Everything is already pre-registered in terms of the type. Um it's a system message. We've got that name. And then here again, we can see that full um flow in terms of sending a template.
All right. Now, we can just send one quite quickly. So, let's take the uh password authentication. And I'm going to copy the information. I'm going to head over to a terminal session. All right. So, I've opened up a fresh terminal session, and I've just pasted in uh the exact same snippet. I've just filled out my um API key and uh phone number.
I'm just going to trigger this, and we're going to exactly see the response. So, we've got a good response. We can actually see that the text is redacted because it's an OTP message. And immediately, we can see the message coming from the pre-approved uh sender, Authifly.
And it's as simple as that. Happy sending.