> ## Documentation Index
> Fetch the complete documentation index at: https://developers.phonovation.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Send your first SMS with the Phonovation SMS API in under 5 minutes.

## 1. Get your credentials

Contact [support@phonovation.com](mailto:support@phonovation.com) or log in to your Phonovation account to retrieve your **username**, **password**, and **API ID**.

## 2. Get an access token

<CodeGroup>
  ```bash title="cURL" icon="terminal" wrap theme={"dark"}
  curl -X POST https://auth.interactsms.com/token \
    -H "Content-Type: application/x-www-form-urlencoded" \
    -d "grant_type=password&client_id=ismstoken&username=YOUR_USERNAME&password=YOUR_PASSWORD"
  ```

  ```python title="Python" icon="python" lines focus={3-13} theme={"dark"}
  import requests

  res = requests.post(
      "https://auth.interactsms.com/token",
      data={
          "grant_type": "password",
          "client_id": "ismstoken",
          "username": "YOUR_USERNAME",
          "password": "YOUR_PASSWORD"
      }
  )

  print(res.json())
  ```

  ```csharp title="C#" icon="code" lines focus={5-13} theme={"dark"}
  using System.Net.Http;

  using var client = new HttpClient();

  var body = new FormUrlEncodedContent(new Dictionary<string, string>
  {
      ["grant_type"] = "password",
      ["client_id"] = "ismstoken",
      ["username"] = "YOUR_USERNAME",
      ["password"] = "YOUR_PASSWORD"
  });

  var res = await client.PostAsync("https://auth.interactsms.com/token", body);
  Console.WriteLine(await res.Content.ReadAsStringAsync());
  ```

  ```java title="Java" icon="java" lines focus={8-18} theme={"dark"}
  import java.net.URI;
  import java.net.http.HttpClient;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;
  import java.net.URLEncoder;
  import java.nio.charset.StandardCharsets;

  String form = "grant_type=password"
      + "&client_id=ismstoken"
      + "&username=" + URLEncoder.encode("YOUR_USERNAME", StandardCharsets.UTF_8)
      + "&password=" + URLEncoder.encode("YOUR_PASSWORD", StandardCharsets.UTF_8);

  HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create("https://auth.interactsms.com/token"))
      .header("Content-Type", "application/x-www-form-urlencoded")
      .POST(HttpRequest.BodyPublishers.ofString(form))
      .build();

  HttpResponse<String> res = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
  System.out.println(res.body());
  ```

  ```php title="PHP" icon="php" lines focus={3-12} theme={"dark"}
  $client = new GuzzleHttp\Client();

  $res = $client->post('https://auth.interactsms.com/token', [
      'form_params' => [
          'grant_type' => 'password',
          'client_id' => 'ismstoken',
          'username' => 'YOUR_USERNAME',
          'password' => 'YOUR_PASSWORD',
      ],
  ]);

  echo $res->getBody();
  ```

  ```js title="JavaScript" icon="js" lines focus={1-12} theme={"dark"}
  const res = await fetch("https://auth.interactsms.com/token", {
    method: "POST",
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    body: new URLSearchParams({
      grant_type: "password",
      client_id: "ismstoken",
      username: "YOUR_USERNAME",
      password: "YOUR_PASSWORD",
    }),
  });

  console.log(await res.json());
  ```
</CodeGroup>

Copy the `access_token` from the response. It expires in **120 seconds**.

## 3. Send a message

