Getting started with SMS in Yandex Cloud Notification Service
Note
The service is at the preview stage.
To enable Cloud Notification Service, request access to the service from your account manager or technical support
Cloud Notification Service (CNS) is a service for multichannel notifications of users. The service's HTTP API is compatible with the Amazon SNS API
With Cloud Notification Service, you can send text messages (SMS)+79991112233
. SMS messages are signed with sender text names. The maximum length of one SMS is 160 Latin characters or 70 Cyrillic characters. Longer texts are sent using multiple SMS messages.
To get started with SMS:
- Get your cloud ready.
- Create an SMS notification channel with a common sender.
- Add a test phone number.
- Send a test SMS.
- Create a notification channel with an individual sender.
- Exit the sandbox.
Get your cloud ready
Sign up in Yandex Cloud and create a billing account:
- Navigate to the management console
and log in to Yandex Cloud or register a new account. - On the Yandex Cloud Billing
page, make sure you have a billing account linked and it has theACTIVE
orTRIAL_ACTIVE
status. If you do not have a billing account, create one and link a cloud to it.
If you have an active billing account, you can navigate to the cloud page
Learn more about clouds and folders.
Create an SMS notification channel with a common sender
In Cloud Notification Service, messages to end users are sent through notification channels.
An SMS notification channel with a shared sender is a good option for testing the service's features and has the following advantages:
- You do not have to register the sender's name with the telecom operator.
- No monthly subscription fee is charged.
There are restrictions in place for this type of sender:
- All SMS messages are signed with a shared service name.
- Promotional SMS messages are not allowed.
- A cloud can contain only one SMS notification channel with a shared sender.
- A channel can only operate in a sandbox with a limited number of test phone numbers.
To create a channel with a common sender:
- In the management console
, select the folder you want to create a notification channel in. - In the list of services, select Cloud Notification Service.
- Click Create notifications channel.
- In the SMS tab, select the Common sender sender type and click Create.
Add a test phone number
A sandbox is a test environment, in which you can send SMS messages only to test phone numbers.
Each test phone number is registered in a channel using a confirmation code from an SMS. By adding a number, you agree to receive messages to it.
To add a test phone number:
-
Select the notification channel you previously created.
-
Navigate to the
Test numbers tab. -
Click Add a test phone number.
-
In the window that opens, enter a phone number and click Get code. An SMS with a confirmation code will be sent to the specified phone number.
Russian phone numbers in E.164
format are supported, e.g.,+79991112233
. -
Enter the code from the SMS and click Confirm.
Send a test SMS
- Next to the test phone number you previously added, click
and select Send. - In the window that opens, enter the message text and click Send.
Create a notification channel with an individual sender
After practicing on a channel with a common sender, you can register an SMS notification channel with an individual sender.
An SMS notification channel with an individual sender is suitable for the product environment and has the following advantages:
- All SMS messages are signed with the sender's unique text name.
- After leaving the sandbox you can send SMS to any Russian phone numbers in E.164
format.
There are restrictions and rules in place for this type of sender:
- The sender's text name will be registered with the service provider.
- You will be charged a monthly subscription fee for using the sender's text name.
- In the cloud, one sender's text name can correspond to one SMS notification channel.
To create a channel with an individual sender:
- In the management console
, select the folder you want to create a notification channel in. - In the list of services, select Cloud Notification Service.
- Click Create notifications channel.
- In the SMS tab, select the Individual sender sender type.
- Specify the sender’s text name of your choice and click Create.
With that done, a tech support ticket to register the sender's text name will be automatically generated.
Note
Registering a sender's text name may take from 2 to 4 weeks.
When your registration is complete, you will be notified by tech support that you now have access to an individual sender channel.
Exit the sandbox
The SMS notification channel with an individual sender is originally created in the sandbox.
After practicing on test phone numbers, you can apply to exit the sandbox mode:
-
Select the individual sender notification channel you created earlier.
-
Click Leave sandbox.
With that done, a tech support ticket to exit the sandbox will be automatically generated.
You can also request an increase in the service quotas together with your request to exit the sandbox mode.
Once the ticket is approved, you will be able to send SMS messages to any Russian phone numbers in E.164+79991112233
.