0% found this document useful (0 votes)
39 views

SMPP API Integration Testelium 2023

Uploaded by

ghostarrow
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

SMPP API Integration Testelium 2023

Uploaded by

ghostarrow
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

TELECOM SOFTWARE OÜ

SMPP API Integration step by step.

Content

1. 1. Authorization
2. 2. Getting balance information
3. 3. Getting a list of countries
4. 4. Getting a list of available binds
5. 5. Obtaining a list of available networks for the test
6. 6. Getting a list of available list of templates for the test
7. 7. Getting a list of available list of vendors
8. 8. Formation and submission of the test
9. 9. Getting results

Authorization

For authorization you must send

POST
/api/auth/login

with your parameters

{
"email": "",
"password": ""
}

If authorization is successful you will receive the following structure in response


{
"status": "success",
"data": {
"id": 1,
"email": "",
"name": "",
"activated": true,
"is_sub": false,
"permissions_ids": []
}
}

Also you will receive the Authorization header which will contain the authorization token, it is necessary for
subsequent requests.
Getting balance information
For information on the available balance, use

GET
/api/balance

without parameters with the Authorization header, which contains the Bearer token received through
authorization, in response you will receive

{
"status": "success",
"data": {
"id": 1,
"balance": {
"coins": 100,
"price_per_task": 10,
"starts_at": "2018-06-13 14:42:44",
"expires_at": "2020-08-22 11:06:36",
"on_hold": false,
"hold_at": null,
"hold_days": 0,
"plan_name": "Giant"
},
"total":100
}
}

Getting a list of countries

For country list information, use

GET
/api/countries

without parameters with the Authorization header, which contains the Bearer token received through
authorization, in response you will receive

{
"status": "success",
"data": [
{
"id": "AF",
"name": "Afghanistan"
},
{
"id": "AL",
"name": "Albania"
}
}

Getting a list of binds


For information about binds use

GET
/api/binds
without parameters with the Authorization header, which contains the Bearer token received through
authorization, in response you will receive

{
"status": "success",
"data": [
{
"id": 17,
"system_id": "NAME",
"system_type": "pr_id-0",
"ip": "IP",
"port": PORT,
"stopped": false
}
]
}

Getting a list of available networks for the test


For information on available networks, use

GET
/api/networks

{
"status": "success",
"data": [
{
"id": 1713,
"name": "AWCC",
"mcc_mnc": "412-01",
"original_mcc_mnc": "",
"available": false,
"price": 70,
"country_id": "AF",
"country": "Afghanistan",
"originalNetwork": null
},
{
"id": 1714,
"name": "Roshan",
"mcc_mnc": "412-20",
"original_mcc_mnc": "",
"available": true,
"price": 70,
"country_id": "AF",
"country": "Afghanistan",
"originalNetwork": null
}
}
Get a list of available templates
For information on the available templates, use
GET
/api/templates
without parameters with the Authorization header, which contains the Bearer token received through
authorization, in response you will receive

{
"status": "success",
"data": [
{
"id": 720,
"name": "GSM 7-bit alp",
"description": "GSM 7-bit with alphanumeric sender",
"response_delivery": 0,
"send_concatenated": 1,
"sender": "LQ555",
"message": "Your access code is 3984",
"alphabet_id": 0,
"ton_id": 5,
"npi_id": 0,
"service_type": ""
},
{
"id": 727,
"name": "Unicode alp",
"description": "Unicode 16-bit with alphanumeric sender",
"response_delivery": 0,
"send_concatenated": 1,
"sender": "LQ555",
"message": "Your access code is 0498",
"alphabet_id": 8,
"ton_id": 5,
"npi_id": 0,
"service_type": ""
}
]
}

Getting a list of available vendors for the test


For information on available vendors use

GET
/api/vendors

without parameters with the Authorization header, which contains the Bearer token received through
authorization, in response you will receive

{
"status": "success",
"data": [
{
"id": 44,
"vendor_id": "0",
"name": "638",
"description": "TLM",
"bind_id": 17,
"service_type": "638"
},
{
"id": 45,
"vendor_id": "0",
"name": "271",
"description": "TLM",
"bind_id": 17,
"service_type": "271"
}
]
}

Test generation and submission


To send a test, create an array of tasks, each of which contains a network ID, vendor ID, and template ID.

{
"tasks": [
{
"network_id": 2720,
"vendor_id": 1837,
"template_id": 4508
}
]
}

and send a request

POST
/api/tests/run/tasks

with the Authorization header, which contains the Bearer token received through authorization, in response
you will receive

{
"status": "success",
"data": [
"2672c41e-5029-42e1-b703-7d455b50f304"
]
}

List of UUID tests, you need them to track the results.

Getting Results
For test results use
GET
/api/reports/show/:uuid

without parameters using the UUID obtained in the previous method with the Authorization header, which
contains the Bearer token received through authorization, in response you will receive

{
"status": "success",
"data": {
"uuid": "e51d6ff1-2a6a-4d67-ac2a-fd177cf50340",
"created_at": "2020-02-24 12:09:25",
"cost": 10,
"sent_at": "2020-02-24 12:09:26",
"delivered_at": "2020-02-24 12:09:33",
"delay": 7,
"is_sender_changed": true,
"sender_sent": "17868716500",
"sender_delivered": "+17868716500",
"is_text_changed": false,
"text_sent": "Normalmente un mensaje de texto puede contener hasta 160 caracteres. Es posible sin
embargo combinar varios mensajes sencillos en un solo mensaje en",
"text_delivered": "Normalmente un mensaje de texto puede contener hasta 160 caracteres. Es posible
sin embargo combinar varios mensajes sencillos en un solo mensaje en",
"text_delivered_decorated": "Normalmente un mensaje de texto puede contener hasta 160 caracteres.
Es posible sin embargo combinar varios mensajes sencillos en un solo mensaje en",
"mcc_mnc": "259-01",
"original_mcc_mnc": "",
"country_id": "MD",
"country": "Moldova",
"network_name": "Orange",
"vendor_name": "BOT823",
"template_name": "Concatenated GSM",
"scheduled": false,
"target_number": "37369159430",
"pdu": [
"000000c600000004000000000000001932353300010131373836383731363530300001013337333
639313539343330004300000000010000008c0500034602016230336c706172746272696d4e6f726d616c6
d656e746520756e206d656e73616a6520646520746578746f20707565646520636f6e74656e65722068617
374612031363020636172616374657265732e20457320706f7369626c652073696e20656d626172676f206
36f6d62696e617220766172696f73206d656e73616a65732073656e6369",
"0000005a00000004000000000000001a3235330001013137383638373136353030000101333733
363931353934333000430000000001000000200500034602026c6c6f7320656e20756e20736f6c6f206d656
e73616a6520656e"
],
"service_center": "+33150960077",
"service_center_country": "France",
"sent_by": “",
"sms_acc": true,
"vendor_dlr": true,
"result": "Success",
"message_id": [
"5d22f49c-d675-52fc-fa06-b976c8c56f8e",
"5d22f49c-2194-512c-7dcc-ee92783844d7"
]
}
}

It is advisable to request test results no earlier than 15-30 seconds after the test.

Thank you!

You might also like