ANTS API SPECIFICATION
English v1.0.0
English v1.0.0
  • INTRODUCTION
  • ACCOUNT
  • SMS
    • Send Message
    • Callback Delivery Report
    • Message Logs
    • Preview Message
    • Sender List
    • Status and Error codes
  • OTP (One Time Password)
  • SMS 2 WAY Interactive
Powered by GitBook
On this page
  • Infrastructure Overview
  • ANTS HTTP Application Programing Interface (HTTP API)
  • Base URL
  • Content-Type & Accept header

Was this helpful?

INTRODUCTION

Welcome to the ANTS API developer hub. You'll find comprehensive guides and documentation to help you start working with API as quickly as possible.

NextACCOUNT

Last updated 5 years ago

Was this helpful?

Infrastructure Overview

This document will provide instructions on how to quickly integrate SMS messaging services into various solutions by using HTTP application programming interface (HTTP API). The HTTP API can be used for sending SMS messages, collecting delivery reports, making Number Context (number validation) requests and receiving inbound SMS messages sent from mobile phones.

ANTS HTTP Application Programing Interface (HTTP API)

API is based on REST standards, enabling you to use your browser for accessing URLs. In order to interact with our API, any HTTP client in any programming language can be used. So, you can utilize our services in various method such as sending messages, getting message logs with JSON format.

Base URL

Submit all requests to the Base URL thorough HTTP POST or GET method.

Base URL: https://api-service.ants.co.th

Content-Type & Accept header

API supports JSON and XML Content-Types and Accept criteria that should be specified in the header. If the Content-Type is not specified you will receive a General error. Depending which Accept type is chosen in the deader for the request, the same one will be applied in the response.

Content-Type: application/json

Accept header: application/json

Authorization

We support basic authorization using a username and password with Base64 encoding variation RFC2045-MIME.

The authorization header is constructed as follows:

  1. Username and password are combined into a string username:password

  2. The resulting string is encoded using the RFC2045-MIME variant of Base64

  3. The authorization method and a space, like this: "Basic ", are put before the encoded string.

Example: Authorization header could be created as these following:

Username: Aladdin Password: opensesame

Aladdin:opensesame

Base64 encoded string: QWxhZGRpbjpvcGVuc2VzYW1| Authorization header: Basic QWxhZGRpbjpvcGVuc2VzYW1|