Ncell SMS API Gateway Overview
Ncell SMS API Gateway Overview
The mandatory request parameters for sending an SMS via the Ncell API Gateway include 'address,' 'clientCorrelator,' 'message,' and 'senderName.' The 'address' is the recipient's phone number prefixed with the 'tel:' protocol and country code. The 'clientCorrelator' is a unique identifier for tracking the SMS. The 'message' contains the content to be delivered, which must be formatted within the 'outboundSMSTextMessage' element. The 'senderName' reflects the sender's identity, which must be approved and white-listed in the SMSC .
The Ncell API documentation recommends using a 'clientCorrelator,' a unique identifier for each SMS sent, to ensure unique identification of messages. This aids in tracking and managing messages individually, allowing the client to monitor the status and fulfill different operational requirements effectively, such as troubleshooting or auditing message exchanges .
The Ncell API Gateway utilizes the oAuth2 protocol, specifically the password grant type, for access authorization. An access token obtained through this process must be passed as a bearer token in the header of each API call, ensuring authorized access to the services .
The Ncell API automatically segments messages exceeding 160 characters into two or more separate SMS messages. This ensures compliance with SMS technology limits, enabling the complete transmission of longer messages over existing telecommunications infrastructure. While this allows for exhaustive content delivery, it also implies that users may incur additional costs and need to consider message assembly on the recipient's device .
The Ncell API Gateway utilizes HTTP methods such as POST, GET, PUT, and DELETE to perform operations on resources. These methods correspond to creating, retrieving, updating, and deleting operations on the specified server resource, respectively. Each method interacts with the resource addressed by a URL and returns a representation based on the resource's current state .
The SMS sending operation response structure in the Ncell API includes all original request parameters, ensuring traceability and validation of the operation. Additionally, the response contains a 'resourceURL' in the 'resourceReference' object, providing metadata about the resource's state and location. Delivery information, such as 'deliveryStatus' and 'deliveryInfoList,' is also included to confirm message status, ensuring comprehensive feedback on the operation's outcome .
The Ncell API Gateway mandates adherence to specific URI patterns, which are crucial for defining the endpoints through which services are accessed. These patterns determine the structure and hierarchy of API calls, influencing how requests are constructed, parsed, and managed. Proper adherence ensures seamless integration, allowing for consistent interaction with the gateway and avoiding errors related to incorrect routing or unrecognized endpoints .
Service exceptions in the Ncell API arise from immediate transaction confirmation failures, evidenced by errors such as HTTP 400 Bad Request. These involve invalid input values, with specific error messages detailing the exact issue, like incorrect 'clientCorrelator' values. Policy exceptions pertain to syntax-valid requests that contravene service operator policies, indicated by a 'POL0001' policy error. Resolutions include correcting input values for service exceptions and adhering to operator policies to resolve policy exceptions .
The communication between the Ncell API Gateway and the service provider should be through a secure channel, specifically HTTPS, along with an IPSec VPN. This ensures that data transmitted is protected from malicious activities. Additionally, adherence to the defined URL patterns and response codes is mandatory to maintain security protocols .
Using JSON-based RESTful APIs in the Ncell API Gateway facilitates lightweight, easy-to-read data interchange, which is crucial for efficient communication in web-based applications. JSON formats allow quicker parsing, are language-independent, and enhance interoperability between different systems. This makes them ideal for web services that require fast processing and integration across various platforms .