-To be able to use the API service, you must have some conditions within your account, so that the connection with the messaging service is correct and without any problem -These conditions are:
πActive account :So that your account is active in the messaging service and your control panel is fully activated
πThe balance: You must have a message balance in your account in order to be able to use API
πSender ID : Your account must have a fully verified Sender ID
URL addresses that you need to use to connect to SMS API are: URL Adresses : api/v3/gonder/add-content
$title = '';
$api_key = '';
$text = '';
$sentto = '';
$report = '';
$sms_lang = '';
$response_type = '';
π $title :varchar Write here your Sender ID as it is in your account.
π $api_key :varchar Your API key on your account will be placed here
π $text :text The message text
π $sentto :int Recipient's mobile phone number
π $report :int Option to display the details of the sending process if the value is 1, the report appears, or 0 for cancellation
π $sms_lang :int This parameter describes the encoding of the message text. UTF-8 is set as default
π $response_type : int Response is sending JSON or Array
π§ͺοΈ
Array
(
[result] => true
[sms_id] => 1000007721
[number_of_sms] => 1
[result_code] => TS-1024
[result_message] => The message was sent successfully
[sms_lang] => Arabic
[country] => Turkey-TR
)
π result : The result of the operation, if successful, appears true, and if the transmission fails, it appears false
π sms_id : Message ID. Length of this parameter in each request may vary
π number_of_sms : Number of used credits
π result_code : Status code, list of codes can be find in Response code
π result_message : The message of the sent operation .. SMS appears to you in the event of success or failure
π sms_lang : The content of the message you sent appears in any language
π country : The name of the country to which the message was sent
π PHP : https://github.com/TURKEY-SMS/api/blob/main/send_sms/POST/turkeysms_api_v3.php
π JAVA : https://github.com/TURKEY-SMS/api/blob/main/send_sms/POST/turkeysms_api_v3.java
π JS : https://github.com/TURKEY-SMS/api/blob/main/send_sms/POST/turkeysms_api_v3.js
π PYTHON : https://github.com/TURKEY-SMS/api/blob/main/send_sms/POST/turkeysms_api_v3.py
π RUBY : https://github.com/TURKEY-SMS/api/blob/main/send_sms/POST/turkeysms_api_v3.rb
π C# : https://github.com/TURKEY-SMS/api/blob/main/send_sms/POST/turkeysms_api_v3.cs
π C(LibCURL) : https://github.com/TURKEY-SMS/api/blob/main/send_sms/POST/turkeysms_api_v3.c
π NodeJS : https://github.com/TURKEY-SMS/api/blob/main/send_sms/POST/turkeysms_api_v3.js
π ObjectiveC : https://github.com/TURKEY-SMS/api/blob/main/send_sms/POST/turkeysms_api_v3.h
π GO : https://github.com/TURKEY-SMS/api/blob/main/send_sms/POST/turkeysms_api_v3.go
π SWIFT : https://github.com/TURKEY-SMS/api/blob/main/send_sms/POST/turkeysms_api_v3.swift
-How to send a message through the API in GET format
-The variables sent through the link are - variables and options as I mentioned above
ππ
turkeysms.com.tr/api/v3/get/get.php?api_key=API_KEY_HERE&mobile=MOBILE_HERE&title=TITLE_HERE&text=SMS_TEXT_HERE&report=1&lang=2&response_type=json
github : https://github.com/TURKEY-SMS/api/blob/main/send_sms/GET/turkeysms_api_get.php
-Send options are intended to be characteristics of a message sent through an API
-Such as the language of the message content or the appearance of a report
π report$
-If the value is for this variable 1 An operation report will appear
-If the value is for this variable 0 The report will not appear after performing the operation
π sms_lang$
-If the value is for this variable 0 Message content will be in English
-If the value is for this variable 1 The content of the message in the Turkish language will support the Turkish characters
-If the value is for this variable 2 The content of the message will support the Arabic language or UTF-8 coding
π response_type$
-If the value is for this variable πJSON The response will be in json format
-If the value is for this variable πPHP The response will be in php format
-When sending via direct connection api, the server will send you a response to the process in the form of a code
-These codes explain to you the result of the operation that you have performed
πTS-1024 : Message sent successfully
πTS-1025 : The mobile number has not been entered. The phone number is empty
πTS-1026 : Message text is empty .. No message text has been written
πTS-1027 : There is insufficient balance in your account
πTS-1028 : Sender ID is not active for your account
πTS-1029 : The Sender ID does not exist .. Please make sure you type correctly
πTS-1030 : Your account is inactive with the SMS service provider
πTS-1031 : The api-key is invalid
πTS-1032 : The number to which the message is sent is international outside Turkey. Your account is not activated for international SMS
πTS-1033 : The data sent through the link is incorrect
πTS-1034 : The mobile number to which the message was sent is invalid
-Verification of authorization code could be made by POST request to API with two parameters, recipient mobile phone number
turkeysms.com.tr/api/v3/sms-durumu/sms_durumu.php?api_key=API_KEY_HERE&sms_id=SMS_ID_HERE&response_type=php
-The variables are sent through the link like
$api_key = '';
$sms_id = '';
$response_type = '';
π api_key$ : varchar Your API key on your account will be placed here
π sms_id$ :int Message ID
π response_type$: int Response is sending JSON or PHP
Array
(
[result] => true
[sender_id] => SenderID
[date_of_sending] => 2021-01-01
[time_of_sending] => 13:10:00
[sms_status] => Number received the message
[sms_status_code] => TS-1024
[sms_balance] => 1 SMS
[operator] => Turkcell
)
π result: The result of the operation, if successful, appears true, and if the transmission fails, it appears false
π sender_id: Message ID. Length of this parameter in each request may vary
π date_of_sending: The date the message was sent
π time_of_sending :The time the message was sent
π sms_status: Message Status - Delivered - Not delivered - Number out of coverage
π sms_status_code: Status Code
π sms_balance: Number of used credits
π operator: The name of the company to which the number belongs