You are on page 1of 6

12/07/2022, 14:59 HTTP API | sendmsg usage example - POSTMAN – SOPRANO Help Center

SOPRANO Help Center


>
API Integration and Plug-ins
>
HTTP API

Search

Articles in this section

HTTP API | sendmsg usage example -


POSTMAN
1 year ago ·
Updated

This article explains how to send a message using the Soprano HTTP API 'sendmsg' command
from a popular third party application for testing APIs called Postman. The Soprano HTTP API is
used to send or receive SMS messages by doing an 'HTTP POST' to a URL. 

A record of all messages sent via the 'HTTP POST' interface is recorded in Messaging platform
and can be accessed via the web or other reporting interfaces.

Disclaimer: Soprano can't provide support for third-party tools such as Postman, please
refer to the Postman documentation or search online for a solution.

Requirements

Before we can get started, you will need the following:

A messaging platform account provisioned with an HTTP API license


Login details for the platform account - username and password
The url of the messaging platform.
https connectivity to the messaging platform
Access to the 'HTTP Interface Developer Guide' documentation.
The Postman app, downloaded and installed from the Postman website.

Sending an SMS message

https://help.sopranodesign.com/hc/en-us/articles/4402485857689-HTTP-API-sendmsg-usage-example-POSTMAN 1/6
12/07/2022, 14:59 HTTP API | sendmsg usage example - POSTMAN – SOPRANO Help Center

In this example we will be making a POST request to the Soprano HTTP API, specifically we will be
using the 'sendmsg' endpoint:

POST <$DOMAIN_URL>/cgphttp/servlet/sendmsg 

Where <$DOMAIN_URL> is replaced with your messaging platform URL.

Before we get started please refer to the 'HTTP Interface Developer Guide' documentation to
familiarize yourself with the api.

1. Download and install the Postman application. In this example we will be working locally
without a cloud account.

2. Open the Postman application, from the scratch pad 'Create a Collection' - (a collection is a
group of requests):

Call the collection "Soprano MEMS Examples".

3. Go back to the scratch pad, and "Create a request":

4. Save the request:

https://help.sopranodesign.com/hc/en-us/articles/4402485857689-HTTP-API-sendmsg-usage-example-POSTMAN 2/6
12/07/2022, 14:59 HTTP API | sendmsg usage example - POSTMAN – SOPRANO Help Center

5. In the Postman request editor, enter the API endpoint:

<$DOMAIN_URL>/cgphttp/servlet/sendmsg 

Replacing <$DOMAIN_URL> with your messaging platform URL, for example:

https://aus.sopranodesign.com/cgphttp/servlet/sendmsg

Since http is inherently insecure - data including username and passwords are sent as
clear-text we recommend using the SSL security offered by using https.

https://help.sopranodesign.com/hc/en-us/articles/4402485857689-HTTP-API-sendmsg-usage-example-POSTMAN 3/6
12/07/2022, 14:59 HTTP API | sendmsg usage example - POSTMAN – SOPRANO Help Center

6. Make sure 'POST' is selected as the method on the left side, as the api for the endpoint
specifies this is a POST request.

7. As we are making a POST request, we need to send some data with the request. Click the
'Params' tab below your request path and enter data for each of the api parameters you are
using. In this example we will use 'destination' and 'text':

Key Value Explanation


destination 61491234567 the mobile number you want to send the message to in
international format
text Hello+world the message you want to send

As the parameters are entered they are automatically added to the request path
(highlighted in green).

8. Click on the 'Authorization' tab below your request path, select 'Basic Auth' from the types, and
enter your username and password.

https://help.sopranodesign.com/hc/en-us/articles/4402485857689-HTTP-API-sendmsg-usage-example-POSTMAN 4/6
12/07/2022, 14:59 HTTP API | sendmsg usage example - POSTMAN – SOPRANO Help Center

9. Click 'Save' on the right side of your request path.

10. Verify that you have entered everything correctly, then click 'Send' to make the request and to
send the message.

You will see a response appear in the 'Body' section, and if successful a SMS message will be
received on your mobile device:

In the 'Body' you will see a coded response from the messaging platform - please refer to the
'HTTP Interface Developer Guide' documentation for more detailed explanation of the response
message:

1 digit success code (e.g. '0' = Success or '1' = Error)


3 digit response code (e.g. '001')
Response string (e.g. 'OK' or 'ERROR')
An identifier for the message, containing the message ID (e.g. '7836') and potentially the
https://help.sopranodesign.com/hc/en-us/articles/4402485857689-HTTP-API-sendmsg-usage-example-POSTMAN 5/6
12/07/2022, 14:59 HTTP API | sendmsg usage example - POSTMAN – SOPRANO Help Center

message status (e.g.'ACCEPTED_BY_NETWORK_ELEMENT').

PLEASE NOTE: Due to regional or carrier partner requirements, some of the screen designs
or functionality described in this article maybe unavailable and/or presented differently in
your region.

Was this article helpful?

Yes
No

0 out of 0 found this helpful

Have more questions? Submit a request

Return to top

Recently viewed articles


HTTP API | sendmsg usage example - cURL

PRIVACY
| GDPR
| TERMS
| 508 COMPLIANCE
Copyright 2021 Soprano Design Limited. All Rights Reserved.

https://help.sopranodesign.com/hc/en-us/articles/4402485857689-HTTP-API-sendmsg-usage-example-POSTMAN 6/6

You might also like