POST
/
v1
/
auth
/
token
Issue iMessage tokens
curl --request POST \
  --url https://api.example.com/v1/auth/token
import requests

url = "https://api.example.com/v1/auth/token"

response = requests.post(url)

print(response.text)
const options = {method: 'POST'};

fetch('https://api.example.com/v1/auth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/auth/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.example.com/v1/auth/token"

req, _ := http.NewRequest("POST", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.example.com/v1/auth/token")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/auth/token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
The broker exchanges long-lived project credentials for a short-lived runtime token and gRPC endpoint(s). The Skyline SDK calls this automatically — use this endpoint directly only for debugging or custom clients.

Request

curl -X POST "https://api.interactions.co.in/v1/auth/token" \
  -H "Content-Type: application/json" \
  -d '{
    "projectId": "PROJECT_ID",
    "projectSecret": "PROJECT_SECRET",
    "platform": "imessage"
  }'

Body parameters

FieldTypeRequiredDescription
projectIdstringYesProject UUID
projectSecretstringYesProject secret
platform"imessage"YesPlatform to resolve
spacestringNoPin routing to a specific conversation handle

Response

{
  "succeed": true,
  "data": {
    "token": "eyJhbGciOiJFUzI1NiIs…",
    "ttl": 3600,
    "endpoints": [
      {
        "address": "line.interactions.co.in:50051",
        "phone": "+15559876543"
      }
    ]
  }
}
After this call, connect gRPC directly to endpoints[].address with the returned token. The broker is not in the message hot path.

Errors

CodeMeaning
401Invalid credentials
403iMessage not enabled for project
503No healthy line available