<CodeGroup>
  ```bash title="cURL" icon="terminal" highlight={2,6-8} wrap theme={"dark"}
  curl -X POST https://api.interactsms.com/api/v2/Campaign \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "text": "Hello from Phonovation!",
      "from": "Phonovation",
      "recipientInfo": [
        { "msisdn": "353861234567" }
      ]
    }'
  ```

  ```js title="JavaScript" icon="js" lines expandable focus={1-16,18-29} theme={"dark"}
  // Step 1: Get token
  const tokenRes = await fetch('https://auth.interactsms.com/token', {
    method: 'POST',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    body: new URLSearchParams({
      grant_type: 'password',
      client_id: 'ismstoken',
      username: 'YOUR_USERNAME',
      password: 'YOUR_PASSWORD'
    })
  });
  const { access_token } = await tokenRes.json();

  // Step 2: Send campaign
  const res = await fetch('https://api.interactsms.com/api/v2/Campaign', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${access_token}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      text: 'Hello from Phonovation!',
      from: 'Phonovation',
      recipientInfo: [{ msisdn: '353861234567' }]
    })
  });
  console.log(await res.json());
  ```

  ```python title="Python" icon="python" lines expandable focus={3-14,17-29} theme={"dark"}
  import requests

  # Step 1: Get token
  token_res = requests.post(
      'https://auth.interactsms.com/token',
      data={
          'grant_type': 'password',
          'client_id': 'ismstoken',
          'username': 'YOUR_USERNAME',
          'password': 'YOUR_PASSWORD'
      }
  )
  access_token = token_res.json()['access_token']

  # Step 2: Send campaign
  res = requests.post(
      'https://api.interactsms.com/api/v2/Campaign',
      headers={'Authorization': f'Bearer {access_token}'},
      json={
          'text': 'Hello from Phonovation!',
          'from': 'Phonovation',
          'recipientInfo': [{'msisdn': '353861234567'}]
      }
  )
  print(res.json())
  ```

  ```csharp title="C#" icon="code" lines expandable focus={5-16,18-32} theme={"dark"}
  using System.Net.Http.Headers;
  using System.Text;
  using System.Text.Json;

  using var client = new HttpClient();

  var tokenBody = new FormUrlEncodedContent(new Dictionary<string, string>
  {
      ["grant_type"] = "password",
      ["client_id"] = "ismstoken",
      ["username"] = "YOUR_USERNAME",
      ["password"] = "YOUR_PASSWORD"
  });

  var tokenRes = await client.PostAsync("https://auth.interactsms.com/token", tokenBody);
  var tokenJson = JsonDocument.Parse(await tokenRes.Content.ReadAsStringAsync());
  var accessToken = tokenJson.RootElement.GetProperty("access_token").GetString();

  var campaign = new
  {
      text = "Hello from Phonovation!",
      from = "Phonovation",
      recipientInfo = new[] { new { msisdn = "353861234567" } }
  };

  client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
  var res = await client.PostAsync(
      "https://api.interactsms.com/api/v2/Campaign",
      new StringContent(JsonSerializer.Serialize(campaign), Encoding.UTF8, "application/json")
  );

  Console.WriteLine(await res.Content.ReadAsStringAsync());
  ```

  ```java title="Java" icon="java" lines expandable focus={9-23,25-46} theme={"dark"}
  import java.net.URI;
  import java.net.http.HttpClient;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;
  import java.net.URLEncoder;
  import java.nio.charset.StandardCharsets;

  HttpClient client = HttpClient.newHttpClient();

  String form = "grant_type=password"
      + "&client_id=ismstoken"
      + "&username=" + URLEncoder.encode("YOUR_USERNAME", StandardCharsets.UTF_8)
      + "&password=" + URLEncoder.encode("YOUR_PASSWORD", StandardCharsets.UTF_8);

  HttpRequest tokenRequest = HttpRequest.newBuilder()
      .uri(URI.create("https://auth.interactsms.com/token"))
      .header("Content-Type", "application/x-www-form-urlencoded")
      .POST(HttpRequest.BodyPublishers.ofString(form))
      .build();

  HttpResponse<String> tokenResponse = client.send(tokenRequest, HttpResponse.BodyHandlers.ofString());
  String accessToken = tokenResponse.body().split("\"access_token\":\"")[1].split("\"")[0];

  String campaignJson = """
  {
    "text": "Hello from Phonovation!",
    "from": "Phonovation",
    "recipientInfo": [
      { "msisdn": "353861234567" }
    ]
  }
  """;

  HttpRequest campaignRequest = HttpRequest.newBuilder()
      .uri(URI.create("https://api.interactsms.com/api/v2/Campaign"))
      .header("Authorization", "Bearer " + accessToken)
      .header("Content-Type", "application/json")
      .POST(HttpRequest.BodyPublishers.ofString(campaignJson))
      .build();

  HttpResponse<String> campaignResponse = client.send(campaignRequest, HttpResponse.BodyHandlers.ofString());
  System.out.println(campaignResponse.body());
  ```

  ```php title="PHP" icon="php" lines expandable focus={2-12,15-26} theme={"dark"}
  // Step 1: Get token
  $client = new GuzzleHttp\Client();
  $tokenRes = $client->post('https://auth.interactsms.com/token', [
      'form_params' => [
          'grant_type' => 'password',
          'client_id'  => 'ismstoken',
          'username'   => 'YOUR_USERNAME',
          'password'   => 'YOUR_PASSWORD',
      ],
  ]);
  $accessToken = json_decode($tokenRes->getBody())->access_token;

  // Step 2: Send campaign
  $res = $client->post('https://api.interactsms.com/api/v2/Campaign', [
      'headers' => ['Authorization' => "Bearer $accessToken"],
      'json' => [
          'text'          => 'Hello from Phonovation!',
          'from'          => 'Phonovation',
          'recipientInfo' => [['msisdn' => '353861234567']],
      ],
  ]);
  echo $res->getBody();
  ```
</CodeGroup>

**Successful response:**

```json title="Campaign response" icon="code" highlight={2,4} wrap theme={"dark"}
{
  "success": true,
  "message": "Campaign scheduled",
  "errors": []
}
```

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/guides/authentication">
    Understand token expiry and refresh strategy.
  </Card>

  <Card title="Sender IDs" icon="id-card" href="/guides/sender-ids">
    Find out which Sender IDs are available on your account.
  </Card>

  <Card title="Sending SMS" icon="message-sms" href="/guides/sending-sms">
    Bulk sends, scheduling, and notifyId tracking.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Full endpoint reference with interactive playground.
  </Card>
</CardGroup>
