Java SMS API – Send Text SMS Using Java API Gateway


In this blog, I am going to tell you “Java SMS API – Send Text SMS Using Java API Gateway” for those developers and users who use SMS platform for sending messages. By end of this blog you will most likely send a Java SMS API by using Telcob platform. Programming interface Java will spare you a great deal of time as it incorporates all the important API directions and tests. In your online business, tasks and take advantage of the ready for action innovation by getting an example code to send. So, come to know how to send text SMS using Java API gateway?

Send Text SMS Using Java API Gateway

There are following of the steps that you can use for sending an SMS (Send Text SMS using Java API Gateway) by using Telcob Java API Gateway:-

Step 1⇒ Create an Google Cloud Account.

In order to access the Java SMS API service, you need to have an Google Cloud account. If not, you can first create an Google cloud account by following these steps:

  • Google cloud access the official website , free registration button on the page.
  • Follow the on-screen instructions to complete the registration process and perform real-name authentication. An instant SMS service only supports real-name authentication users.

In order to better use the Google Cloud service; it is suggest to complete the real-name authentication as soon as possible, otherwise some Google Cloud services will not be available.

Step 2⇒ Obtain the Google Cloud Access Key

In order to send the API-JAVA SDK using SMS marketing, you must apply for Telcob access key. So, Google Cloud Access Key is a “secure password” design by Google Cloud for users to use API (non-console) to access their cloud resources. Therefore, you can use it to sign the API request content for secure authentication through the server.


Also, an access key is generate and use in pairs. Each Google cloud user can create multiple pairs of access keys and can be enable (Active), disable (Inactive) or delete at any time. Therefore, if some key pairs are at risk, it is suggest to delete the key pair, generate a new alternate key pair in time.

Hence, you can use Google console keys management page to create, manage all access keys right, and ensure that it is in the “Enable”. Since the access key is a key factor in Google Cloud’s secure verification of API requests, please keep your access key secure.

Step 3⇒ Complete the Template and Signature Application in the Google Console

  • SMS Signature

Create signature information that matches its own attributes base on user attributes. Even more, enterprise users need to upload relevant enterprise qualification certificates, and individual users need to upload proof of personal identity.

Note: Send text SMS using Java API gateway; SMS signatures need to be approve before they can be use.

  • SMS Template

The Java SMS API template is the specific SMS content sent. An SMS campaign need to be approve before they can be use.

SMS template can support four modes:
    • Verification code
    • SMS notification
    • Promotion SMS and,
    • National/International messages.

Finally, verification code and SMS interface call error codes notification, personalize message customization through variable replacement. Promotion SMS does not support adding variables to a template.

Read Related Post: Effective Digital SMS Change the Future of Business

In order to successfully send a text message notification, you need to complete at least the following steps:

  1. SMS signature and SMS template application in Google console, and obtain the parameters necessary for calling the interface.
  2. An application sign in the “SMS signature” page for a text string signature signing request manual
  3. Complete the template application on the B2B SMS marketing templates page to obtain the template ID.

⇒ Entry list of Java SMS API Parameters:-

Parameter name

Parameter Type

Required or not

Sample value

Parameter Description

Phone Numbers String have to +91-0123456789 The Java SMS API receiving number supports batch calling in comma-separate form.

The batch call is slightly delay compare to the time of a single call.

A verification code type SMS is suggest to use a single call.

When the message is receive, the format of the receiving number is:  area code + number, such as “+91-9876543210”

Sign Name String have to Cloud communication SMS Signature
Template Code String have to SMS – 012345 SMS template ID, when sending SMS template to the customers.
Template Param String Optional {“code”:”123456″,”product”:”tel”} The SMS template variable replaces the JSON string.

Note: If you need to use a newline character in JSON, please refer to the standard JSON protocol.

SMS Up Extend Codes String Optional 987654 Or 543210 Up-stream SMS extension code, please ignore this field if there is no special need for this field.
Outer Id String Optional Abcdefghij… External flow extension field

⇒ List of Some Other Parameters:-


Type of parameter

Sample value

Parameter Description

Request_Id String 76543210T-4321 Request ID
Code String OK Status code – return OK means the request is successful, other error codes are list in the error code list.
Message String Request success Description of the status code
Biz – Id String 0123456^6543210 Send a receipt ID, which can be query according to the ID.

Related Problem when Sending SMS by Using Java:-

There are following of the problems as:

1 ⇒ If the sent SMS is not receive, will there be a receipt or feedback that fail to be sent?

When sending an SMS message using the API interface, the interface calls the error code to display the status of the SMS sending task. You can also query the test SMS sending status through the API interface query send details.

Therefore, there is no charge for sending failures.


2 ⇒ SMS support does not support group sending settings?

Can the number displayed by the group be a fix actual number? Even more, the mass-sending failures be automatically resent after a receipt? Support group sending, please check the interfaces send SMS and send text messages in bulk for details. Fixed numbers are not supported and automatic resend is not supported.

3 ⇒ Is there a time limit for sending SMS messages?

The verification code is sent at an unlimited time, usually 3-5 seconds.

Read Related Article: A Guide for OTP SMS Authentication

4 ⇒ After sending a text message to the customer, how can I get the user’s SMS reply?

The Send Text SMS Using Java API Gateway supports the up-link Java SMS API, and the interface user can directly obtain the up-link content.

5 ⇒ Can the sender’s number display the same number?

Currently, the intelligent scheduling function is adopt. This function ensures that the client sends the optimal channel every time it is sent, so the access number will change.

6 ⇒ Generally it is 106+ SMS channel. If the channel changes, will be number change?

Yes, please check the sending statistics for details, and change number.

Increase Your Knowledge: 15 Tips for Text Message Marketing to Boost Your Business

7 ⇒ How to resolve the error messages?

The error code refers to the default flow control limit for triggering SMS (Text SMS Using Java API). Hence, the specific flow control restrictions are as follows. Please follow the restrictions below to send a text message:

  • SMS Cerification Code

Use the same signature to send SMS verification code to the same mobile phone number, support 1 / min, 5 / hour, 10 / day. A mobile phone number can only receive 40 tickets per day through the Telcob Cloud SMS service platform.

  • Notification SMS

Use the same signature and the same send text SMS using Java API gateway many of template ID to send SMS notifications to the same mobile phone number, support 50 messages/day. So, it is suggest to adjust the interface call time according to the above services.


View All Resources »

Java SMS API – Send Text SMS Using Java API Gateway
5 (100%) 3 votes