<?php
require ‘autoload.php’;
// you api key that generated from panel
$apiKey = “api-key”;
// create client instance<?php
require ‘autoload.php’;
// you api key that generated from panel
$apiKey = “api-key”;
// create client instance
<?php
require ‘autoload.php’;
// you api key that generated from panel
$apiKey = “api-key”;
// create client instance
Base URL: `https://edge.ippanel.com/v1`).
“`js
// npm i axios
const axios = require(“axios”);
const apiKey = “YOUR_API_KEY”;
const baseURL = “https://edge.ippanel.com/v1”;
async function sendSMS() {
const res = await axios.post(
`${baseURL}/sms/send`,
{
sender: “3000505”, // یا خط اختصاصی شما
recipients: [“09123456789”],
message: “سلام! این یک پیام تست از پنل پیامکی است.”
},
{
headers: { Authorization: apiKey }
}
);
console.log(res.data);
}
sendSMS().catch(console.error);
“`
“`go
package main
import (
“bytes”
“encoding/json”
“fmt”
“io”
“net/http”
“time”
)
const (
baseURL = “https://edge.ippanel.com/v1”
apiKey = “YOUR_API_KEY”
)
type SendSMSReq struct {
Sender string `json:”sender”`
Recipients []string `json:”recipients”`
Message string `json:”message”`
}
func main() {
reqBody := SendSMSReq{
Sender: “3000505”, // یا خط اختصاصی شما
Recipients: []string{“09123456789”},
Message: “سلام! تست ارسال از پنل پیامکی با Go”,
}
b, _ := json.Marshal(reqBody)
client := &http.Client{Timeout: 15 * time.Second}
req, _ := http.NewRequest(“POST”, baseURL+”/sms/send”, bytes.NewBuffer(b))
req.Header.Set(“Authorization”, apiKey)
req.Header.Set(“Content-Type”, “application/json”)
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(“Status:”, resp.Status)
fmt.Println(“Body:”, string(body))
}
“`
“`python
# pip install requests
import requests
API_KEY = “YOUR_API_KEY”
BASE_URL = “https://edge.ippanel.com/v1”
payload = {
“sender”: “3000505”, # یا خط اختصاصی شما
“recipients”: [“09123456789”],
“message”: “سلام! تست ارسال از پنل پیامکی با Python”
}
r = requests.post(
f”{BASE_URL}/sms/send”,
json=payload,
headers={“Authorization”: API_KEY}
)
print(“Status:”, r.status_code)
print(“Body:”, r.text)
“`
`https://edge.ippanel.com/v1` URL ارسال پیامک (ارسال ساده): `POST https://edge.ippanel.com/v1/sms/send` هدر لازم: `Authorization: API_KEY` و `Content-Type: application/json