smpp clients' server, which is client of smpp server 🤪
- Install Redis
- Get smpp authorization
We use default values of redis database. U can customize this values for your needs.
rdb := redis.NewClient(&redis.Options{
Addr: "localhost:6379",
Password: "", // no password set
DB: 0, // use default DB
})
Specify environment variables of your smpp server
tx := &smpp.Transmitter{
Addr: os.Getenv("SMS_IP") + ":" + os.Getenv("SMS_PORT"),
User: os.Getenv("SMS_LOGIN"),
Passwd: os.Getenv("SMS_PASSWORD"),
}
In root there are examples of files change values for your needs
curl -X POST \
'http://localhost:8080' \
--header 'Content-Type: application/json' \
--data-raw '{
"to": "+99362235616",
"text": "hi from milkaxq",
"api_key": "2e313d17-1ff3-490a-a6bf-b10afbffd9d3"
}'
Key | Value | Description | Example |
---|---|---|---|
to | phone number | should be specified phone number with country code started with + | +99362235616 |
text | message | your message which your want to send | hi from milkaxq |
api_key | secret key | raw prefix to find from json file and check key to authenticate client | 2e313d17-1ff3-490a-a6bf-b10afbffd9d3 |
{
"id": "15b0c2f2",
"message": "hi from milkaxq"
}
Key | Value | Description |
---|---|---|
id | 15b0c2f2 | randomly generated id of smpp provider |
otp | 012345 | message that we sent with request |
status | 0 | don't understand how our ISP works |
curl -X GET \
'95.85.108.114:8080/messages/15b0c2f2' \
--header 'Accept: */*' \
Param | Description |
---|---|
15b0c2f2 | randomly generated id of smpp provider |
{
"id": "15b0c2f2",
"message": "hi from milkaxq"
}
Key | Value | Description |
---|---|---|
id | 15b0c2f2 | randomly generated id of smpp provider |
message | hi from milkaxq | message that we sent with request |
Please, create safe "api_key"s. We recommend to use uuid v4
- @milkaxq
- @richxcame