Docs
OverviewPlatformPlatform APIA2P Messaging API
AI & MCP
Open dashboard
OverviewPlatformPlatform APIA2P Messaging API
AI & MCP
  • Overview
  • Create an account
  • Choose your API
  • AI & MCP
Channels
    • Senders
    • Coverage
    • Destination countries
    • Wildcard route
    • Agents
HTTP
  • Quickstart
  • Bulk sending
  • Authentication
  • Rate limits
  • Errors
  • DLRs
  • Traffic metrics
  • Full API Reference
SMPP
  • Authentication
  • Integration
SDKs
  • Node.js
  • PHP
  • Python
  • Ruby
  • Java
Legacy API
  • Overview
  • Authentication
  • Full API Reference
DashboardSupportinstasent.com

A2P Messaging API · SDKs

Java SDK

Official Java client for the Instasent A2P Messaging API. Download the JAR, construct an InstasentClient with your api_sms token, and call sendSms.

On this page▾
  • Installation
  • Send an SMS
  • Available methods
  • Getting help

Thin client over the A2P Messaging HTTP endpoints. For anything outside the methods below, use a plain HTTP client — the Reference documents every endpoint.

Installation

Download the JAR and add it to your project's classpath:

  • JAR
  • JAR with dependencies

Send an SMS

import com.instasent.InstasentClient;
import java.io.IOException;
import java.util.Map;
 
public class Main {
    public static void main(String[] args) throws IOException {
        InstasentClient client = new InstasentClient(System.getenv("INSTASENT_TOKEN"), true);
        Map<String, String> response = client.sendSms("My company", "+34666666666", "test message");
        System.out.println(response);
    }
}

Available methods

client.sendSms(sender, to, text, callback);
client.getSms(page, perPage);
client.getSmsById(messageId);

Getting help

For help installing or using the library, contact support@instasent.com. Bugs and feature requests belong on the GitHub repository.

Product and pricing

  • SMS API
  • SMS and RCS pricing

Last updated September 30, 2026

PreviousRubyNextOverview
  • Installation
  • Send an SMS
  • Available methods
  • Getting help

© 2026 Instasent

Privacy PolicyTerms & ConditionsCookie PolicyLegal Notice
All systems operational